Piglit spec@glsl-1.50@execution@geometry failure with vtest
It seems like running the spec@glsl-1.50@execution@geometry
test from piglit hits a issue with the clip distance handling in the shader translation code on the host side.
Tests can be run with :
piglit-runner run --timeout 180 --profile gpu --output /tmp/piglit --piglit-folder /path/to/built/piglit -t spec@glsl-1.50@execution@geometry
This is what I see with vtest (snipped for brevity):
got error linking
error: definitions of interface block `gl_PerVertex' do not match
add_shader_program: context error reported 1 "tests/spec/glsl-1.50/execution/geometry/output-triangle-strip-o" Illegal shader 0
vs: 9 GLSL:
1: #version 150
2: in vec4 in_0;
3: out vec4 vso_g9A0_f;
4: uniform float winsys_adjust_y;
5: out gl_PerVertex {
6: vec4 gl_Position;
7: out float gl_ClipDistance[1];
8: };
9: vec4 clip_dist_temp[2];
10: vec4 temp0[2];
11: void main(void)
12: {
13: temp0[0].yzw = vec3(( temp0[1].zyzw .yzw));
14: temp0[0].x = float(((vec4(1,1,1,1)).x));
15: gl_Position = vec4(((in_0)));
16: vso_g9A0_f = vec4(((vec4(0,1,0,1))));
17: clip_dist_temp[0 ] = vec4(( temp0[0] ));
18: gl_ClipDistance[0] = clip_dist_temp[0].x;
19: }
gs: 11 GLSL:
1: #version 150
2: #extension GL_ARB_shader_bit_encoding : require
3: layout(triangles) in;
4: layout(triangle_strip, max_vertices = 3) out;
5: in vec4 vso_g9A0_f[3];
6: smooth out vec4 gso_g9A0_f;
7: uniform float winsys_adjust_y;
8: vec4 temp0[4];
9: int addr0;
10: int addr1;
11: void main(void)
12: {
13: temp0[0].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
14: do {
15: temp0[1].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[0].xxxx)), ivec4((ivec4(3,3,3,3)))).x) * uint(0xffffffff)));
16: if (bool(floatBitsToUint(temp0[1].xxxx).x)) {
17: break;
18: }
19: addr1 = int(floatBitsToInt(temp0[0].xxxx));
20: temp0[2] = vec4(((vec4(gl_in[addr1].gl_Position))));
21: addr1 = int(floatBitsToInt(temp0[0].xxxx));
22: temp0[3] = vec4(((vso_g9A0_f[addr1])));
23: gl_Position = vec4(( temp0[2] ));
24: gso_g9A0_f = vec4(( temp0[3] ));
25: gl_Position.y = gl_Position.y * winsys_adjust_y;
26: EmitVertex();
27: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
28: } while(true);
29: gl_Position = vec4(( temp0[2] ));
30: gso_g9A0_f = vec4(( temp0[3] ));
31: }
fs: 10 GLSL:
1: #version 140
2: smooth in vec4 gso_g9A0_f;
3: out vec4 fsout_c0;
4: void main(void)
5: {
6: fsout_c0 = vec4(((gso_g9A0_f)));
7: }
dropping rendering due to missing shaders: tests/spec/glsl-1.50/execution/geometry/output-triangle-strip-o
client failed: VTEST_CLIENT_ERROR_INPUT_READ
vtest_client_dispatch_commands: client context created.
gl_version 45 - core profile enabled
Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_ALPHA8)
Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_ALPHA16)
Illegal surface creation without bind flag
GLSL feature level 450
GLSL feature level 450
got error linking
error: definitions of interface block `gl_PerVertex' do not match
add_shader_program: context error reported 1 "tests/spec/glsl-1.50/execution/geometry/output-triangle-strip-o" Illegal shader 0
vs: 9 GLSL:
1: #version 150
2: in vec4 in_0;
3: out vec4 vso_g9A0_f;
4: uniform float winsys_adjust_y;
5: out gl_PerVertex {
6: vec4 gl_Position;
7: out float gl_ClipDistance[1];
8: };
9: vec4 clip_dist_temp[2];
10: vec4 temp0[2];
11: void main(void)
12: {
13: temp0[0].yzw = vec3(( temp0[1].zyzw .yzw));
14: temp0[0].x = float(((vec4(1,1,1,1)).x));
15: gl_Position = vec4(((in_0)));
16: vso_g9A0_f = vec4(((vec4(0,1,0,1))));
17: clip_dist_temp[0 ] = vec4(( temp0[0] ));
18: gl_ClipDistance[0] = clip_dist_temp[0].x;
19: }
gs: 11 GLSL:
1: #version 150
2: #extension GL_ARB_shader_bit_encoding : require
3: layout(triangles) in;
4: layout(triangle_strip, max_vertices = 3) out;
5: in vec4 vso_g9A0_f[3];
6: smooth out vec4 gso_g9A0_f;
7: uniform float winsys_adjust_y;
8: vec4 temp0[4];
9: int addr0;
10: int addr1;
11: void main(void)
12: {
13: temp0[0].x = float((intBitsToFloat(ivec4(0,0,0,0)).x));
14: do {
15: temp0[1].x = float(uintBitsToFloat(uint(greaterThanEqual(ivec4(floatBitsToInt(temp0[0].xxxx)), ivec4((ivec4(3,3,3,3)))).x) * uint(0xffffffff)));
16: if (bool(floatBitsToUint(temp0[1].xxxx).x)) {
17: break;
18: }
19: addr1 = int(floatBitsToInt(temp0[0].xxxx));
20: temp0[2] = vec4(((vec4(gl_in[addr1].gl_Position))));
21: addr1 = int(floatBitsToInt(temp0[0].xxxx));
22: temp0[3] = vec4(((vso_g9A0_f[addr1])));
23: gl_Position = vec4(( temp0[2] ));
24: gso_g9A0_f = vec4(( temp0[3] ));
25: gl_Position.y = gl_Position.y * winsys_adjust_y;
26: EmitVertex();
27: temp0[0].x = float(intBitsToFloat(ivec4((uvec4(floatBitsToUint(temp0[0].xxxx)) + uvec4(uvec4(ivec4(1,1,1,1)))))).x);
28: } while(true);
29: gl_Position = vec4(( temp0[2] ));
30: gso_g9A0_f = vec4(( temp0[3] ));
31: }
fs: 10 GLSL:
1: #version 140
2: smooth in vec4 gso_g9A0_f;
3: out vec4 fsout_c0;
4: void main(void)
5: {
6: fsout_c0 = vec4(((gso_g9A0_f)));
7: }
dropping rendering due to missing shaders: tests/spec/glsl-1.50/execution/geometry/output-triangle-strip-o
client failed: VTEST_CLIENT_ERROR_INPUT_READ
vtest_client_dispatch_commands: client context created.