1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[dxbc] Work around OpControlBarrier issue on radv 18.2-git

This commit is contained in:
Philip Rebohle 2018-08-03 15:15:18 +02:00
parent fe66e668e5
commit 9293acfeb5
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -2319,17 +2319,20 @@ namespace dxvk {
| spv::MemorySemanticsAcquireReleaseMask;
}
// According to the SPIR-V spec, OpControlBarrier should
// also act as a memory barrier if the memory semantics
// are not 'none', but this is currently broken on RADV.
if (memoryScope != spv::ScopeInvocation) {
m_module.opMemoryBarrier(
m_module.constu32(memoryScope),
m_module.constu32(memorySemantics));
}
if (executionScope != spv::ScopeInvocation) {
m_module.opControlBarrier(
m_module.constu32(executionScope),
m_module.constu32(memoryScope),
m_module.constu32(memorySemantics));
} else if (memoryScope != spv::ScopeInvocation) {
m_module.opMemoryBarrier(
m_module.constu32(memoryScope),
m_module.constu32(memorySemantics));
} else {
Logger::warn("DxbcCompiler: sync instruction has no effect");
}
}