zink: Avoid infinite loop finding no var in update_so_info.

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>
This commit is contained in:
Emma Anholt
2023-04-06 14:33:50 -07:00
committed by Marge Bot
parent efaffcfbd4
commit e5008acf13
4 changed files with 13 additions and 0 deletions

View 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

View 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

View 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

View 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) {