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/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index 3b0589f..45c3dcf 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -902,6 +902,10 @@
}
break;
+ case GL_GEOMETRY_SHADER_OES:
+ // TODO(jiawei.shao@intel.com): add Geometry Shader built-in variables.
+ break;
+
default:
assert(false && "Language not supported");
}
@@ -942,6 +946,10 @@
{
extBehavior["GL_EXT_YUV_target"] = EBhUndefined;
}
+ if (resources.OES_geometry_shader)
+ {
+ extBehavior["GL_OES_geometry_shader"] = EBhUndefined;
+ }
}
void ResetExtensionBehavior(TExtensionBehavior &extBehavior)