From 8db2d6181bc15b4277c2fd48f944ca81e734546b Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 16 May 2023 10:43:41 +0800 Subject: [PATCH] ac/llvm: remove unused barrier implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit memory buffer barrier is still used when nir lowering, will be removed later. Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/amd/llvm/ac_nir_to_llvm.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 642bc29..c318502 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -3396,18 +3396,9 @@ static bool visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins case nir_intrinsic_demote_if: emit_demote(ctx, instr); break; - case nir_intrinsic_memory_barrier: - case nir_intrinsic_group_memory_barrier: - ac_build_waitcnt(&ctx->ac, AC_WAIT_LGKM | AC_WAIT_VLOAD | AC_WAIT_VSTORE); - break; case nir_intrinsic_memory_barrier_buffer: - case nir_intrinsic_memory_barrier_image: ac_build_waitcnt(&ctx->ac, AC_WAIT_VLOAD | AC_WAIT_VSTORE); break; - case nir_intrinsic_memory_barrier_shared: - case nir_intrinsic_memory_barrier_tcs_patch: - ac_build_waitcnt(&ctx->ac, AC_WAIT_LGKM); - break; case nir_intrinsic_scoped_barrier: { assert(!(nir_intrinsic_memory_semantics(instr) & (NIR_MEMORY_MAKE_AVAILABLE | NIR_MEMORY_MAKE_VISIBLE))); @@ -3427,14 +3418,6 @@ static bool visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins ac_build_s_barrier(&ctx->ac, ctx->stage); break; } - case nir_intrinsic_control_barrier: - /* If output patches are wholly in one wave, we don't need a barrier. */ - if (ctx->stage == MESA_SHADER_TESS_CTRL && - ctx->ac.wave_size % ctx->info->tess.tcs_vertices_out == 0) - break; - - ac_build_s_barrier(&ctx->ac, ctx->stage); - break; case nir_intrinsic_optimization_barrier_vgpr_amd: result = get_src(ctx, instr->src[0]); ac_build_optimization_barrier(&ctx->ac, &result, false); -- 2.7.4