From a57dba530cad150e312a18a68a1807ead0e018b5 Mon Sep 17 00:00:00 2001 From: "Randall C. O'Reilly" Date: Sat, 4 Feb 2023 21:47:08 -0800 Subject: [PATCH] add support for OpAtomicFAddEXT atomic add on float types, now avail in metal 3.0 --- spirv_msl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spirv_msl.cpp b/spirv_msl.cpp index 5f4c0add..46e94586 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -1856,6 +1856,7 @@ void CompilerMSL::extract_global_variables_from_function(uint32_t func_id, std:: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: + case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: @@ -8593,6 +8594,7 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) break; case OpAtomicIAdd: + case OpAtomicFAddEXT: MSL_AFMO(add); break; @@ -16300,6 +16302,7 @@ bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, ui case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: + case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: @@ -16505,6 +16508,7 @@ CompilerMSL::SPVFuncImpl CompilerMSL::OpCodePreprocessor::get_spv_func_impl(Op o case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: + case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: