[Mesa-dev] [PATCH 03/61] radeonsi/gfx9: fix 1D array shader images

Marek Olšák maraeo at gmail.com
Mon Apr 24 08:45:00 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

Cc: 17.1 <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_shader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 5d7175d..c5c994d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3418,20 +3418,21 @@ static LLVMValueRef image_fetch_coords(
 	}
 
 	/* 1D textures are allocated and used as 2D on GFX9. */
 	if (ctx->screen->b.chip_class >= GFX9) {
 		if (target == TGSI_TEXTURE_1D) {
 			coords[1] = ctx->i32_0;
 			num_coords++;
 		} else if (target == TGSI_TEXTURE_1D_ARRAY) {
 			coords[2] = coords[1];
 			coords[1] = ctx->i32_0;
+			num_coords++;
 		}
 	}
 
 	if (num_coords == 1)
 		return coords[0];
 
 	if (num_coords == 3) {
 		/* LLVM has difficulties lowering 3-element vectors. */
 		coords[3] = bld_base->uint_bld.undef;
 		num_coords = 4;
-- 
2.7.4



More information about the mesa-dev mailing list