summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-03-14 05:41:53 +1000
committerJuan A. Suarez Romero <jasuarez@igalia.com>2018-03-28 16:51:20 +0200
commitf8569000542c929304572eb83e7fd240421b66c5 (patch)
tree5ea78c239114d330a32c55ee385e484b0b0b2a51
parent89c617cca9aef23dc69ace0d21382af59f87a6ea (diff)
radv: get correct offset into LDS for indexed vars.
This seems more correct to me, since if we have an array of floats they'll be vec4 aligned, and if we do af[2], we want the const index to increase by 2 slots in the non compact case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464 Fixes: 94f9591995 (radv/ac: add support for TCS/TES inputs/outputs.) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit f9de2d409bf4f068a99d358d592d96ab4803f7fb) [Juan A. Suarez: apply patch in ac_nir_to_llvm.c] Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Conflicts: src/amd/vulkan/radv_nir_to_llvm.c
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index a000a3c4be6..b696cb8a451 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2849,7 +2849,7 @@ get_dw_address(struct nir_to_llvm_context *ctx,
LLVMConstInt(ctx->i32, 4, false), ""), "");
else if (const_index && !compact_const_index)
dw_addr = LLVMBuildAdd(ctx->builder, dw_addr,
- LLVMConstInt(ctx->i32, const_index, false), "");
+ LLVMConstInt(ctx->i32, const_index * 4, false), "");
dw_addr = LLVMBuildAdd(ctx->builder, dw_addr,
LLVMConstInt(ctx->i32, param * 4, false), "");