Set correct symbol ids when referring to GLSL built-ins
The symbol ids are fetched from the symbol table. A new utility
function is added to make this more convenient.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I780430e3386f6599503d8290c568ca9bc9cad147
Reviewed-on: https://chromium-review.googlesource.com/559535
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 4842f89..cb41d00 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -3521,16 +3521,7 @@
{
if (baseExpression->getQualifier() == EvqFragData && index > 0)
{
- if (mShaderSpec == SH_WEBGL2_SPEC)
- {
- // Error has been already generated if index is not const.
- if (indexExpression->getQualifier() == EvqConst)
- {
- error(location, "array index for gl_FragData must be constant zero", "[");
- }
- safeIndex = 0;
- }
- else if (!isExtensionEnabled("GL_EXT_draw_buffers"))
+ if (!isExtensionEnabled("GL_EXT_draw_buffers"))
{
outOfRangeError(outOfRangeIndexIsError, location,
"array index for gl_FragData must be zero when "