From: Bas Nieuwenhuizen Date: Wed, 30 Nov 2016 23:32:41 +0000 (+0100) Subject: ac/nir: Only use the first component for SSBO atomics. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92d7563fba04219a0a96a4949182b1f94b6d79b0;p=mesa.git ac/nir: Only use the first component for SSBO atomics. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Dave Airlie --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 6b91e93f3cb..ec1ba9e55b3 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1952,9 +1952,9 @@ static LLVMValueRef visit_atomic_ssbo(struct nir_to_llvm_context *ctx, ctx->shader_info->fs.writes_memory = true; if (instr->intrinsic == nir_intrinsic_ssbo_atomic_comp_swap) { - params[arg_count++] = get_src(ctx, instr->src[3]); + params[arg_count++] = llvm_extract_elem(ctx, get_src(ctx, instr->src[3]), 0); } - params[arg_count++] = get_src(ctx, instr->src[2]); + params[arg_count++] = llvm_extract_elem(ctx, get_src(ctx, instr->src[2]), 0); params[arg_count++] = get_src(ctx, instr->src[0]); params[arg_count++] = LLVMConstInt(ctx->i32, 0, false); /* vindex */ params[arg_count++] = get_src(ctx, instr->src[1]); /* voffset */