Mesa (master): ac/nir: Account for compact array index in GS input load from LDS.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Sat Oct 21 20:33:28 UTC 2017


Module: Mesa
Branch: master
Commit: ad727b96b650a8223f9853f1cde8353f4bf83c06
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad727b96b650a8223f9853f1cde8353f4bf83c06

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sat Oct 21 22:00:37 2017 +0200

ac/nir: Account for compact array index in GS input load from LDS.

Mirrors the vram path.

Fixes: d4ecc3c9299 'ac/nir: Add loading from LDS for merged GS.'
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/common/ac_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index ca856bb2f9..83b49b535c 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3011,7 +3011,7 @@ load_gs_input(struct nir_to_llvm_context *ctx,
 		if (ctx->ac.chip_class >= GFX9) {
 			LLVMValueRef dw_addr = ctx->gs_vtx_offset[vtx_offset_param];
 			dw_addr = LLVMBuildAdd(ctx->ac.builder, dw_addr,
-			                       LLVMConstInt(ctx->ac.i32, param * 4 + i, 0), "");
+			                       LLVMConstInt(ctx->ac.i32, param * 4 + i + const_index, 0), "");
 			value[i] = lds_load(ctx, dw_addr);
 		} else {
 			args[0] = ctx->esgs_ring;




More information about the mesa-commit mailing list