mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
radv/ac: Fix shared memory offset calculation
The index passed to get_shared_memory_ptr is an attribute slot index,
i.e. the index of a vec4 within LDS. Therefore this must be scaled by
sizeof(vec4) to give the LDS byte offset.
Fixes: f4e499ec79 ("radv: add initial non-conformant radv vulkan driver")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
e88cac1df0
commit
ce4058dafd
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ static LLVMValueRef get_shared_memory_ptr(struct nir_to_llvm_context *ctx,
|
|||
LLVMValueRef ptr;
|
||||
int addr_space;
|
||||
|
||||
offset = LLVMConstInt(ctx->i32, idx, false);
|
||||
offset = LLVMConstInt(ctx->i32, idx * 16, false);
|
||||
|
||||
ptr = ctx->shared_memory;
|
||||
ptr = LLVMBuildGEP(ctx->builder, ptr, &offset, 1, "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue