ES31: Add Geometry Shader layout qualifiers in GLSL compiler

This patch intends to implement Geometry Shader layout qualifiers
required in OpenGL ES 3.1 extension GL_OES_geometry_shader in ANGLE
GLSL compiler.

1. Add support to the shader type GL_GEOMETRY_SHADER_OES.
2. Implement Geometry Shader layout qualifiers in the GLSL compiler:
(1) Add support to OpenGL ES 3.1 extension "GL_OES_geometry_shader".
(2) Add validations of the input and output primitive declarations
    in the Geometry Shader layout declarations.
(3) Add 'invocations' and 'max_vertices' support in the Geometry
    Shader layout declarations
3. Add unit tests to cover all the new features added in this patch.

BUG=angleproject:1941
TEST=angle_unittests

Change-Id: Ie693e11f8a00dab3552626ed63e9336c7fbd3cb8
Reviewed-on: https://chromium-review.googlesource.com/560647
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/Compiler.h b/src/compiler/translator/Compiler.h
index b48c252..36d4921 100644
--- a/src/compiler/translator/Compiler.h
+++ b/src/compiler/translator/Compiler.h
@@ -125,8 +125,20 @@
     // Get the resources set by InitBuiltInSymbolTable
     const ShBuiltInResources &getResources() const;
 
-  protected:
+    int getGeometryShaderMaxVertices() const { return mGeometryShaderMaxVertices; }
+    int getGeometryShaderInvocations() const { return mGeometryShaderInvocations; }
+    TLayoutPrimitiveType getGeometryShaderInputPrimitiveType() const
+    {
+        return mGeometryShaderInputPrimitiveType;
+    }
+    TLayoutPrimitiveType getGeometryShaderOutputPrimitiveType() const
+    {
+        return mGeometryShaderOutputPrimitiveType;
+    }
+
     sh::GLenum getShaderType() const { return shaderType; }
+
+  protected:
     // Initialize symbol-table with built-in symbols.
     bool InitBuiltInSymbolTable(const ShBuiltInResources &resources);
     // Compute the string representation of the built-in resources
@@ -241,6 +253,12 @@
     // GL_OVR_multiview num_views.
     int mNumViews;
 
+    // geometry shader parameters.
+    int mGeometryShaderMaxVertices;
+    int mGeometryShaderInvocations;
+    TLayoutPrimitiveType mGeometryShaderInputPrimitiveType;
+    TLayoutPrimitiveType mGeometryShaderOutputPrimitiveType;
+
     // name hashing.
     ShHashFunction64 hashFunction;
     NameMap nameMap;