ES31: Implement Geometry Shader inputs and outputs
This patch intends to implement Geometry Shader inputs and
outputs in ANGLE GLSL compiler.
1. Only accept arrays as the inputs of a Geometry Shader.
2. Allow unsized arrays as the inputs of a Geometry Shader after a
valid input primitive declaration and assign size to them.
3. Implement Geometry Shader outputs.
4. Allow Geometry Shader inputs and outputs using interpolation
qualifiers ('flat', 'smooth', 'centroid').
5. Allow using 'location' layout qualifier on Geometry Shader inputs
and outputs.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Ia7e250277c61f45c8479437b567c2831ff26b433
Reviewed-on: https://chromium-review.googlesource.com/650211
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 5d1a7e0..0694fbb 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -539,7 +539,7 @@
bool checkPrimitiveTypeMatchesTypeQualifier(const TTypeQualifier &typeQualifier);
bool parseGeometryShaderInputLayoutQualifier(const TTypeQualifier &typeQualifier);
bool parseGeometryShaderOutputLayoutQualifier(const TTypeQualifier &typeQualifier);
- void setGeometryShaderInputArraySizes();
+ void setGeometryShaderInputArraySize(unsigned int inputArraySize, const TSourceLoc &line);
// Set to true when the last/current declarator list was started with an empty declaration. The
// non-empty declaration error check will need to be performed if the empty declaration is
@@ -606,8 +606,9 @@
int mGeometryShaderMaxVertices;
int mMaxGeometryShaderInvocations;
int mMaxGeometryShaderMaxVertices;
- int mGeometryShaderInputArraySize; // Track if all input array sizes are same and matches the
- // latter input primitive declaration.
+
+ // Track if all input array sizes are same and matches the latter input primitive declaration.
+ unsigned int mGeometryShaderInputArraySize;
};
int PaParseStrings(size_t count,