From: Timur Kristóf Date: Fri, 6 Mar 2020 12:02:03 +0000 (+0200) Subject: aco: Implement memory_barrier_tcs_patch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa5eed673c42cfd20bb49410e10c78b46e405590;p=mesa.git aco: Implement memory_barrier_tcs_patch. 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: --- 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)));