HLSL: Implement switch/case/default.

This commit is contained in:
John Kessenich 2016-07-01 00:04:11 -06:00
parent 2f47bc9781
commit d02dc5d05a
7 changed files with 514 additions and 7 deletions

View file

@ -3969,8 +3969,6 @@ void HlslParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIn
TIntermSequence* switchSequence = switchSequenceStack.back();
if (statements) {
if (switchSequence->size() == 0)
error(statements->getLoc(), "cannot have statements before first case/default label", "switch", "");
statements->setOperator(EOpSequence);
switchSequence->push_back(statements);
}