Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. A shading language version dependent varying
matching check is added to the translator API to facilitate this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
A previous revision of this change that broke API compatibility was
reverted since it broke Chromium FYI bots. This revision keeps deprecated
API functionality around for now so that changes can be rolled
step-by-step to Chromium without breakage.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: Iecb64e3afd23e267ba999bc17f44390affcdfc13
Reviewed-on: https://chromium-review.googlesource.com/269940
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 6952a08..e08e50a 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -110,6 +110,7 @@
bool singleDeclarationErrorCheck(TPublicType &publicType, const TSourceLoc &identifierLocation);
bool layoutLocationErrorCheck(const TSourceLoc& location, const TLayoutQualifier &layoutQualifier);
bool functionCallLValueErrorCheck(const TFunction *fnCandidate, TIntermAggregate *);
+ void es3InvariantErrorCheck(const TQualifier qualifier, const TSourceLoc &invariantLocation);
const TPragma& pragma() const { return directiveHandler.pragma(); }
const TExtensionBehavior& extensionBehavior() const { return directiveHandler.extensionBehavior(); }