SPV: Update to spec. decisions (and issue #205) for barrier().

A barrier (ESSL/GLSL) or OpControlBarrier when in a tessellation control
shader also means doing memory synchronization for output variables.
This commit is contained in:
John Kessenich
2016-06-14 19:46:20 -06:00
parent 01de90bb1c
commit c51287d744
3 changed files with 151 additions and 158 deletions

View File

@@ -3924,8 +3924,6 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op)
builder.createNoResultOp(spv::OpEndPrimitive);
return 0;
case glslang::EOpBarrier:
if (glslangIntermediate->getProfile() != EEsProfile)
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
return 0;
case glslang::EOpMemoryBarrier:

View File

@@ -67,10 +67,7 @@ const Id NoType = 0;
const unsigned int BadValue = 0xFFFFFFFF;
const Decoration NoPrecision = (Decoration)BadValue;
const MemorySemanticsMask MemorySemanticsAllMemory =
(MemorySemanticsMask)(MemorySemanticsAcquireMask |
MemorySemanticsReleaseMask |
MemorySemanticsAcquireReleaseMask |
MemorySemanticsSequentiallyConsistentMask |
(MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask |
MemorySemanticsUniformMemoryMask |
MemorySemanticsSubgroupMemoryMask |
MemorySemanticsWorkgroupMemoryMask |