From aa5eed673c42cfd20bb49410e10c78b46e405590 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Fri, 6 Mar 2020 14:02:03 +0200 Subject: [PATCH] aco: Implement memory_barrier_tcs_patch. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit TCS outputs are going to be written to LDS, so it has to use memory_barrier_shared in order to ensure that it waits for LDS writes. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 069f3d24f62..0e8624cf51c 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -5414,6 +5414,7 @@ void emit_memory_barrier(isel_context *ctx, nir_intrinsic_instr *instr) { case nir_intrinsic_memory_barrier_image: bld.barrier(aco_opcode::p_memory_barrier_image); break; + case nir_intrinsic_memory_barrier_tcs_patch: case nir_intrinsic_memory_barrier_shared: bld.barrier(aco_opcode::p_memory_barrier_shared); break; @@ -6342,6 +6343,7 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr) break; } + case nir_intrinsic_memory_barrier_tcs_patch: case nir_intrinsic_group_memory_barrier: case nir_intrinsic_memory_barrier: case nir_intrinsic_memory_barrier_buffer: @@ -6349,8 +6351,6 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr) case nir_intrinsic_memory_barrier_shared: emit_memory_barrier(ctx, instr); break; - case nir_intrinsic_memory_barrier_tcs_patch: - break; case nir_intrinsic_load_num_work_groups: { Temp dst = get_ssa_temp(ctx, &instr->dest.ssa); bld.copy(Definition(dst), Operand(get_arg(ctx, ctx->args->ac.num_work_groups))); -- 2.30.2