perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.10 / execution / glsl-fs-loop-while-false-03.shader_test
blob49224da35520eff43760fb3915cc81763e602917
1 [require]
2 GLSL >= 1.10
4 [vertex shader passthrough]
6 [fragment shader]
8 // we're relying on this being initialized to (0.0, 0.0) since it's going to be
9 // eliminated by nir later, and we can't initialize uniforms in GLSL 1.10
10 uniform vec2 u;
12 void main()
14         int x = 0;
16         if (u.x > u.y)
17         {
18            gl_FragColor = vec4(0.0, 1.0, 1.0, 1.0);
19            return;
20         }
22         do
23         {
24                 x++;
25         }
26         while (u.x > u.y);
28         if (x == 1) {
29                 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
30                 return;
31         }
33         gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
36 [test]
37 clear color 0.3 0.3 0.3 0.0
38 clear
40 draw rect -1 -1 2 2
41 probe all rgba 0.0 1.0 0.0 1.0