Fix arrays dimensioned with spec constant sized gl_WorkGroupSize

This commit is contained in:
Greg Fischer
2021-05-06 18:01:20 -06:00
parent 41e39c615b
commit 1464d036b8
3 changed files with 17 additions and 1 deletions

View File

@@ -4236,6 +4236,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra
glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim);
if (specNode != nullptr) {
builder.clearAccessChain();
SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
specNode->traverse(this);
return accessChainLoad(specNode->getAsTyped()->getType());
}