glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-fs-array-redeclaration.shader_test
blob37950c36fa724964e7eb19e514822919ca62710a
1 #This test reproduces Mesa bug 34374.
2 [require]
3 GLSL >= 1.20
5 [vertex shader]
6 void main()
8         gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
11 [fragment shader]
12 #version 120
13 void main()
15         float a[];
16         float a[] = float[](0,1);
17         if (a[1] == 1)
18                 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
19         else
20                 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
23 [test]
24 draw rect -1 -1 2 2
25 probe all rgb 0.0 1.0 0.0