From 76cc51986682bae97ef0356fd65b4f54e7d48132 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 7 Jul 2022 14:08:09 -0400 Subject: [PATCH] zink: handle bare matrix types in xfb emission these have no inherent slot index since they aren't block members Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index abcf971857f..1557475f364 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -1491,7 +1491,7 @@ emit_so_outputs(struct ntv_context *ctx, /* this is the type being indexed into */ const struct glsl_type *bare_type = glsl_without_array(out_type); /* this is the array index into matrix types */ - unsigned matrix_offset = so_output.register_index; + unsigned matrix_offset = glsl_type_is_matrix(bare_type) ? 0 : so_output.register_index; do { if (glsl_type_is_struct_or_ifc(bare_type)) { uint32_t base_slot = (location & ~so_output.start_component) / 4;