1 # Check that when computing the number of iterations executed by
2 # nested loops, loop analysis doesn't assume that an increment in the
3 # inner loop executes once per invocation of the outer loop.
9 attribute vec4 piglit_vertex;
14 int num_total_iterations = 0;
16 while (i < 6) { // Executes twice, since inner loop increments i each time through
17 for (int j = 0; j < 3; j++) { // Executes 3 times
18 num_total_iterations++;
22 gl_Position = piglit_vertex;
23 if (num_total_iterations == 6)
24 color = vec4(0.0, 1.0, 0.0, 1.0);
26 color = vec4(1.0, 0.0, 0.0, 1.0);
39 probe all rgba 0 1 0 1