Wrong shader generated when running 2 dEQP case in a single run.
I can reproduce it with ToT code, as of today virglrenderer @d4eda099 qemu @bf8b024372 mesa (inside debian guest) @2631fd3b0bf5027
The test case is:
dEQP-GLES31.functional.tessellation.user_defined_io.per_patch_array.vertex_io_array_size_query.isolines
dEQP-GLES31.functional.tessellation.user_defined_io.per_patch_block.vertex_io_array_size_implicit.triangles
The strange thing is: If I just run them only one at one time, they both pass.
But if I put these 2 lines in 1 file named as bug.txt, and run deqp like this, deqp will hang inside guest and complain watch dog time out. While virglrender will complain that it can't compile a invalid shader. It looks like something should be "reset/clear" between these 2 tests but somehow it doesn't get "reset/clear"?
Here is the script to run deqp:
set -e
export DISPLAY=:0
export MESA=$HOME/mesa-master/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=$MESA:$LD_LIBRARY_PATH
export LIBGL_DRIVERS_PATH=$MESA/dri
cd $HOME/deqp/modules/gles31
./deqp-gles31 \
--deqp-caselist-file=$HOME/deqp/bug.txt --deqp-log-filename=$HOME/deqp/bug.qpa --deqp-gl-config-name=rgba8888d24s8ms0 --deqp-screen-rotation=unspecified --deqp-surface-type=window --deqp-watchdog=enable
Here is the output from virglrender:
vrend_compile_shader: context error reported 5 "deqp-gles31" Illegal shader 0
shader failed to compile
0:30(20): error: vector size mismatch for arithmetic operator
0:30(13): error: cannot construct `vec4' from a non-numeric data type
0:53(23): error: vector size mismatch for arithmetic operator
0:53(21): error: type mismatch
0:53(15): error: cannot construct `float' from a non-numeric data type
te: 75 GLSL:
1: #version 150
2: #extension GL_ARB_arrays_of_arrays : require
3: #extension GL_ARB_tessellation_shader : require
4: #extension GL_ARB_shader_bit_encoding : require
5: patch in vec4 tco_p0A0_f;
6: patch in vec4 tco_p1A1_f[3];
7: patch in vec2 tco_p4A0_3[4];
8: patch in vec4 tco_p8A2_f[8];
9: patch in vec4 tco_p16A0_f;
10: patch in vec4 tco_p17A0_f;
11: layout(triangles, equal_spacing, ccw) in;
12: out vec4 teo_g9A0_f;
13: out float teo_g10A0_1;
14: uniform float winsys_adjust_y;
15: out float tfout0;
16: vec4 temp0[6];
17: int addr0;
18: void main(void)
19: {
20: temp0[0].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
21: temp0[1].x = float(uintBitsToFloat(uint(equal(uvec4(floatBitsToUint( tco_p4A0_3[0] .xxxx)), uvec4(uvec4(ivec4(1,1,1,1)))).x) * uint(0xffffffff)));
22: if (any(bvec4(floatBitsToUint(temp0[1].xxxx)))) {
23: temp0[0].x = float((uintBitsToFloat(uvec4(1U,1U,1U,1U)).x));
24: }
25: if (any(bvec4(floatBitsToUint(temp0[1].xxxx)))) {
26: temp0[1].x = float(((vec4(1.6999999,1.6999999,1.6999999,1.6999999)).x));
27: temp0[1].y = float(((vec4(2.5,2.5,2.5,2.5)).y));
28: temp0[1].z = float(((vec4(3.3,3.3,3.3,3.3)).z));
29: temp0[1].w = float(((vec4(4.0999999,4.0999999,4.0999999,4.0999999)).w));
30: temp0[1] = vec4(((( tco_p4A0_3[1] ) + -temp0[1] )));
31: temp0[1] = vec4(( abs(temp0[1]) ));
32: temp0[1] = vec4(uintBitsToFloat(uvec4(lessThan(vec4( temp0[1] ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998))))) * uvec4(0xffffffff)));
33: temp0[2].zw = vec2(( temp0[1] .zw));
34: temp0[2].x = float(uintBitsToFloat((floatBitsToUint(temp0[1].xxxx) & floatBitsToUint(temp0[1].yyyy))).x);
35: temp0[2].y = float(uintBitsToFloat((floatBitsToUint(temp0[1].zzzz) & floatBitsToUint(temp0[1].wwww))).y);
36: temp0[1].x = float(uintBitsToFloat((floatBitsToUint(temp0[2].xxxx) & floatBitsToUint(temp0[2].yyyy))).x);
37: } else {
38: temp0[1].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
39: }
40: temp0[2].x = float(( temp0[1].xxxx .x));
41: temp0[3].x = float(((vec4(2.0999999,2.0999999,2.0999999,2.0999999)).x));
42: if (any(bvec4(floatBitsToUint(temp0[1].xxxx)))) {
43: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
44: }
45: temp0[1].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
46: do {
47: temp0[4].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[1].xxxx)), ivec4((ivec4(2,2,2,2)))).x) * uint(0xffffffff)));
48: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
49: break;
50: }
51: if (any(bvec4(floatBitsToUint(temp0[2].xxxx)))) {
52: addr0 = int(floatBitsToInt(temp0[1].xxxx));
53: temp0[4].x = float(((( tco_p4A0_3[addr0 + 2] ) + -temp0[3].xxxx )).x);
54: temp0[4].x = float(( abs(temp0[4]).xxxx .x));
55: temp0[4].x = float(uintBitsToFloat(uint(lessThan(vec4( temp0[4].xxxx ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998)))).x) * uint(0xffffffff)));
56: } else {
57: temp0[4].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
58: }
59: temp0[2].x = float(( temp0[4].xxxx .x));
60: temp0[3].x = float((( temp0[3].xxxx + (vec4(0.40000001,0.40000001,0.40000001,0.40000001)))).x);
61: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
62: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
63: }
64: temp0[1].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[1].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
65: } while(true);
66: temp0[1].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
67: do {
68: temp0[4].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[1].xxxx)), ivec4((ivec4(3,3,3,3)))).x) * uint(0xffffffff)));
69: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
70: break;
71: }
72: if (any(bvec4(floatBitsToUint(temp0[2].xxxx)))) {
73: addr0 = int(floatBitsToInt(temp0[1].xxxx));
74: temp0[4].x = float(((( tco_p1A1_f[addr0 + 0] .xxxx) + -temp0[3].xxxx )).x);
75: temp0[4].x = float(( abs(temp0[4]).xxxx .x));
76: temp0[4].x = float(uintBitsToFloat(uint(lessThan(vec4( temp0[4].xxxx ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998)))).x) * uint(0xffffffff)));
77: } else {
78: temp0[4].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
79: }
80: temp0[2].x = float(( temp0[4].xxxx .x));
81: temp0[3].x = float((( temp0[3].xxxx + (vec4(0.40000001,0.40000001,0.40000001,0.40000001)))).x);
82: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
83: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
84: }
85: temp0[1].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[1].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
86: } while(true);
87: temp0[1].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
88: do {
89: temp0[4].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[1].xxxx)), ivec4((ivec4(2,2,2,2)))).x) * uint(0xffffffff)));
90: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
91: break;
92: }
93: if (any(bvec4(floatBitsToUint(temp0[2].xxxx)))) {
94: temp0[4] = vec4(uintBitsToFloat((uvec4(floatBitsToUint(temp0[1].xxxx)) * uvec4(uvec4(ivec4(4,4,4,4))))));
95: temp0[5].x = float(intBitsToFloat(ivec4( temp0[3].xxxx )).x);
96: addr0 = int(floatBitsToInt(temp0[4].xxxx));
97: addr0 = int(floatBitsToInt(temp0[4].xxxx));
98: temp0[4].x = float(uintBitsToFloat(uint(equal(uvec4(floatBitsToUint( tco_p8A2_f[addr0 + 0] .xxxx)), uvec4(floatBitsToUint(temp0[5].xxxx))).x) * uint(0xffffffff)));
99: } else {
100: temp0[4].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
101: }
102: temp0[3].x = float((( temp0[3].xxxx + (vec4(0.40000001,0.40000001,0.40000001,0.40000001)))).x);
103: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
104: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
105: }
106: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
107: temp0[4].x = float(( temp0[3].xxxx .x));
108: temp0[5].x = float((( temp0[3].xxxx + (vec4(0.80000001,0.80000001,0.80000001,0.80000001)))).x);
109: temp0[4].y = float(( temp0[5].xxxx .y));
110: temp0[5].x = float((( temp0[3].xxxx + (vec4(1.6,1.6,1.6,1.6)))).x);
111: temp0[4].z = float(( temp0[5].xxxx .z));
112: temp0[5].x = float((( temp0[3].xxxx + (vec4(2.4000001,2.4000001,2.4000001,2.4000001)))).x);
113: temp0[4].w = float(( temp0[5].xxxx .w));
114: temp0[5].x = float(uintBitsToFloat((uvec4(floatBitsToUint(temp0[1].xxxx)) * uvec4(uvec4(ivec4(4,4,4,4))))).x);
115: addr0 = int(floatBitsToInt(temp0[5].xxxx));
116: temp0[4] = vec4(((( tco_p8A2_f[addr0 + 1] ) + -temp0[4] )));
117: temp0[4] = vec4(( abs(temp0[4]) ));
118: temp0[4] = vec4(uintBitsToFloat(uvec4(lessThan(vec4( temp0[4] ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998))))) * uvec4(0xffffffff)));
119: temp0[5].zw = vec2(( temp0[4] .zw));
120: temp0[5].x = float(uintBitsToFloat((floatBitsToUint(temp0[4].xxxx) & floatBitsToUint(temp0[4].yyyy))).x);
121: temp0[5].y = float(uintBitsToFloat((floatBitsToUint(temp0[4].zzzz) & floatBitsToUint(temp0[4].wwww))).y);
122: temp0[4].x = float(uintBitsToFloat((floatBitsToUint(temp0[5].xxxx) & floatBitsToUint(temp0[5].yyyy))).x);
123: } else {
124: temp0[4].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
125: }
126: temp0[2].x = float(( temp0[4].xxxx .x));
127: temp0[3].x = float((( temp0[3].xxxx + (vec4(0.40000001,0.40000001,0.40000001,0.40000001)))).x);
128: if (any(bvec4(floatBitsToUint(temp0[4].xxxx)))) {
129: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
130: }
131: temp0[4].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
132: do {
133: temp0[5].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[4].xxxx)), ivec4((ivec4(2,2,2,2)))).x) * uint(0xffffffff)));
134: if (any(bvec4(floatBitsToUint(temp0[5].xxxx)))) {
135: break;
136: }
137: if (any(bvec4(floatBitsToUint(temp0[2].xxxx)))) {
138: temp0[5].x = float(uintBitsToFloat((uvec4(floatBitsToUint(temp0[1].xxxx)) * uvec4(uvec4(ivec4(4,4,4,4))))).x);
139: temp0[5] = vec4(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[4].xxxx)) + uvec4(floatBitsToUint(temp0[5].xxxx))))));
140: addr0 = int(floatBitsToInt(temp0[5].xxxx));
141: temp0[5].x = float(((( tco_p8A2_f[addr0 + 2] ) + -temp0[3].xxxx )).x);
142: temp0[5].x = float(( abs(temp0[5]).xxxx .x));
143: temp0[5].x = float(uintBitsToFloat(uint(lessThan(vec4( temp0[5].xxxx ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998)))).x) * uint(0xffffffff)));
144: } else {
145: temp0[5].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
146: }
147: temp0[2].x = float(( temp0[5].xxxx .x));
148: temp0[3].x = float((( temp0[3].xxxx + (vec4(0.40000001,0.40000001,0.40000001,0.40000001)))).x);
149: if (any(bvec4(floatBitsToUint(temp0[5].xxxx)))) {
150: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
151: }
152: temp0[4].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[4].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
153: } while(true);
154: temp0[1].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[1].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
155: } while(true);
156: if (any(bvec4(floatBitsToUint(temp0[2].xxxx)))) {
157: temp0[1].x = float((((tco_p0A0_f.xxxx) + -temp0[3].xxxx )).x);
158: temp0[1].x = float(( abs(temp0[1]).xxxx .x));
159: temp0[1].x = float(uintBitsToFloat(uint(lessThan(vec4( temp0[1].xxxx ), vec4((vec4(0.0099999998,0.0099999998,0.0099999998,0.0099999998)))).x) * uint(0xffffffff)));
160: } else {
161: temp0[1].x = float((uintBitsToFloat(uvec4(0U,0U,0U,0U)).x));
162: }
163: if (any(bvec4(floatBitsToUint(temp0[1].xxxx)))) {
164: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4((uvec4(1U,1U,1U,1U)))))).x);
165: }
166: temp0[2].zw = vec2(((vec4(1,1,0,1)).zw));
167: temp0[2].xy = vec2(((vec4(gl_TessCoord.x, gl_TessCoord.y, gl_TessCoord.y, gl_TessCoord.y)) * (tco_p17A0_f.xyyy) + (tco_p16A0_f.xyyy)).xy);
168: if (any(bvec4(floatBitsToUint(temp0[1].xxxx)))) {
169: temp0[1] = vec4(((vec4(0,1,0,1))));
170: } else {
171: temp0[1] = vec4(((vec4(1,0,0,1))));
172: }
173: gl_Position = vec4(( temp0[2] ));
174: teo_g9A0_f = vec4(( temp0[1] ));
175: teo_g10A0_1 = float(( temp0[0].xxxx .x));
176: tfout0 = float(teo_g10A0_1);
177: gl_Position.y = gl_Position.y * winsys_adjust_y;
178: }
vrend_report_buffer_error: context error reported 5 "deqp-gles31" Illegal command buffer 94766081