Mesa (staging/22.0): nir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 20:00:54 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 890822029a3bf6be98da4392b3a1806de92bb533
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=890822029a3bf6be98da4392b3a1806de92bb533

Author: Emma Anholt <emma at anholt.net>
Date:   Tue Apr  5 10:05:37 2022 -0700

nir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.

It's always in .w, rather than being the next component after the
x/y/array index.

Fixes: c6d3fd8c21e0 ("gallium/ntt: Emit sample index when necessary for image load/store.")

Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15825>
(cherry picked from commit 949bc15ea510be9ad6d1565fa3dd069c0140950b)

Conflicts:
	src/gallium/auxiliary/nir/nir_to_tgsi.c

---

 .pick_status.json                       | 2 +-
 src/gallium/auxiliary/nir/nir_to_tgsi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 7af0e36073e..3807658a2ce 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -3452,7 +3452,7 @@
         "description": "nir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 5,
+        "resolution": 1,
         "because_sha": "c6d3fd8c21e06086e573be24ef3e28454245845f"
     },
     {
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c
index b2527a3e70b..ddd6dcdf7da 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -1592,7 +1592,7 @@ ntt_emit_image_load_store(struct ntt_compile *c, nir_intrinsic_instr *instr)
       if (dim == GLSL_SAMPLER_DIM_MS) {
          temp = ureg_DECL_temporary(c->ureg);
          ureg_MOV(c->ureg, temp, coord);
-         ureg_MOV(c->ureg, ureg_writemask(temp, 1 << (is_array ? 3 : 2)),
+         ureg_MOV(c->ureg, ureg_writemask(temp, TGSI_WRITEMASK_W),
                   ureg_scalar(ntt_get_src(c, instr->src[2]), TGSI_SWIZZLE_X));
          coord = ureg_src(temp);
       }



More information about the mesa-commit mailing list