diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 2fe97abe..29f7d6fb 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2279,9 +2279,13 @@ namespace dxvk { // (srcX) As above const DxbcBufferInfo bufferInfo = getBufferInfo(ins.dst[ins.dstCount - 1]); - const bool isImm = ins.dstCount == 2; - const bool isUav = ins.dst[ins.dstCount - 1].type == DxbcOperandType::UnorderedAccessView; + bool isImm = ins.dstCount == 2; + bool isUav = ins.dst[ins.dstCount - 1].type == DxbcOperandType::UnorderedAccessView; + bool isSsbo = m_moduleInfo.options.minSsboAlignment <= bufferInfo.align + && bufferInfo.type != DxbcResourceType::Typed + && isUav; + // Perform atomic operations on UAVs only if the UAV // is bound and if there is nothing else stopping us. DxbcConditional cond; @@ -2317,8 +2321,11 @@ namespace dxvk { if (isUav) { scope = spv::ScopeDevice; - semantics = spv::MemorySemanticsImageMemoryMask - | spv::MemorySemanticsAcquireReleaseMask; + semantics = spv::MemorySemanticsAcquireReleaseMask; + + semantics |= isSsbo + ? spv::MemorySemanticsUniformMemoryMask + : spv::MemorySemanticsImageMemoryMask; } else { scope = spv::ScopeWorkgroup; semantics = spv::MemorySemanticsWorkgroupMemoryMask