Commit 7408a699 by John Kessenich

Add semantic check for ES variably indexing a uniform block.

parent 3ce5745a
...@@ -351,6 +351,8 @@ postfix_expression ...@@ -351,6 +351,8 @@ postfix_expression
parseContext.error($2.line, "", "[", "array must be redeclared with a size before being indexed with a variable"); parseContext.error($2.line, "", "[", "array must be redeclared with a size before being indexed with a variable");
parseContext.recover(); parseContext.recover();
} }
if ($1->getBasicType() == EbtBlock)
parseContext.requireProfile($1->getLine(), static_cast<EProfileMask>(~EEsProfileMask), "variable indexing block array");
$$ = parseContext.intermediate.addIndex(EOpIndexIndirect, $1, $3, $2.line); $$ = parseContext.intermediate.addIndex(EOpIndexIndirect, $1, $3, $2.line);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment