perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.10 / execution / glsl-deadcode-varying.shader_test
blob66a3b586ba40861e12e9794a5bfd8423bb1c1b6d
1 [require]
2 GLSL >= 1.10
4 [vertex shader]
5 uniform vec4 color;
6 varying vec4 color1;
7 varying vec4 color2;
9 void set_color2(void)
11         color2 = color1;
14 void main()
16         gl_Position = gl_Vertex;
18         /* Due to a bug in glsl2, this particular assignment followed
19          * by the function call below would get the expression moved to
20          * color2 and color1 would be eliminated.
21          */
23         color1 = color * 0.5;
24         set_color2();
27 [fragment shader]
28 varying vec4 color1;
29 varying vec4 color2;
31 void main()
33         gl_FragColor = color1;
36 [test]
37 uniform vec4 color 0.0 1.0 0.0 0.0
38 draw rect -1 -1 2 2
39 probe all rgba 0.0 0.5 0.0 0.0