Populate gl_InstanceID attribute information explicitly
While compiling ESSL1 shaders, with the compiler having both
SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW and SH_VARIABLES
set, variable collection terminates with an assertion failure. The reason
behind this is that SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW
adds gl_InstanceID to the AST to initialize the multiview builtins, but
the variable collection pass cannot find gl_InstanceID information in
the symbol table because the builtin is only available in ESSL 3.00 and
greater.
To address this the patch populates the gl_InstanceID attribute
information explicitly in the variable collection pass instead of
retrieving it from the symbol table.
BUG=angleproject:2062
TEST=angle_unittests
Change-Id: I5ecb9967ebe6658e956d17a2637090f9b685ef33
Reviewed-on: https://chromium-review.googlesource.com/559669
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/tests/test_utils/ShaderCompileTreeTest.h b/src/tests/test_utils/ShaderCompileTreeTest.h
index d2188da..7b3ba83 100644
--- a/src/tests/test_utils/ShaderCompileTreeTest.h
+++ b/src/tests/test_utils/ShaderCompileTreeTest.h
@@ -38,7 +38,8 @@
bool hasWarning() const;
- const std::vector<sh::Uniform> getUniforms();
+ const std::vector<sh::Uniform> &getUniforms() const;
+ const std::vector<sh::Attribute> &getAttributes() const;
virtual void initResources(ShBuiltInResources *resources) {}
virtual ::GLenum getShaderType() const = 0;