glslang -> SPV: fix degenerate switch topologies (bug 14118).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31485 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -1109,7 +1109,8 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
|
||||
|
||||
// handle the case where the last code segment is missing, due to no code
|
||||
// statements between the last case and the end of the switch statement
|
||||
if ((int)codeSegments.size() == valueIndexToSegment[caseValues.size() - 1])
|
||||
if ((caseValues.size() && (int)codeSegments.size() == valueIndexToSegment[caseValues.size() - 1]) ||
|
||||
(int)codeSegments.size() == defaultSegment)
|
||||
codeSegments.push_back(nullptr);
|
||||
|
||||
// make the switch statement
|
||||
|
||||
Reference in New Issue
Block a user