Accept valid geometry shader inputs regardless of syntax
Before, only the following style of declarations were accepted:
in float f[];
Now also these styles are accepted:
in float[] f;
in float f[], g[];
BUG=angleproject:2201
TEST=angle_unittests
Change-Id: I0af7d355a5e06a67ceef2d6bd69af7e23c180a04
Reviewed-on: https://chromium-review.googlesource.com/738234
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 8d0b2ad..741ee42 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -507,6 +507,11 @@
TType type,
const TSourceLoc &line);
+ // Will set the size of the outermost array according to geometry shader input layout.
+ void checkGeometryShaderInputAndSetArraySize(const TSourceLoc &location,
+ const char *token,
+ TType *type);
+
// Will size any unsized array type so unsized arrays won't need to be taken into account
// further along the line in parsing.
void checkIsNotUnsizedArray(const TSourceLoc &line,