1 # This test unrolling of a loop with two exit points where the trip count
2 # of both exits is unknown but we can estimate loop length via array access.
3 # Here the exits have a phi between them via the results of "x" this tests
4 # loop unrolling skip unrolling or handles this phi correctly when unrolled.
9 uniform int loop_count;
12 uniform float stops[18];
16 gl_Position = gl_Vertex;
18 vec4 colour = vec4(1.0, 1.0, 1.0, 1.0);
22 for (i = 0; i < n_stop - 1; i++) {
30 colour = vec4(0.0, 1.0, 0.0, 1.0);
32 colour = vec4(1.0, 0.0, 0.0, 1.0);
34 colour = vec4(0.0, 0.0, 1.0, 1.0);
36 gl_FrontColor = colour;
42 gl_FragColor = gl_Color;
46 clear color 0.5 0.5 0.5 0.5
49 uniform float stops[0] 1.0
51 probe all rgba 0.0 1.0 0.0 1.0
54 uniform float stops[0] 0.0
55 uniform float stops[1] 1.0
57 probe all rgba 1.0 0.0 0.0 1.0
60 uniform float stops[0] 0.0
61 uniform float stops[1] 1.0
63 probe all rgba 1.0 0.0 0.0 1.0
66 uniform float stops[0] 0.0
67 uniform float stops[1] 0.0
68 uniform float stops[2] 1.0
70 probe all rgba 0.0 0.0 1.0 1.0
73 uniform float stops[0] 0.0
74 uniform float stops[1] 0.0
75 uniform float stops[2] 0.0
77 probe all rgba 0.0 0.0 1.0 1.0
80 uniform float stops[0] 0.0
81 uniform float stops[1] 0.0
82 uniform float stops[2] 0.0
83 uniform float stops[2] 0.0
85 probe all rgba 1.0 1.0 1.0 1.0