arb_program_interface_query: set vs_input2[1][0] as valid name
[piglit.git] / tests / spec / glsl-1.30 / execution / fs-loop-cont-else-bug.shader_test
blobf66c95e66b1bf230958fb23a44bc2b7691f7a2d1
1 # This test used to create bad LLVM IR in radeonsi.
3 # Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97887
5 [require]
6 GLSL >= 1.30
8 [vertex shader passthrough]
10 [fragment shader]
11 #version 130
13 uniform int initial;
15 void main() {
16         int idx = 0;
17         int x = initial;
19         for (;;) {
20                 idx++;
21                 if (idx >= 3)
22                         break;
24                 if (x % 2 == 0) {
25                         x = x / 2;
26                         if (x == 18)
27                                 break;
28                         continue;
29                 } else {
30                         x = x * 3;
31                 }
32                 x++;
33         }
35         gl_FragColor = vec4(0.0, (x % 4) * 0.25, 0.0, 1.0);
38 [test]
39 clear color 1.0 0.0 0.0 1.0
40 clear
42 uniform int initial 7
43 draw rect -1 -1 2 2
44 probe all rgba 0.0 0.75 0.0 1.0