Mesa (main): zink: handle bare matrix types in xfb emission

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 15 17:48:35 UTC 2022


Module: Mesa
Branch: main
Commit: 76cc51986682bae97ef0356fd65b4f54e7d48132
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=76cc51986682bae97ef0356fd65b4f54e7d48132

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jul  7 14:08:09 2022 -0400

zink: handle bare matrix types in xfb emission

these have no inherent slot index since they aren't block members

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>

---

 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;



More information about the mesa-commit mailing list