From: Karol Herbst Date: Fri, 29 Sep 2023 08:53:53 +0000 (+0200) Subject: zink: fix load/store scratch offsets X-Git-Tag: upstream/23.3.3~791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=764851a24cd98e2f7d464c68bd43f6d03037312c;p=platform%2Fupstream%2Fmesa.git zink: fix load/store scratch offsets The offset is originally in bytes, so we have to handle it just like shared load/stores. Fixes: ddc5c304899 ("zink: handle global and scratch vars") Signed-off-by: Karol Herbst Reviewed-by: Mike Blumenkrantz Part-of: --- diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index d2061e492a9..7dd83c63d05 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -2044,6 +2044,7 @@ rewrite_bo_access_instr(nir_builder *b, nir_instr *instr, void *data) } return true; } + case nir_intrinsic_load_scratch: case nir_intrinsic_load_shared: b->cursor = nir_before_instr(instr); bool force_2x32 = intr->def.bit_size == 64 && !has_int64; @@ -2080,6 +2081,7 @@ rewrite_bo_access_instr(nir_builder *b, nir_instr *instr, void *data) } return true; } + case nir_intrinsic_store_scratch: case nir_intrinsic_store_shared: { b->cursor = nir_before_instr(instr); bool force_2x32 = nir_src_bit_size(intr->src[0]) == 64 && !has_int64;