1 # This tests that we do not unroll a loop in error thinking we know the max
2 # trip count due to the induction variable being uint. i.e The max trip count
3 # here is 4294967295 with this test we are making sure the compiler doesn't
4 # mistakenly think the trip count is 4.
11 uniform uint induction_init;
15 gl_Position = gl_Vertex;
17 vec4 colour = vec4(1.0, 1.0, 1.0, 1.0);
18 vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0);
21 uint i = induction_init;
25 colour = vec4(1.0, 0.0, 0.0, 1.0);
32 colour = vec4(0.0, 1.0, 0.0, 1.0);
38 gl_FrontColor = colour + colour2;
44 gl_FragColor = gl_Color;
48 clear color 0.5 0.5 0.5 0.5
52 # induction_init equivalent to starting at int -5
53 uniform uint induction_init 4294967291
55 probe all rgba 1.0 0.0 0.0 1.0
57 # induction_init equivalent to starting at int -3
58 uniform uint induction_init 4294967293
60 probe all rgba 0.0 1.0 0.0 1.0
62 uniform uint induction_init 0
64 probe all rgba 1.0 1.0 1.0 1.0