From d75f0d6c26c7e5202552219f8d0bf9253ca24dfc Mon Sep 17 00:00:00 2001 From: Ganesh Belgur Ramachandra Date: Mon, 27 Feb 2023 04:30:33 -0600 Subject: [PATCH] ac/nir: fix CDNA image lowering for array textures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The x,y coordinates were not added. Reviewed-by: Marek Olšák Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_nir_lower_image_opcodes_cdna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_lower_image_opcodes_cdna.c b/src/amd/common/ac_nir_lower_image_opcodes_cdna.c index b29b3e8..4428636 100644 --- a/src/amd/common/ac_nir_lower_image_opcodes_cdna.c +++ b/src/amd/common/ac_nir_lower_image_opcodes_cdna.c @@ -94,7 +94,7 @@ static nir_ssa_def *lower_image_coords(nir_builder *b, nir_ssa_def *desc, nir_ss } if (z) { nir_ssa_def *slice_elements = nir_channel(b, desc, 7); - index = nir_imul(b, slice_elements, z); + index = nir_iadd(b, index, nir_imul(b, slice_elements, z)); } /* Determine whether the coordinates are out of bounds. */ -- 2.7.4