Add parsing of arrays of arrays
This changes the grammar so that multiple array sizes can be chained
together, and adds arrays of arrays support to TPublicType. In
TPublicType the array sizes are stored using a pointer to a vector, a
plain vector won't work due to bison restrictions.
A larger subset of program interface query tests now pass. Some are
still failing due to unrelated bugs.
BUG=angleproject:2125
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES31.functional.shaders.arrays_of_arrays.*
dEQP-GLES31.functional.uniform_location.nested_array.*
dEQP-GLES31.functional.program_interface_query.*
dEQP-GLES31.functional.ubo.*level*array.*
Change-Id: Iee16477a3752b953f5068c0473a2ed62fead8155
Reviewed-on: https://chromium-review.googlesource.com/633944
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index e917db7..6cf5fad 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -221,7 +221,7 @@
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- unsigned int arraySize);
+ const TVector<unsigned int> &arraySizes);
TIntermDeclaration *parseSingleInitDeclaration(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
const TString &identifier,
@@ -234,7 +234,7 @@
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- unsigned int arraySize,
+ const TVector<unsigned int> &arraySizes,
const TSourceLoc &initLocation,
TIntermTyped *initializer);
@@ -252,7 +252,7 @@
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &arrayLocation,
- unsigned int arraySize,
+ const TVector<unsigned int> &arraySizes,
TIntermDeclaration *declarationOut);
void parseInitDeclarator(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
@@ -266,7 +266,7 @@
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- unsigned int arraySize,
+ const TVector<unsigned int> &arraySizes,
const TSourceLoc &initLocation,
TIntermTyped *initializer,
TIntermDeclaration *declarationOut);
@@ -298,7 +298,7 @@
TParameter parseParameterArrayDeclarator(const TString *name,
const TSourceLoc &nameLoc,
- unsigned int arraySize,
+ const TVector<unsigned int> &arraySizes,
const TSourceLoc &arrayLoc,
TPublicType *elementType);
@@ -314,7 +314,7 @@
TField *parseStructDeclarator(TString *identifier, const TSourceLoc &loc);
TField *parseStructArrayDeclarator(TString *identifier,
const TSourceLoc &loc,
- unsigned int arraySize,
+ const TVector<unsigned int> &arraySizes,
const TSourceLoc &arraySizeLoc);
void checkDoesNotHaveDuplicateFieldName(const TFieldList::const_iterator begin,