Add HLSL memory barrier intrinsics, fix dst, add lit & EvaluateAttributeSnapped

This commit is contained in:
LoopDawg
2016-06-15 09:50:24 -06:00
parent 19b92fff7e
commit 6e72fddaa2
18 changed files with 1170 additions and 466 deletions

View File

@@ -1405,6 +1405,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpMemoryBarrierImage:
case glslang::EOpMemoryBarrierShared:
case glslang::EOpGroupMemoryBarrier:
case glslang::EOpAllMemoryBarrierWithGroupSync:
case glslang::EOpGroupMemoryBarrierWithGroupSync:
case glslang::EOpWorkgroupMemoryBarrier:
case glslang::EOpWorkgroupMemoryBarrierWithGroupSync:
noReturnValue = true;
// These all have 0 operands and will naturally finish up in the code below for 0 operands
break;
@@ -3986,6 +3990,21 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op)
case glslang::EOpGroupMemoryBarrier:
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask);
return 0;
case glslang::EOpAllMemoryBarrierWithGroupSync:
// Control barrier with non-"None" semantic is also a memory barrier.
builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsAllMemory);
return 0;
case glslang::EOpGroupMemoryBarrierWithGroupSync:
// Control barrier with non-"None" semantic is also a memory barrier.
builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask);
return 0;
case glslang::EOpWorkgroupMemoryBarrier:
builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask);
return 0;
case glslang::EOpWorkgroupMemoryBarrierWithGroupSync:
// Control barrier with non-"None" semantic is also a memory barrier.
builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask);
return 0;
default:
logger->missingFunctionality("unknown operation with no arguments");
return 0;