1 # This tests unrolling of a loop with two exit point where the trip count
2 # of one of the exits is known to be zero and the other unknown
3 # (loop_count uniform).
8 uniform int loop_count;
12 gl_Position = gl_Vertex;
13 /* Make sure that loop_count uniform live */
14 float one = float(loop_count == 0 || loop_count == 1);
16 vec4 colour = vec4(0.0, 1.0, 0.0, one);
18 for (int i = 0; i < 0; i++) {
19 colour = vec4(1.0, 0.0, 0.0, 1.0);
25 gl_FrontColor = colour;
31 gl_FragColor = gl_Color;
35 clear color 0.5 0.5 0.5 0.5
37 uniform int loop_count 1
39 probe all rgba 0.0 1.0 0.0 1.0
41 uniform int loop_count 0
43 probe all rgba 0.0 1.0 0.0 1.0