diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-06-24 18:40:17 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-05 12:33:56 +0200 |
commit | 81bbd5f149ae1c4a1a05e76e8a709af118376cd5 (patch) | |
tree | bb5bde7a1f06866e0b34a5afb136b2d662a04a81 | |
parent | c6ac4f4bb922eaf0b85021634b134794cd05e92b (diff) |
ac/nir: pass ac_nir_context to emit_discard_if
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index d20b0fa794..bb314cb996 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3596,18 +3596,18 @@ static void emit_barrier(struct nir_to_llvm_context *ctx) ctx->voidt, NULL, 0, AC_FUNC_ATTR_CONVERGENT); } -static void emit_discard_if(struct nir_to_llvm_context *ctx, +static void emit_discard_if(struct ac_nir_context *ctx, const nir_intrinsic_instr *instr) { LLVMValueRef cond; - cond = LLVMBuildICmp(ctx->builder, LLVMIntNE, - get_src(ctx->nir, instr->src[0]), - ctx->i32zero, ""); + cond = LLVMBuildICmp(ctx->ac.builder, LLVMIntNE, + get_src(ctx, instr->src[0]), + ctx->ac.i32_0, ""); - cond = LLVMBuildSelect(ctx->builder, cond, - LLVMConstReal(ctx->f32, -1.0f), - ctx->f32zero, ""); + cond = LLVMBuildSelect(ctx->ac.builder, cond, + LLVMConstReal(ctx->ac.f32, -1.0f), + ctx->ac.f32_0, ""); ac_build_kill(&ctx->ac, cond); } @@ -4064,7 +4064,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx, NULL, 0, AC_FUNC_ATTR_LEGACY); break; case nir_intrinsic_discard_if: - emit_discard_if(ctx->nctx, instr); + emit_discard_if(ctx, instr); break; case nir_intrinsic_memory_barrier: emit_waitcnt(ctx->nctx, VM_CNT); |