Move check if useStorageBuffer needs to be set.
From TParseContext used only by GLSL, to TParseContextBase inherited by both GLSL and HLSL paths. It caused compilations from HLSL to SPIR-V 1.3+ to use BufferBlock decoration which is no longer valid.
This commit is contained in:
@@ -80,10 +80,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
|
||||
globalBufferDefaults.layoutMatrix = ElmColumnMajor;
|
||||
globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared;
|
||||
|
||||
// use storage buffer on SPIR-V 1.3 and up
|
||||
if (spvVersion.spv >= EShTargetSpv_1_3)
|
||||
intermediate.setUseStorageBuffer();
|
||||
|
||||
globalInputDefaults.clear();
|
||||
globalOutputDefaults.clear();
|
||||
|
||||
|
||||
@@ -95,6 +95,10 @@ public:
|
||||
globalUniformSet(TQualifier::layoutSetEnd),
|
||||
atomicCounterBlockSet(TQualifier::layoutSetEnd)
|
||||
{
|
||||
// use storage buffer on SPIR-V 1.3 and up
|
||||
if (spvVersion.spv >= EShTargetSpv_1_3)
|
||||
intermediate.setUseStorageBuffer();
|
||||
|
||||
if (entryPoint != nullptr)
|
||||
sourceEntryPointName = *entryPoint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user