glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-fs-loop-unroll-ishl-int64.shader_test
blobb6a37ca1bb191b78564da6b7e55b772bbd64d149
1 [require]
2 GLSL >= 4.00
3 GL_ARB_gpu_shader_int64
5 [vertex shader passthrough]
7 [fragment shader]
8 #extension GL_ARB_gpu_shader_int64: require
10 void main()
12    int64_t li = 7L;
13    while (li < 481036337152L)
14       li <<= 4;
15    /* li should be 481036337152 */
17    while (li <= 1970324836974592L)
18       li <<= 4;
19    /* li should be 31525197391593472 */
21    while (li != 504403158265495552L)
22       li <<= 4;
23    /* li should be 504403158265495552 */
25    uint64_t uli = 7UL;
26    while (uli < 1970324836974592UL)
27       uli <<= 6;
28    /* uli should be 1970324836974592 */
30    while (uli <= 126100789566373888UL)
31       uli <<= 6;
32    /* uli should be 8070450532247928832 */
34    if (li == 504403158265495552L &&
35        uli == 8070450532247928832UL)
36       gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
37    else
38       gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
41 [test]
42 clear color 0.3 0.3 0.3 0.0
43 clear
45 draw rect -1 -1 2 2
46 probe all rgba 0.0 1.0 0.0 1.0