Module: Mesa Branch: main Commit: 949bc15ea510be9ad6d1565fa3dd069c0140950b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=949bc15ea510be9ad6d1565fa3dd069c0140950b
Author: Emma Anholt <[email protected]> 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15825> --- src/gallium/auxiliary/nir/nir_to_tgsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index f0033ef8a96..78e2eb6c14d 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -2024,7 +2024,7 @@ ntt_emit_image_load_store(struct ntt_compile *c, nir_intrinsic_instr *instr) if (dim == GLSL_SAMPLER_DIM_MS) { temp = ntt_temp(c); ntt_MOV(c, temp, coord); - ntt_MOV(c, ureg_writemask(temp, 1 << (is_array ? 3 : 2)), + ntt_MOV(c, ureg_writemask(temp, TGSI_WRITEMASK_W), ureg_scalar(ntt_get_src(c, instr->src[2]), TGSI_SWIZZLE_X)); coord = ureg_src(temp); }
