glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-fs-all-02.shader_test
blob5b46ca0738c3b54d09abd2fd656fa5bbae9140cd
1 [require]
2 GLSL >= 1.10
4 [vertex shader]
5 varying vec2 pos;
7 void main()
9   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
10   pos = gl_Vertex.xy;
13 [fragment shader]
14 varying vec2 pos;
16 struct s {
17   bool x, y, z, w;
20 void main()
22   s t1 = s(true, bool(42.0), pos.x > -20000.0, bool(111));
24   float r = (  float(all(bvec4(!t1.x,  t1.y,  t1.z,  t1.w)))
25              + float(all(bvec4( t1.x, !t1.y,  t1.z,  t1.w)))
26              + float(all(bvec4( t1.x,  t1.y, !t1.z,  t1.w)))
27              + float(all(bvec4( t1.x,  t1.y,  t1.z, !t1.w))));
29   float g = float(all(bvec4(t1.x, t1.y, t1.z, t1.w)));
31   gl_FragColor = vec4(r, g, 0.0, 1.0);
34 [test]
35 ortho
36 clear color 0.5 0.5 0.5 0.5
37 clear
38 draw rect 10 10 10 10
39 probe rgb 15 15 0.0 1.0 0.0