From: Samuel Pitoiset Date: Tue, 21 Jul 2020 08:44:29 +0000 (+0200) Subject: aco: add support for nir_intrinsic_shared_atomic_fadd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7615f2d6900f44030a4b2cd6504a0bae79642c59;p=mesa.git aco: add support for nir_intrinsic_shared_atomic_fadd Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 8e9d6bff892..3145f719b46 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -6793,6 +6793,12 @@ void visit_shared_atomic(isel_context *ctx, nir_intrinsic_instr *instr) op64_rtn = aco_opcode::ds_cmpst_rtn_b64; num_operands = 4; break; + case nir_intrinsic_shared_atomic_fadd: + op32 = aco_opcode::ds_add_f32; + op32_rtn = aco_opcode::ds_add_rtn_f32; + op64 = aco_opcode::num_opcodes; + op64_rtn = aco_opcode::num_opcodes; + break; default: unreachable("Unhandled shared atomic intrinsic"); } @@ -7448,6 +7454,7 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr) case nir_intrinsic_shared_atomic_xor: case nir_intrinsic_shared_atomic_exchange: case nir_intrinsic_shared_atomic_comp_swap: + case nir_intrinsic_shared_atomic_fadd: visit_shared_atomic(ctx, instr); break; case nir_intrinsic_image_deref_load: diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index a4901c1c06e..f557364239a 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -773,6 +773,7 @@ void init_context(isel_context *ctx, nir_shader *shader) case nir_intrinsic_shared_atomic_xor: case nir_intrinsic_shared_atomic_exchange: case nir_intrinsic_shared_atomic_comp_swap: + case nir_intrinsic_shared_atomic_fadd: case nir_intrinsic_load_scratch: case nir_intrinsic_load_invocation_id: case nir_intrinsic_load_primitive_id: