diff options
author | Dave Airlie <[email protected]> | 2018-03-14 05:41:53 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-03-14 11:18:54 +1000 |
commit | f9de2d409bf4f068a99d358d592d96ab4803f7fb (patch) | |
tree | 29a6d19f17703fbea7c74222c377f680dd74cb89 /src | |
parent | 4e4428482e5eddd0427b9dcee39b60e0211d45b9 (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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_nir_to_llvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 056eb23ab6e..fccd97b6cfe 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -1239,7 +1239,7 @@ get_dw_address(struct radv_shader_context *ctx, LLVMConstInt(ctx->ac.i32, 4, false), ""), ""); else if (const_index && !compact_const_index) dw_addr = LLVMBuildAdd(ctx->ac.builder, dw_addr, - LLVMConstInt(ctx->ac.i32, const_index, false), ""); + LLVMConstInt(ctx->ac.i32, const_index * 4, false), ""); dw_addr = LLVMBuildAdd(ctx->ac.builder, dw_addr, LLVMConstInt(ctx->ac.i32, param * 4, false), ""); |