From 70d375100c1c42cae5cd3892d595e50d887b3979 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Tue, 27 Sep 2022 20:10:37 +0200 Subject: [PATCH] ac/llvm: fix load/store_shared for vectors with more than 4 elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Karol Herbst Reviewed-by: Marek Olšák Part-of: --- src/amd/llvm/ac_nir_to_llvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 08140c1..cdb758c 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -3068,7 +3068,7 @@ static LLVMValueRef visit_first_invocation(struct ac_nir_context *ctx) static LLVMValueRef visit_load_shared(struct ac_nir_context *ctx, const nir_intrinsic_instr *instr) { - LLVMValueRef values[4], derived_ptr, index, ret; + LLVMValueRef values[16], derived_ptr, index, ret; unsigned const_off = nir_intrinsic_base(instr); LLVMTypeRef elem_type = LLVMIntTypeInContext(ctx->ac.context, instr->dest.ssa.bit_size); @@ -3096,7 +3096,7 @@ static void visit_store_shared(struct ac_nir_context *ctx, const nir_intrinsic_i LLVMValueRef src = get_src(ctx, instr->src[0]); int writemask = nir_intrinsic_write_mask(instr); - for (int chan = 0; chan < 4; chan++) { + for (int chan = 0; chan < 16; chan++) { if (!(writemask & (1 << chan))) { continue; } -- 2.7.4