1 # This tests a bug in the r300 compiler where it was too aggressive
2 # with optimizations (copy propagation) of movs in loops.
4 # See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6467
9 uniform int loop_count;
14 gl_Position = gl_Vertex;
16 vec4 colour = vec4(1.0, 1.0, 1.0, 1.0);
17 for (int i = 0; i < loop_count; i++) {
20 colour = vec4(1.0, 0.0, 0.0, 1.0);
24 colour = vec4(0.0, 1.0, 0.0, 1.0);
30 gl_FrontColor = colour;
36 gl_FragColor = gl_Color;
40 clear color 0.5 0.5 0.5 0.5
43 uniform int loop_count 3
45 probe all rgba 1.0 0.0 0.0 1.0
47 uniform int loop_count 2
49 probe all rgba 0.0 1.0 0.0 1.0
51 uniform int loop_count 1
53 probe all rgba 0.0 1.0 0.0 1.0
55 uniform int loop_count 0
57 probe all rgba 1.0 1.0 1.0 1.0