ac/nir: fix CDNA image lowering for array textures

The x,y coordinates were not added.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22158>
This commit is contained in:
Ganesh Belgur Ramachandra
2023-02-27 04:30:33 -06:00
committed by Marge Bot
parent eaf98b1422
commit d75f0d6c26
@@ -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. */