From 492c7384bca4916cd8a03fbf709519612b0001ac Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 4 Apr 2018 13:59:43 +0200 Subject: [PATCH] [dxbc] Implemented ImmAtomicCmpExch and AtomicCmpStore --- src/dxbc/dxbc_compiler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 2f76b1822..cd1e674dc 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2026,6 +2026,14 @@ namespace dxvk { const uint32_t typeId = getVectorTypeId(value.type); switch (ins.op) { + case DxbcOpcode::AtomicCmpStore: + case DxbcOpcode::ImmAtomicCmpExch: + value.id = m_module.opAtomicCompareExchange( + typeId, pointer.id, scopeId, semanticsId, + m_module.constu32(spv::MemorySemanticsMaskNone), + src[1].id, src[0].id); + break; + case DxbcOpcode::ImmAtomicExch: value.id = m_module.opAtomicExchange(typeId, pointer.id, scopeId, semanticsId,