Add gl_ViewportIndex to the symbol table

gl_ViewportIndex is a GLSL built-in that's needed to implement
instanced multiview. It is a bit of a special case: it only exists in
desktop GLSL and not ESSL, and it shouldn't be exposed to the parser.
We add a new level to the symbol table that's hidden from the parser
to make adding this kind of builtins in AST transforms consistent with
the way ESSL builtins are supported.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I51b2d983950b38c8e85e4b6ed00c6b39f9b3cb03
Reviewed-on: https://chromium-review.googlesource.com/580953
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index b6e256e..ef8141f 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -628,11 +628,12 @@
     compileResources = resources;
     setResourceString();
 
-    assert(symbolTable.isEmpty());
+    ASSERT(symbolTable.isEmpty());
     symbolTable.push();  // COMMON_BUILTINS
     symbolTable.push();  // ESSL1_BUILTINS
     symbolTable.push();  // ESSL3_BUILTINS
     symbolTable.push();  // ESSL3_1_BUILTINS
+    symbolTable.push();  // GLSL_BUILTINS
 
     switch (shaderType)
     {