zink: Avoid infinite loop finding no var in update_so_info.
authorEmma Anholt <emma@anholt.net>
Thu, 6 Apr 2023 21:33:50 +0000 (14:33 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Apr 2023 19:16:23 +0000 (19:16 +0000)
Fixes timeouts in CI for
spec@glsl-1.50@execution@interface-blocks-api-access-members where we've
got a GS with SO outputs and no vars declared, by asserting that something
has gone horribly wrong instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22348>

src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt
src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt
src/gallium/drivers/zink/zink_compiler.c

index e9c7935..52e3bf5 100644 (file)
@@ -690,6 +690,9 @@ spec@ext_transform_feedback@tessellation triangle_fan flat_first,Fail
 spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
 spec@ext_transform_feedback@tessellation quads wireframe,Fail
 
+# ../src/gallium/drivers/zink/zink_compiler.c:1684: find_var_with_location_frac: Assertion `(int)location > 0' failed.
+spec@glsl-1.50@execution@interface-blocks-api-access-members,Crash
+
 spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail
 spec@glsl-1.50@execution@primitive-id-no-gs-quads,Fail
 
index 1e2c4a9..ec09a9d 100644 (file)
@@ -247,6 +247,10 @@ spec@glsl-1.10@execution@loops@glsl-vs-unroll-explosion,Crash
 spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-clamp-z,Fail
 
 spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
+
+# ../src/gallium/drivers/zink/zink_compiler.c:1684: find_var_with_location_frac: Assertion `(int)location > 0' failed.
+spec@glsl-1.50@execution@interface-blocks-api-access-members,Crash
+
 spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail
 spec@glsl-4.00@execution@conversion@frag-conversion-explicit-dmat2-mat2,Fail
 spec@glsl-4.00@execution@conversion@frag-conversion-explicit-dmat2x3-mat2x3,Fail
index 34bb878..a1c8dd2 100644 (file)
@@ -246,6 +246,10 @@ spec@glsl-1.10@execution@loops@glsl-vs-unroll-explosion,Crash
 spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-clamp-z,Fail
 
 spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
+
+# ../src/gallium/drivers/zink/zink_compiler.c:1684: find_var_with_location_frac: Assertion `(int)location > 0' failed.
+spec@glsl-1.50@execution@interface-blocks-api-access-members,Crash
+
 spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail
 spec@glsl-4.00@execution@conversion@frag-conversion-explicit-dmat2-mat2,Fail
 spec@glsl-4.00@execution@conversion@frag-conversion-explicit-dmat2x3-mat2x3,Fail
index 28dd6dc..0d35df6 100644 (file)
@@ -1684,6 +1684,8 @@ check_psiz(struct nir_shader *s)
 static nir_variable *
 find_var_with_location_frac(nir_shader *nir, unsigned location, unsigned location_frac, bool have_psiz)
 {
+   assert((int)location >= 0);
+
    unsigned found = 0;
    if (!location_frac && location != VARYING_SLOT_PSIZ) {
       nir_foreach_shader_out_variable(var, nir) {