Add semantic check for ES variably indexing a uniform block.
authorJohn Kessenich <cepheus@frii.com>
Fri, 7 Jun 2013 19:07:39 +0000 (19:07 +0000)
committerJohn Kessenich <cepheus@frii.com>
Fri, 7 Jun 2013 19:07:39 +0000 (19:07 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21894 e7fa87d3-cd2b-0410-9028-fcbf551c1848

glslang/MachineIndependent/glslang.y

index 5e077ca85560172e37e7012f0ec3689c1ddd920b..dcc08d709ac48638e3c1870e934f29bcf60529c6 100644 (file)
@@ -351,6 +351,8 @@ postfix_expression
                     parseContext.error($2.line, "", "[", "array must be redeclared with a size before being indexed with a variable");\r
                     parseContext.recover();\r
                 }\r
+                if ($1->getBasicType() == EbtBlock)\r
+                    parseContext.requireProfile($1->getLine(), static_cast<EProfileMask>(~EEsProfileMask), "variable indexing block array");\r
 \r
                 $$ = parseContext.intermediate.addIndex(EOpIndexIndirect, $1, $3, $2.line);\r
             }\r