SPV: Don't emit memory barrier for ESSL barrier(), but still do for GLSL barrier().

Addresses issue #205.
Current open Khronos bug for finalizing this.
This commit is contained in:
John Kessenich
2016-05-19 18:26:42 -06:00
parent eb6d950789
commit 823fc65644
2 changed files with 105 additions and 106 deletions

View File

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