summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-02-09 13:54:31 +0100
committerSamuel Pitoiset <[email protected]>2018-02-12 11:54:29 +0100
commite7373a64980cf9f3a8bb5c0e8c528b9596c2edb5 (patch)
tree0318c399de3f84bba2c2d51ac348419e184c44fd /src/amd
parent485346b05a6ab2791579219ef74809faf383a15c (diff)
ac/nir: drop nir_to_llvm_context from visit_var_atomic()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index f23805667cd..464fdc16091 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3910,16 +3910,16 @@ visit_load_local_invocation_index(struct ac_nir_context *ctx)
return LLVMBuildAdd(ctx->ac.builder, result, thread_id, "");
}
-static LLVMValueRef visit_var_atomic(struct nir_to_llvm_context *ctx,
+static LLVMValueRef visit_var_atomic(struct ac_nir_context *ctx,
const nir_intrinsic_instr *instr)
{
LLVMValueRef ptr, result;
- LLVMValueRef src = get_src(ctx->nir, instr->src[0]);
- ptr = build_gep_for_deref(ctx->nir, instr->variables[0]);
+ LLVMValueRef src = get_src(ctx, instr->src[0]);
+ ptr = build_gep_for_deref(ctx, instr->variables[0]);
if (instr->intrinsic == nir_intrinsic_var_atomic_comp_swap) {
- LLVMValueRef src1 = get_src(ctx->nir, instr->src[1]);
- result = LLVMBuildAtomicCmpXchg(ctx->builder,
+ LLVMValueRef src1 = get_src(ctx, instr->src[1]);
+ result = LLVMBuildAtomicCmpXchg(ctx->ac.builder,
ptr, src, src1,
LLVMAtomicOrderingSequentiallyConsistent,
LLVMAtomicOrderingSequentiallyConsistent,
@@ -3958,7 +3958,7 @@ static LLVMValueRef visit_var_atomic(struct nir_to_llvm_context *ctx,
return NULL;
}
- result = LLVMBuildAtomicRMW(ctx->builder, op, ptr, ac_to_integer(&ctx->ac, src),
+ result = LLVMBuildAtomicRMW(ctx->ac.builder, op, ptr, ac_to_integer(&ctx->ac, src),
LLVMAtomicOrderingSequentiallyConsistent,
false);
}
@@ -4472,7 +4472,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
case nir_intrinsic_var_atomic_xor:
case nir_intrinsic_var_atomic_exchange:
case nir_intrinsic_var_atomic_comp_swap:
- result = visit_var_atomic(ctx->nctx, instr);
+ result = visit_var_atomic(ctx, instr);
break;
case nir_intrinsic_interp_var_at_centroid:
case nir_intrinsic_interp_var_at_sample: