glsl-1.10: fix glsl-fs-conditional-output-write test
[piglit.git] / tests / spec / glsl-1.10 / execution / glsl-fs-conditional-output-write.shader_test
blobf1d703ae19b5d69b85fadeb7b514906dfdd47e4b
1 # Bug #30415
2 [require]
3 GLSL >= 1.10
5 [vertex shader]
6 uniform vec4 coord;
8 void main()
10     gl_Position = gl_Vertex;
11     gl_TexCoord[0] = coord;
14 [fragment shader]
15 uniform vec4 vecX, vecY;
16 uniform int iter;
18 void main() {
19     gl_FragColor.yw = vec2(0);
20     bool b = (dot(gl_TexCoord[0], gl_TexCoord[0]) < 4.0);
21     gl_FragColor.z = iter == 0 ? vecX.z - vecY.z : 15.0;
22     if(b)
23         gl_FragColor.x = 1.0;
24     else
25         gl_FragColor.x = 0.0;
28 [test]
29 uniform vec4 coord 1.0 1.0 1.0 0.0
30 uniform vec4 vecX 1.0 1.0 1.0 1.0
31 uniform vec4 vecY 0.5 0.5 0.5 1.0
32 uniform int iter 0
33 draw rect -1 -1 2 2
34 probe all rgb 1.0 0.0 0.5