Store invariant declarations in variable metadata
This is simpler than storing the information in symbol table levels.
Invariant declarations can only be present at the global scope, so
storing the information per level is not required.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Idb07d734950c8a0a8bda5b2380e181902f9eb633
Reviewed-on: https://chromium-review.googlesource.com/1007060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 6cf0eb9..5f3c928 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -2632,7 +2632,7 @@
typeQualifier.line);
checkMemoryQualifierIsNotSpecified(typeQualifier.memoryQualifier, typeQualifier.line);
- symbolTable.addInvariantVarying(identifier);
+ symbolTable.addInvariantVarying(*variable);
TIntermSymbol *intermSymbol = new TIntermSymbol(variable);
intermSymbol->setLine(identifierLoc);