1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxbc] Only use workgroup scope in compute shaders

Turns out that global barriers can be used in graphics shaders.
This commit is contained in:
Philip Rebohle 2022-09-12 22:04:16 +02:00
parent 0502a0464f
commit 05f36fd97b

View File

@ -2593,7 +2593,11 @@ namespace dxvk {
} }
if (flags.test(DxbcSyncFlag::UavMemoryGlobal)) { if (flags.test(DxbcSyncFlag::UavMemoryGlobal)) {
memoryScope = m_hasGloballyCoherentUav ? spv::ScopeQueueFamily : spv::ScopeWorkgroup; memoryScope = spv::ScopeQueueFamily;
if (m_programInfo.type() == DxbcProgramType::ComputeShader && !m_hasGloballyCoherentUav)
memoryScope = spv::ScopeWorkgroup;
memorySemantics |= spv::MemorySemanticsImageMemoryMask memorySemantics |= spv::MemorySemanticsImageMemoryMask
| spv::MemorySemanticsUniformMemoryMask | spv::MemorySemanticsUniformMemoryMask
| spv::MemorySemanticsAcquireReleaseMask | spv::MemorySemanticsAcquireReleaseMask