Handle potentially uninitialized result

This commit is contained in:
Dan Sinclair 2018-11-12 13:56:52 -05:00
parent d509a5eec6
commit 70661b9c08

View File

@ -7302,6 +7302,10 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
} else if (auto* const_union_array = &sn->getConstArray()) {
int nextConst = 0;
result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
} else {
logger->missingFunctionality("Invalid initializer for spec onstant.");
exit(1);
return spv::NoResult;
}
builder.addName(result, sn->getName().c_str());
return result;