diff options
author | Timothy Arceri <[email protected]> | 2018-02-09 10:37:25 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-09 12:51:27 +1100 |
commit | c77078c942f210a44d5017b4798d1be50352c15f (patch) | |
tree | 01890330bdfd91d4e8871ac86617d73094d6c4ba /src/amd/common | |
parent | 12fd567c78c66b136b5c67782be754790951a560 (diff) |
ac: pass struct ac_llvm_context to emit_membar()
Fixes segfault in piglit test:
./bin/arb_shader_image_load_store-shader-mem-barrier --quick -auto -fbo
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 2329016ac68..60276c1d410 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3817,7 +3817,7 @@ static LLVMValueRef visit_image_size(struct ac_nir_context *ctx, #define LGKM_CNT 0x07f #define VM_CNT 0xf70 -static void emit_membar(struct nir_to_llvm_context *ctx, +static void emit_membar(struct ac_llvm_context *ac, const nir_intrinsic_instr *instr) { unsigned waitcnt = NOOP_WAITCNT; @@ -3839,7 +3839,7 @@ static void emit_membar(struct nir_to_llvm_context *ctx, break; } if (waitcnt != NOOP_WAITCNT) - ac_build_waitcnt(&ctx->ac, waitcnt); + ac_build_waitcnt(ac, waitcnt); } static void emit_barrier(struct ac_llvm_context *ac, gl_shader_stage stage) @@ -4438,7 +4438,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx, case nir_intrinsic_memory_barrier_buffer: case nir_intrinsic_memory_barrier_image: case nir_intrinsic_memory_barrier_shared: - emit_membar(ctx->nctx, instr); + emit_membar(&ctx->ac, instr); break; case nir_intrinsic_barrier: emit_barrier(&ctx->ac, ctx->stage); |