Only apply volatile semantics to atomics when using Vulkan Memory Model
This commit is contained in:
parent
a959deb007
commit
016ddee83a
4 changed files with 50 additions and 1 deletions
|
|
@ -6401,7 +6401,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
|||
scopeId = builder.makeUintConstant(spv::ScopeDevice);
|
||||
}
|
||||
// semantics default to relaxed
|
||||
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() ?
|
||||
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ?
|
||||
spv::MemorySemanticsVolatileMask :
|
||||
spv::MemorySemanticsMaskNone);
|
||||
spv::Id semanticsId2 = semanticsId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue