ntt: handle the image intrinsic range_base when translating to TGSI
authorGert Wollny <gert.wollny@collabora.com>
Thu, 24 Nov 2022 12:23:50 +0000 (13:23 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 Jan 2023 13:19:04 +0000 (13:19 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19980>

src/gallium/auxiliary/nir/nir_to_tgsi.c

index 08d19fc..bdc09a3 100644 (file)
@@ -2077,6 +2077,7 @@ ntt_emit_image_load_store(struct ntt_compile *c, nir_intrinsic_instr *instr)
    default:
       resource = ntt_ureg_src_indirect(c, ureg_src_register(TGSI_FILE_IMAGE, 0),
                                        instr->src[0], 2);
+      resource.Index += nir_intrinsic_range_base(instr);
    }
 
    struct ureg_dst dst;