Revert "Return variable type queries using GLenum values."

Breaks the FYI bots until we get Chromium patched.

BUG=angle:466

This reverts commit 53221f5a0382887155d90f7f286e41190d4f5bfb.

Change-Id: Ib28548df5c10a6f76f46e4cf8f2013dca5cf0ee2
Reviewed-on: https://chromium-review.googlesource.com/205850
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/BuiltInFunctionEmulator.cpp b/src/compiler/translator/BuiltInFunctionEmulator.cpp
index 175c576..afbc169 100644
--- a/src/compiler/translator/BuiltInFunctionEmulator.cpp
+++ b/src/compiler/translator/BuiltInFunctionEmulator.cpp
@@ -7,7 +7,6 @@
 #include "compiler/translator/BuiltInFunctionEmulator.h"
 
 #include "compiler/translator/SymbolTable.h"
-#include "angle_gl.h"
 
 namespace {
 
@@ -266,9 +265,9 @@
 
 }  // anonymous namepsace
 
-BuiltInFunctionEmulator::BuiltInFunctionEmulator(sh::GLenum shaderType)
+BuiltInFunctionEmulator::BuiltInFunctionEmulator(ShShaderType shaderType)
 {
-    if (shaderType == GL_FRAGMENT_SHADER) {
+    if (shaderType == SH_FRAGMENT_SHADER) {
         mFunctionMask = kFunctionEmulationFragmentMask;
         mFunctionSource = kFunctionEmulationFragmentSource;
     } else {
diff --git a/src/compiler/translator/BuiltInFunctionEmulator.h b/src/compiler/translator/BuiltInFunctionEmulator.h
index 926b6be..9367b55 100644
--- a/src/compiler/translator/BuiltInFunctionEmulator.h
+++ b/src/compiler/translator/BuiltInFunctionEmulator.h
@@ -17,7 +17,7 @@
 //
 class BuiltInFunctionEmulator {
 public:
-    BuiltInFunctionEmulator(sh::GLenum shaderType);
+    BuiltInFunctionEmulator(ShShaderType shaderType);
     // Records that a function is called by the shader and might needs to be
     // emulated.  If the function's group is not in mFunctionGroupFilter, this
     // becomes an no-op.
diff --git a/src/compiler/translator/CodeGen.cpp b/src/compiler/translator/CodeGen.cpp
index 71056f4..c35dbdc 100644
--- a/src/compiler/translator/CodeGen.cpp
+++ b/src/compiler/translator/CodeGen.cpp
@@ -14,7 +14,7 @@
 // a subclass of TCompiler.
 //
 TCompiler* ConstructCompiler(
-    sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
+    ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
 {
     switch (output) {
     case SH_ESSL_OUTPUT:
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 898e3ef..61c0c4e 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -22,7 +22,6 @@
 #include "compiler/translator/timing/RestrictFragmentShaderTiming.h"
 #include "compiler/translator/timing/RestrictVertexShaderTiming.h"
 #include "third_party/compiler/ArrayBoundsClamper.h"
-#include "angle_gl.h"
 
 bool IsWebGLBasedSpec(ShShaderSpec spec)
 {
@@ -93,7 +92,7 @@
     allocator.popAll();
 }
 
-TCompiler::TCompiler(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
+TCompiler::TCompiler(ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
     : shaderType(type),
       shaderSpec(spec),
       outputType(output),
@@ -113,7 +112,7 @@
 bool TCompiler::Init(const ShBuiltInResources& resources)
 {
     shaderVersion = 100;
-    maxUniformVectors = (shaderType == GL_VERTEX_SHADER) ?
+    maxUniformVectors = (shaderType == SH_VERTEX_SHADER) ?
         resources.MaxVertexUniformVectors :
         resources.MaxFragmentUniformVectors;
     maxExpressionComplexity = resources.MaxExpressionComplexity;
@@ -188,7 +187,7 @@
         if (success)
             success = detectCallDepth(root, infoSink, (compileOptions & SH_LIMIT_CALL_STACK_DEPTH) != 0);
 
-        if (success && shaderVersion == 300 && shaderType == GL_FRAGMENT_SHADER)
+        if (success && shaderVersion == 300 && shaderType == SH_FRAGMENT_SHADER)
             success = validateOutputs(root);
 
         if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING))
@@ -226,7 +225,7 @@
         if (success && (compileOptions & SH_CLAMP_INDIRECT_ARRAY_BOUNDS))
             arrayBoundsClamper.MarkIndirectArrayBoundsForClamping(root);
 
-        if (success && shaderType == GL_VERTEX_SHADER && (compileOptions & SH_INIT_GL_POSITION))
+        if (success && shaderType == SH_VERTEX_SHADER && (compileOptions & SH_INIT_GL_POSITION))
             initializeGLPosition(root);
 
         if (success && (compileOptions & SH_UNFOLD_SHORT_CIRCUIT))
@@ -248,7 +247,7 @@
                     infoSink.info << "too many uniforms";
                 }
             }
-            if (success && shaderType == GL_VERTEX_SHADER &&
+            if (success && shaderType == SH_VERTEX_SHADER &&
                 (compileOptions & SH_INIT_VARYINGS_WITHOUT_STATIC_USE))
                 initializeVaryingsWithoutStaticUse(root);
         }
@@ -295,10 +294,10 @@
 
     switch(shaderType)
     {
-      case GL_FRAGMENT_SHADER:
+      case SH_FRAGMENT_SHADER:
         symbolTable.setDefaultPrecision(integer, EbpMedium);
         break;
-      case GL_VERTEX_SHADER:
+      case SH_VERTEX_SHADER:
         symbolTable.setDefaultPrecision(integer, EbpHigh);
         symbolTable.setDefaultPrecision(floatingPoint, EbpHigh);
         break;
@@ -419,7 +418,7 @@
         return false;
     }
 
-    if (shaderType == GL_FRAGMENT_SHADER)
+    if (shaderType == SH_FRAGMENT_SHADER)
     {
         TDependencyGraph graph(root);
 
@@ -513,26 +512,26 @@
         unsigned char primarySize = 1, secondarySize = 1;
         switch (varying.type)
         {
-          case GL_FLOAT:
+          case SH_FLOAT:
             break;
-          case GL_FLOAT_VEC2:
+          case SH_FLOAT_VEC2:
             primarySize = 2;
             break;
-          case GL_FLOAT_VEC3:
+          case SH_FLOAT_VEC3:
             primarySize = 3;
             break;
-          case GL_FLOAT_VEC4:
+          case SH_FLOAT_VEC4:
             primarySize = 4;
             break;
-          case GL_FLOAT_MAT2:
+          case SH_FLOAT_MAT2:
             primarySize = 2;
             secondarySize = 2;
             break;
-          case GL_FLOAT_MAT3:
+          case SH_FLOAT_MAT3:
             primarySize = 3;
             secondarySize = 3;
             break;
-          case GL_FLOAT_MAT4:
+          case SH_FLOAT_MAT4:
             primarySize = 4;
             secondarySize = 4;
             break;
diff --git a/src/compiler/translator/Compiler.h b/src/compiler/translator/Compiler.h
index 5df556d..af1bc98 100644
--- a/src/compiler/translator/Compiler.h
+++ b/src/compiler/translator/Compiler.h
@@ -54,7 +54,7 @@
 //
 class TCompiler : public TShHandleBase {
 public:
-    TCompiler(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
+    TCompiler(ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
     virtual ~TCompiler();
     virtual TCompiler* getAsCompiler() { return this; }
 
@@ -78,7 +78,7 @@
     std::string getBuiltInResourcesString() const { return builtInResourcesString; }
 
 protected:
-    sh::GLenum getShaderType() const { return shaderType; }
+    ShShaderType getShaderType() const { return shaderType; }
     // Initialize symbol-table with built-in symbols.
     bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
     // Compute the string representation of the built-in resources
@@ -130,7 +130,7 @@
     const BuiltInFunctionEmulator& getBuiltInFunctionEmulator() const;
 
 private:
-    sh::GLenum shaderType;
+    ShShaderType shaderType;
     ShShaderSpec shaderSpec;
     ShShaderOutput outputType;
 
@@ -174,7 +174,7 @@
 // above machine independent information.
 //
 TCompiler* ConstructCompiler(
-    sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
+    ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
 void DeleteCompiler(TCompiler*);
 
 #endif // _SHHANDLE_INCLUDED_
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index e91d64f..e542a3f 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -13,9 +13,8 @@
 #include "compiler/translator/Initialize.h"
 
 #include "compiler/translator/intermediate.h"
-#include "angle_gl.h"
 
-void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &symbolTable)
+void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &symbolTable)
 {
     TType *float1 = new TType(EbtFloat);
     TType *float2 = new TType(EbtFloat, 2);
@@ -363,7 +362,7 @@
         symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "textureCubeGradEXT", samplerCube, float3, float3, float3);
     }
 
-    if (type == GL_FRAGMENT_SHADER)
+    if (type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2D", sampler2D, float2, float1);
         symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProj", sampler2D, float3, float1);
@@ -397,7 +396,7 @@
         }
     }
 
-    if(type == GL_VERTEX_SHADER)
+    if(type == SH_VERTEX_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DLod", sampler2D, float2, float1);
         symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProjLod", sampler2D, float3, float1);
@@ -427,7 +426,7 @@
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureLod", gsamplerCube, float3, float1);
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureLod", gsampler2DArray, float3, float1);
 
-    if (type == GL_FRAGMENT_SHADER)
+    if (type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "texture", gsampler2D, float2, float1);
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "texture", gsampler3D, float3, float1);
@@ -448,7 +447,7 @@
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureProj", sampler2DShadow, float4);
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureLod", sampler2DShadow, float3, float1);
 
-    if (type == GL_FRAGMENT_SHADER)
+    if (type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "texture", sampler2DShadow, float3, float1);
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "texture", samplerCubeShadow, float4, float1);
@@ -463,7 +462,7 @@
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "textureSize", samplerCubeShadow, int1);
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, int3, "textureSize", sampler2DArrayShadow, int1);
 
-    if(type == GL_FRAGMENT_SHADER)
+    if(type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "dFdx", float1);
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, float2, "dFdx", float2);
@@ -486,7 +485,7 @@
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureOffset", sampler2DShadow, float3, int2);
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureOffset", gsampler2DArray, float3, int2);
 
-    if(type == GL_FRAGMENT_SHADER)
+    if(type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureOffset", gsampler2D, float2, int2, float1);
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureOffset", gsampler3D, float3, int3, float1);
@@ -499,7 +498,7 @@
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureProjOffset", gsampler3D, float4, int3);
     symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureProjOffset", sampler2DShadow, float4, int2);
 
-    if(type == GL_FRAGMENT_SHADER)
+    if(type == SH_FRAGMENT_SHADER)
     {
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureProjOffset", gsampler2D, float3, int2, float1);
         symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureProjOffset", gsampler2D, float4, int2, float1);
@@ -595,7 +594,7 @@
     symbolTable.insertConstInt(ESSL3_BUILTINS, "gl_MaxProgramTexelOffset", resources.MaxProgramTexelOffset);
 }
 
-void IdentifyBuiltIns(sh::GLenum type, ShShaderSpec spec,
+void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
                       const ShBuiltInResources &resources,
                       TSymbolTable &symbolTable)
 {
@@ -604,7 +603,7 @@
     // the built-in header files.
     //
     switch(type) {
-    case GL_FRAGMENT_SHADER:
+    case SH_FRAGMENT_SHADER:
         symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FragCoord"), TType(EbtFloat, EbpMedium, EvqFragCoord,   4)));
         symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FrontFacing"), TType(EbtBool,  EbpUndefined, EvqFrontFacing, 1)));
         symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_PointCoord"), TType(EbtFloat, EbpMedium, EvqPointCoord,  2)));
@@ -627,7 +626,7 @@
 
         break;
 
-    case GL_VERTEX_SHADER:
+    case SH_VERTEX_SHADER:
         symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_Position"), TType(EbtFloat, EbpHigh, EvqPosition,    4)));
         symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_PointSize"), TType(EbtFloat, EbpMedium, EvqPointSize,   1)));
         break;
@@ -695,9 +694,9 @@
 
     // Map language-specific operators.
     switch(type) {
-    case GL_VERTEX_SHADER:
+    case SH_VERTEX_SHADER:
         break;
-    case GL_FRAGMENT_SHADER:
+    case SH_FRAGMENT_SHADER:
         if (resources.OES_standard_derivatives)
         {
             symbolTable.relateToOperator(ESSL1_BUILTINS, "dFdx",   EOpDFdx);
@@ -731,7 +730,7 @@
 
     // Finally add resource-specific variables.
     switch(type) {
-    case GL_FRAGMENT_SHADER:
+    case SH_FRAGMENT_SHADER:
         if (spec != SH_CSS_SHADERS_SPEC) {
             // Set up gl_FragData.  The array size.
             TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, 1, true);
diff --git a/src/compiler/translator/Initialize.h b/src/compiler/translator/Initialize.h
index cc1862c..cf40697 100644
--- a/src/compiler/translator/Initialize.h
+++ b/src/compiler/translator/Initialize.h
@@ -11,9 +11,9 @@
 #include "compiler/translator/Compiler.h"
 #include "compiler/translator/SymbolTable.h"
 
-void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &table);
+void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &table);
 
-void IdentifyBuiltIns(sh::GLenum type, ShShaderSpec spec,
+void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
                       const ShBuiltInResources& resources,
                       TSymbolTable& symbolTable);
 
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index 60201f6..5974afb 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -142,7 +142,7 @@
 
     if (mOutputType == SH_HLSL9_OUTPUT)
     {
-        if (mContext.shaderType == GL_FRAGMENT_SHADER)
+        if (mContext.shaderType == SH_FRAGMENT_SHADER)
         {
             // Reserve registers for dx_DepthRange, dx_ViewCoords and dx_DepthFront
             mUniformHLSL->reserveUniformRegisters(3);
@@ -167,13 +167,13 @@
 
 void OutputHLSL::output()
 {
-    mContainsLoopDiscontinuity = mContext.shaderType == GL_FRAGMENT_SHADER && containsLoopDiscontinuity(mContext.treeRoot);
+    mContainsLoopDiscontinuity = mContext.shaderType == SH_FRAGMENT_SHADER && containsLoopDiscontinuity(mContext.treeRoot);
     const std::vector<TIntermTyped*> &flaggedStructs = FlagStd140ValueStructs(mContext.treeRoot);
     makeFlaggedStructMaps(flaggedStructs);
 
     // Work around D3D9 bug that would manifest in vertex shaders with selection blocks which
     // use a vertex attribute as a condition, and some related computation in the else block.
-    if (mOutputType == SH_HLSL9_OUTPUT && mContext.shaderType == GL_VERTEX_SHADER)
+    if (mOutputType == SH_HLSL9_OUTPUT && mContext.shaderType == SH_VERTEX_SHADER)
     {
         RewriteElseBlocks(mContext.treeRoot);
     }
@@ -345,7 +345,7 @@
         out << "#define ANGLE_USES_NESTED_BREAK" << "\n";
     }
 
-    if (mContext.shaderType == GL_FRAGMENT_SHADER)
+    if (mContext.shaderType == SH_FRAGMENT_SHADER)
     {
         TExtensionBehavior::const_iterator iter = mContext.extensionBehavior().find("GL_EXT_draw_buffers");
         const bool usingMRTExtension = (iter != mContext.extensionBehavior().end() && (iter->second == EBhEnable || iter->second == EBhRequire));
@@ -2147,7 +2147,7 @@
 
                     bool bias = (arguments.size() > mandatoryArgumentCount);   // Bias argument is optional
 
-                    if (lod0 || mContext.shaderType == GL_VERTEX_SHADER)
+                    if (lod0 || mContext.shaderType == SH_VERTEX_SHADER)
                     {
                         if (bias)
                         {
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index a402eec..fc51ac8 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -25,7 +25,7 @@
 // they can be passed to the parser without needing a global.
 //
 struct TParseContext {
-    TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, sh::GLenum type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) :
+    TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) :
             intermediate(interm),
             symbolTable(symt),
             shaderType(type),
@@ -47,7 +47,7 @@
             scanner(NULL) {  }
     TIntermediate& intermediate; // to hold and build a parse tree
     TSymbolTable& symbolTable;   // symbol table that goes with the language currently being parsed
-    sh::GLenum shaderType;              // vertex or fragment language (future: pack or unpack)
+    ShShaderType shaderType;              // vertex or fragment language (future: pack or unpack)
     ShShaderSpec shaderSpec;              // The language specification compiler conforms to - GLES2 or WebGL.
     int shaderVersion;
     int compileOptions;
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index 903a5fb..121a68c 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -115,7 +115,7 @@
 //
 // Driver calls these to create and destroy compiler objects.
 //
-ShHandle ShConstructCompiler(sh::GLenum type, ShShaderSpec spec,
+ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
                              ShShaderOutput output,
                              const ShBuiltInResources* resources)
 {
@@ -293,7 +293,7 @@
                        int index,
                        size_t* length,
                        int* size,
-                       sh::GLenum* type,
+                       ShDataType* type,
                        ShPrecisionType* precision,
                        int* staticUse,
                        char* name,
diff --git a/src/compiler/translator/TranslatorESSL.cpp b/src/compiler/translator/TranslatorESSL.cpp
index 5b99fea..c956e29 100644
--- a/src/compiler/translator/TranslatorESSL.cpp
+++ b/src/compiler/translator/TranslatorESSL.cpp
@@ -7,9 +7,8 @@
 #include "compiler/translator/TranslatorESSL.h"
 
 #include "compiler/translator/OutputESSL.h"
-#include "angle_gl.h"
 
-TranslatorESSL::TranslatorESSL(sh::GLenum type, ShShaderSpec spec)
+TranslatorESSL::TranslatorESSL(ShShaderType type, ShShaderSpec spec)
     : TCompiler(type, spec, SH_ESSL_OUTPUT) {
 }
 
@@ -21,7 +20,7 @@
 
     // Write emulated built-in functions if needed.
     getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
-        sink, getShaderType() == GL_FRAGMENT_SHADER);
+        sink, getShaderType() == SH_FRAGMENT_SHADER);
 
     // Write array bounds clamping emulation if needed.
     getArrayBoundsClamper().OutputClampingFunctionDefinition(sink);
diff --git a/src/compiler/translator/TranslatorESSL.h b/src/compiler/translator/TranslatorESSL.h
index 5576682..6e7ea65 100644
--- a/src/compiler/translator/TranslatorESSL.h
+++ b/src/compiler/translator/TranslatorESSL.h
@@ -11,7 +11,7 @@
 
 class TranslatorESSL : public TCompiler {
 public:
-    TranslatorESSL(sh::GLenum type, ShShaderSpec spec);
+    TranslatorESSL(ShShaderType type, ShShaderSpec spec);
 
 protected:
     virtual void translate(TIntermNode* root);
diff --git a/src/compiler/translator/TranslatorGLSL.cpp b/src/compiler/translator/TranslatorGLSL.cpp
index 4b2aeca..749d837 100644
--- a/src/compiler/translator/TranslatorGLSL.cpp
+++ b/src/compiler/translator/TranslatorGLSL.cpp
@@ -9,7 +9,7 @@
 #include "compiler/translator/OutputGLSL.h"
 #include "compiler/translator/VersionGLSL.h"
 
-static void writeVersion(sh::GLenum type, TIntermNode* root,
+static void writeVersion(ShShaderType type, TIntermNode* root,
                          TInfoSinkBase& sink) {
     TVersionGLSL versionGLSL(type);
     root->traverse(&versionGLSL);
@@ -21,7 +21,7 @@
     }
 }
 
-TranslatorGLSL::TranslatorGLSL(sh::GLenum type, ShShaderSpec spec)
+TranslatorGLSL::TranslatorGLSL(ShShaderType type, ShShaderSpec spec)
     : TCompiler(type, spec, SH_GLSL_OUTPUT) {
 }
 
diff --git a/src/compiler/translator/TranslatorGLSL.h b/src/compiler/translator/TranslatorGLSL.h
index 3c6c2e4..301227e 100644
--- a/src/compiler/translator/TranslatorGLSL.h
+++ b/src/compiler/translator/TranslatorGLSL.h
@@ -11,7 +11,7 @@
 
 class TranslatorGLSL : public TCompiler {
 public:
-    TranslatorGLSL(sh::GLenum type, ShShaderSpec spec);
+    TranslatorGLSL(ShShaderType type, ShShaderSpec spec);
 
 protected:
     virtual void translate(TIntermNode* root);
diff --git a/src/compiler/translator/TranslatorHLSL.cpp b/src/compiler/translator/TranslatorHLSL.cpp
index b75725b..da6f980 100644
--- a/src/compiler/translator/TranslatorHLSL.cpp
+++ b/src/compiler/translator/TranslatorHLSL.cpp
@@ -9,7 +9,7 @@
 #include "compiler/translator/InitializeParseContext.h"
 #include "compiler/translator/OutputHLSL.h"
 
-TranslatorHLSL::TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
+TranslatorHLSL::TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
   : TCompiler(type, spec, output)
 {
 }
diff --git a/src/compiler/translator/TranslatorHLSL.h b/src/compiler/translator/TranslatorHLSL.h
index f9e771f..46867b0 100644
--- a/src/compiler/translator/TranslatorHLSL.h
+++ b/src/compiler/translator/TranslatorHLSL.h
@@ -12,7 +12,7 @@
 
 class TranslatorHLSL : public TCompiler {
 public:
-    TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
+    TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
 
     virtual TranslatorHLSL *getAsTranslatorHLSL() { return this; }
     const std::vector<sh::Uniform> &getUniforms() { return mActiveUniforms; }
diff --git a/src/compiler/translator/ValidateLimitations.cpp b/src/compiler/translator/ValidateLimitations.cpp
index 51f7ae0..e96a777 100644
--- a/src/compiler/translator/ValidateLimitations.cpp
+++ b/src/compiler/translator/ValidateLimitations.cpp
@@ -8,7 +8,6 @@
 #include "compiler/translator/InfoSink.h"
 #include "compiler/translator/InitializeParseContext.h"
 #include "compiler/translator/ParseContext.h"
-#include "angle_gl.h"
 
 namespace
 {
@@ -49,7 +48,7 @@
 
 }  // namespace anonymous
 
-ValidateLimitations::ValidateLimitations(sh::GLenum shaderType,
+ValidateLimitations::ValidateLimitations(ShShaderType shaderType,
                                          TInfoSinkBase &sink)
     : mShaderType(shaderType),
       mSink(sink),
@@ -458,7 +457,7 @@
     // The index expession must be a constant-index-expression unless
     // the operand is a uniform in a vertex shader.
     TIntermTyped *operand = node->getLeft();
-    bool skip = (mShaderType == GL_VERTEX_SHADER) &&
+    bool skip = (mShaderType == SH_VERTEX_SHADER) &&
                 (operand->getQualifier() == EvqUniform);
     if (!skip && !isConstIndexExpr(index))
     {
diff --git a/src/compiler/translator/ValidateLimitations.h b/src/compiler/translator/ValidateLimitations.h
index 8c9ebf5..f28995c 100644
--- a/src/compiler/translator/ValidateLimitations.h
+++ b/src/compiler/translator/ValidateLimitations.h
@@ -14,7 +14,7 @@
 class ValidateLimitations : public TIntermTraverser
 {
   public:
-    ValidateLimitations(sh::GLenum shaderType, TInfoSinkBase &sink);
+    ValidateLimitations(ShShaderType shaderType, TInfoSinkBase &sink);
 
     int numErrors() const { return mNumErrors; }
 
@@ -47,7 +47,7 @@
     bool isConstIndexExpr(TIntermNode *node);
     bool validateIndexing(TIntermBinary *node);
 
-    sh::GLenum mShaderType;
+    ShShaderType mShaderType;
     TInfoSinkBase &mSink;
     int mNumErrors;
     TLoopStack mLoopStack;
diff --git a/src/compiler/translator/VariableInfo.cpp b/src/compiler/translator/VariableInfo.cpp
index 536aa14..d0b1990 100644
--- a/src/compiler/translator/VariableInfo.cpp
+++ b/src/compiler/translator/VariableInfo.cpp
@@ -5,7 +5,6 @@
 //
 
 #include "compiler/translator/VariableInfo.h"
-#include "angle_gl.h"
 
 namespace {
 
@@ -17,7 +16,7 @@
 }
 
 // Returns the data type for an attribute, uniform, or varying.
-sh::GLenum getVariableDataType(const TType& type)
+ShDataType getVariableDataType(const TType& type)
 {
     switch (type.getBasicType()) {
       case EbtFloat:
@@ -27,97 +26,97 @@
                 case 2:
                   switch (type.getRows())
                   {
-                    case 2: return GL_FLOAT_MAT2;
-                    case 3: return GL_FLOAT_MAT2x3;
-                    case 4: return GL_FLOAT_MAT2x4;
+                    case 2: return SH_FLOAT_MAT2;
+                    case 3: return SH_FLOAT_MAT2x3;
+                    case 4: return SH_FLOAT_MAT2x4;
                     default: UNREACHABLE();
                   }
                 case 3:
                   switch (type.getRows())
                   {
-                    case 2: return GL_FLOAT_MAT3x2;
-                    case 3: return GL_FLOAT_MAT3;
-                    case 4: return GL_FLOAT_MAT3x4;
+                    case 2: return SH_FLOAT_MAT3x2;
+                    case 3: return SH_FLOAT_MAT3;
+                    case 4: return SH_FLOAT_MAT3x4;
                     default: UNREACHABLE();
                   }
                 case 4:
                   switch (type.getRows())
                   {
-                    case 2: return GL_FLOAT_MAT4x2;
-                    case 3: return GL_FLOAT_MAT4x3;
-                    case 4: return GL_FLOAT_MAT4;
+                    case 2: return SH_FLOAT_MAT4x2;
+                    case 3: return SH_FLOAT_MAT4x3;
+                    case 4: return SH_FLOAT_MAT4;
                     default: UNREACHABLE();
                   }
               }
           } else if (type.isVector()) {
               switch (type.getNominalSize()) {
-                case 2: return GL_FLOAT_VEC2;
-                case 3: return GL_FLOAT_VEC3;
-                case 4: return GL_FLOAT_VEC4;
+                case 2: return SH_FLOAT_VEC2;
+                case 3: return SH_FLOAT_VEC3;
+                case 4: return SH_FLOAT_VEC4;
                 default: UNREACHABLE();
               }
           } else {
-              return GL_FLOAT;
+              return SH_FLOAT;
           }
       case EbtInt:
           if (type.isMatrix()) {
               UNREACHABLE();
           } else if (type.isVector()) {
               switch (type.getNominalSize()) {
-                case 2: return GL_INT_VEC2;
-                case 3: return GL_INT_VEC3;
-                case 4: return GL_INT_VEC4;
+                case 2: return SH_INT_VEC2;
+                case 3: return SH_INT_VEC3;
+                case 4: return SH_INT_VEC4;
                 default: UNREACHABLE();
               }
           } else {
-              return GL_INT;
+              return SH_INT;
           }
       case EbtUInt:
           if (type.isMatrix()) {
               UNREACHABLE();
           } else if (type.isVector()) {
               switch (type.getNominalSize()) {
-                case 2: return GL_UNSIGNED_INT_VEC2;
-                case 3: return GL_UNSIGNED_INT_VEC3;
-                case 4: return GL_UNSIGNED_INT_VEC4;
+                case 2: return SH_UNSIGNED_INT_VEC2;
+                case 3: return SH_UNSIGNED_INT_VEC3;
+                case 4: return SH_UNSIGNED_INT_VEC4;
                 default: UNREACHABLE();
               }
           } else {
-              return GL_UNSIGNED_INT;
+              return SH_UNSIGNED_INT;
           }
       case EbtBool:
           if (type.isMatrix()) {
               UNREACHABLE();
           } else if (type.isVector()) {
               switch (type.getNominalSize()) {
-                case 2: return GL_BOOL_VEC2;
-                case 3: return GL_BOOL_VEC3;
-                case 4: return GL_BOOL_VEC4;
+                case 2: return SH_BOOL_VEC2;
+                case 3: return SH_BOOL_VEC3;
+                case 4: return SH_BOOL_VEC4;
                 default: UNREACHABLE();
               }
           } else {
-              return GL_BOOL;
+              return SH_BOOL;
           }
-      case EbtSampler2D: return GL_SAMPLER_2D;
-      case EbtSampler3D: return GL_SAMPLER_3D;
-      case EbtSamplerCube: return GL_SAMPLER_CUBE;
-      case EbtSamplerExternalOES: return GL_SAMPLER_EXTERNAL_OES;
-      case EbtSampler2DRect: return GL_SAMPLER_2D_RECT_ARB;
-      case EbtSampler2DArray: return GL_SAMPLER_2D_ARRAY;
-      case EbtISampler2D: return GL_INT_SAMPLER_2D;
-      case EbtISampler3D: return GL_INT_SAMPLER_3D;
-      case EbtISamplerCube: return GL_INT_SAMPLER_CUBE;
-      case EbtISampler2DArray: return GL_INT_SAMPLER_2D_ARRAY;
-      case EbtUSampler2D: return GL_UNSIGNED_INT_SAMPLER_2D;
-      case EbtUSampler3D: return GL_UNSIGNED_INT_SAMPLER_3D;
-      case EbtUSamplerCube: return GL_UNSIGNED_INT_SAMPLER_CUBE;
-      case EbtUSampler2DArray: return GL_UNSIGNED_INT_SAMPLER_2D_ARRAY;
-      case EbtSampler2DShadow: return GL_SAMPLER_2D_SHADOW;
-      case EbtSamplerCubeShadow: return GL_SAMPLER_CUBE_SHADOW;
-      case EbtSampler2DArrayShadow: return GL_SAMPLER_2D_ARRAY_SHADOW;
+      case EbtSampler2D: return SH_SAMPLER_2D;
+      case EbtSampler3D: return SH_SAMPLER_3D;
+      case EbtSamplerCube: return SH_SAMPLER_CUBE;
+      case EbtSamplerExternalOES: return SH_SAMPLER_EXTERNAL_OES;
+      case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB;
+      case EbtSampler2DArray: return SH_SAMPLER_2D_ARRAY;
+      case EbtISampler2D: return SH_INT_SAMPLER_2D;
+      case EbtISampler3D: return SH_INT_SAMPLER_3D;
+      case EbtISamplerCube: return SH_INT_SAMPLER_CUBE;
+      case EbtISampler2DArray: return SH_INT_SAMPLER_2D_ARRAY;
+      case EbtUSampler2D: return SH_UNSIGNED_INT_SAMPLER_2D;
+      case EbtUSampler3D: return SH_UNSIGNED_INT_SAMPLER_3D;
+      case EbtUSamplerCube: return SH_UNSIGNED_INT_SAMPLER_CUBE;
+      case EbtUSampler2DArray: return SH_UNSIGNED_INT_SAMPLER_2D_ARRAY;
+      case EbtSampler2DShadow: return SH_SAMPLER_2D_SHADOW;
+      case EbtSamplerCubeShadow: return SH_SAMPLER_CUBE_SHADOW;
+      case EbtSampler2DArrayShadow: return SH_SAMPLER_2D_ARRAY_SHADOW;
       default: UNREACHABLE();
     }
-    return GL_NONE;
+    return SH_NONE;
 }
 
 void getBuiltInVariableInfo(const TType& type,
@@ -217,7 +216,7 @@
 }  // namespace anonymous
 
 TVariableInfo::TVariableInfo()
-    : type(GL_NONE),
+    : type(SH_NONE),
       size(0),
       isArray(false),
       precision(EbpUndefined),
@@ -225,7 +224,7 @@
 {
 }
 
-TVariableInfo::TVariableInfo(sh::GLenum type, int size)
+TVariableInfo::TVariableInfo(ShDataType type, int size)
     : type(type),
       size(size),
       isArray(false),
@@ -273,7 +272,7 @@
             TVariableInfo info;
             info.name = "gl_FragCoord";
             info.mappedName = "gl_FragCoord";
-            info.type = GL_FLOAT_VEC4;
+            info.type = SH_FLOAT_VEC4;
             info.size = 1;
             info.precision = EbpMedium;  // Use mediump as it doesn't really matter.
             info.staticUse = true;
@@ -286,7 +285,7 @@
             TVariableInfo info;
             info.name = "gl_FrontFacing";
             info.mappedName = "gl_FrontFacing";
-            info.type = GL_BOOL;
+            info.type = SH_BOOL;
             info.size = 1;
             info.precision = EbpUndefined;
             info.staticUse = true;
@@ -299,7 +298,7 @@
             TVariableInfo info;
             info.name = "gl_PointCoord";
             info.mappedName = "gl_PointCoord";
-            info.type = GL_FLOAT_VEC2;
+            info.type = SH_FLOAT_VEC2;
             info.size = 1;
             info.precision = EbpMedium;  // Use mediump as it doesn't really matter.
             info.staticUse = true;
diff --git a/src/compiler/translator/VariableInfo.h b/src/compiler/translator/VariableInfo.h
index 9bd4d53..fc9e153 100644
--- a/src/compiler/translator/VariableInfo.h
+++ b/src/compiler/translator/VariableInfo.h
@@ -12,12 +12,12 @@
 // Provides information about a variable.
 // It is currently being used to store info about active attribs and uniforms.
 struct TVariableInfo {
-    TVariableInfo(sh::GLenum type, int size);
+    TVariableInfo(ShDataType type, int size);
     TVariableInfo();
 
     TPersistString name;
     TPersistString mappedName;
-    sh::GLenum type;
+    ShDataType type;
     int size;
     bool isArray;
     TPrecision precision;
diff --git a/src/compiler/translator/VariablePacker.cpp b/src/compiler/translator/VariablePacker.cpp
index 6cc7198..da4436e 100644
--- a/src/compiler/translator/VariablePacker.cpp
+++ b/src/compiler/translator/VariablePacker.cpp
@@ -4,45 +4,44 @@
 // found in the LICENSE file.
 //
 #include "compiler/translator/VariablePacker.h"
-#include "angle_gl.h"
 
 #include <algorithm>
 
 namespace {
-int GetSortOrder(sh::GLenum type)
+int GetSortOrder(ShDataType type)
 {
     switch (type) {
-        case GL_FLOAT_MAT4:
-        case GL_FLOAT_MAT2x4:
-        case GL_FLOAT_MAT3x4:
-        case GL_FLOAT_MAT4x2:
-        case GL_FLOAT_MAT4x3:
+        case SH_FLOAT_MAT4:
+        case SH_FLOAT_MAT2x4:
+        case SH_FLOAT_MAT3x4:
+        case SH_FLOAT_MAT4x2:
+        case SH_FLOAT_MAT4x3:
             return 0;
-        case GL_FLOAT_MAT2:
+        case SH_FLOAT_MAT2:
             return 1;
-        case GL_FLOAT_VEC4:
-        case GL_INT_VEC4:
-        case GL_BOOL_VEC4:
+        case SH_FLOAT_VEC4:
+        case SH_INT_VEC4:
+        case SH_BOOL_VEC4:
             return 2;
-        case GL_FLOAT_MAT3:
-        case GL_FLOAT_MAT2x3:
-        case GL_FLOAT_MAT3x2:
+        case SH_FLOAT_MAT3:
+        case SH_FLOAT_MAT2x3:
+        case SH_FLOAT_MAT3x2:
             return 3;
-        case GL_FLOAT_VEC3:
-        case GL_INT_VEC3:
-        case GL_BOOL_VEC3:
+        case SH_FLOAT_VEC3:
+        case SH_INT_VEC3:
+        case SH_BOOL_VEC3:
             return 4;
-        case GL_FLOAT_VEC2:
-        case GL_INT_VEC2:
-        case GL_BOOL_VEC2:
+        case SH_FLOAT_VEC2:
+        case SH_INT_VEC2:
+        case SH_BOOL_VEC2:
             return 5;
-        case GL_FLOAT:
-        case GL_INT:
-        case GL_BOOL:
-        case GL_SAMPLER_2D:
-        case GL_SAMPLER_CUBE:
-        case GL_SAMPLER_EXTERNAL_OES:
-        case GL_SAMPLER_2D_RECT_ARB:
+        case SH_FLOAT:
+        case SH_INT:
+        case SH_BOOL:
+        case SH_SAMPLER_2D:
+        case SH_SAMPLER_CUBE:
+        case SH_SAMPLER_EXTERNAL_OES:
+        case SH_SAMPLER_2D_RECT_ARB:
             return 6;
         default:
             ASSERT(false);
@@ -51,37 +50,37 @@
 }
 }    // namespace
 
-int VariablePacker::GetNumComponentsPerRow(sh::GLenum type)
+int VariablePacker::GetNumComponentsPerRow(ShDataType type)
 {
     switch (type) {
-        case GL_FLOAT_MAT4:
-        case GL_FLOAT_MAT2:
-        case GL_FLOAT_MAT2x4:
-        case GL_FLOAT_MAT3x4:
-        case GL_FLOAT_MAT4x2:
-        case GL_FLOAT_MAT4x3:
-        case GL_FLOAT_VEC4:
-        case GL_INT_VEC4:
-        case GL_BOOL_VEC4:
+        case SH_FLOAT_MAT4:
+        case SH_FLOAT_MAT2:
+        case SH_FLOAT_MAT2x4:
+        case SH_FLOAT_MAT3x4:
+        case SH_FLOAT_MAT4x2:
+        case SH_FLOAT_MAT4x3:
+        case SH_FLOAT_VEC4:
+        case SH_INT_VEC4:
+        case SH_BOOL_VEC4:
             return 4;
-        case GL_FLOAT_MAT3:
-        case GL_FLOAT_MAT2x3:
-        case GL_FLOAT_MAT3x2:
-        case GL_FLOAT_VEC3:
-        case GL_INT_VEC3:
-        case GL_BOOL_VEC3:
+        case SH_FLOAT_MAT3:
+        case SH_FLOAT_MAT2x3:
+        case SH_FLOAT_MAT3x2:
+        case SH_FLOAT_VEC3:
+        case SH_INT_VEC3:
+        case SH_BOOL_VEC3:
             return 3;
-        case GL_FLOAT_VEC2:
-        case GL_INT_VEC2:
-        case GL_BOOL_VEC2:
+        case SH_FLOAT_VEC2:
+        case SH_INT_VEC2:
+        case SH_BOOL_VEC2:
             return 2;
-        case GL_FLOAT:
-        case GL_INT:
-        case GL_BOOL:
-        case GL_SAMPLER_2D:
-        case GL_SAMPLER_CUBE:
-        case GL_SAMPLER_EXTERNAL_OES:
-        case GL_SAMPLER_2D_RECT_ARB:
+        case SH_FLOAT:
+        case SH_INT:
+        case SH_BOOL:
+        case SH_SAMPLER_2D:
+        case SH_SAMPLER_CUBE:
+        case SH_SAMPLER_EXTERNAL_OES:
+        case SH_SAMPLER_2D_RECT_ARB:
             return 1;
         default:
             ASSERT(false);
@@ -89,37 +88,37 @@
     }
 }
 
-int VariablePacker::GetNumRows(sh::GLenum type)
+int VariablePacker::GetNumRows(ShDataType type)
 {
     switch (type) {
-        case GL_FLOAT_MAT4:
-        case GL_FLOAT_MAT2x4:
-        case GL_FLOAT_MAT3x4:
-        case GL_FLOAT_MAT4x3:
-        case GL_FLOAT_MAT4x2:
+        case SH_FLOAT_MAT4:
+        case SH_FLOAT_MAT2x4:
+        case SH_FLOAT_MAT3x4:
+        case SH_FLOAT_MAT4x3:
+        case SH_FLOAT_MAT4x2:
             return 4;
-        case GL_FLOAT_MAT3:
-        case GL_FLOAT_MAT2x3:
-        case GL_FLOAT_MAT3x2:
+        case SH_FLOAT_MAT3:
+        case SH_FLOAT_MAT2x3:
+        case SH_FLOAT_MAT3x2:
             return 3;
-        case GL_FLOAT_MAT2:
+        case SH_FLOAT_MAT2:
             return 2;
-        case GL_FLOAT_VEC4:
-        case GL_INT_VEC4:
-        case GL_BOOL_VEC4:
-        case GL_FLOAT_VEC3:
-        case GL_INT_VEC3:
-        case GL_BOOL_VEC3:
-        case GL_FLOAT_VEC2:
-        case GL_INT_VEC2:
-        case GL_BOOL_VEC2:
-        case GL_FLOAT:
-        case GL_INT:
-        case GL_BOOL:
-        case GL_SAMPLER_2D:
-        case GL_SAMPLER_CUBE:
-        case GL_SAMPLER_EXTERNAL_OES:
-        case GL_SAMPLER_2D_RECT_ARB:
+        case SH_FLOAT_VEC4:
+        case SH_INT_VEC4:
+        case SH_BOOL_VEC4:
+        case SH_FLOAT_VEC3:
+        case SH_INT_VEC3:
+        case SH_BOOL_VEC3:
+        case SH_FLOAT_VEC2:
+        case SH_INT_VEC2:
+        case SH_BOOL_VEC2:
+        case SH_FLOAT:
+        case SH_INT:
+        case SH_BOOL:
+        case SH_SAMPLER_2D:
+        case SH_SAMPLER_CUBE:
+        case SH_SAMPLER_EXTERNAL_OES:
+        case SH_SAMPLER_2D_RECT_ARB:
             return 1;
         default:
             ASSERT(false);
diff --git a/src/compiler/translator/VariablePacker.h b/src/compiler/translator/VariablePacker.h
index d66b0fc..2a92321 100644
--- a/src/compiler/translator/VariablePacker.h
+++ b/src/compiler/translator/VariablePacker.h
@@ -19,10 +19,10 @@
         const TVariableInfoList& in_variables);
 
     // Gets how many components in a row a data type takes.
-    static int GetNumComponentsPerRow(sh::GLenum type);
+    static int GetNumComponentsPerRow(ShDataType type);
 
     // Gets how many rows a data type takes.
-    static int GetNumRows(sh::GLenum type);
+    static int GetNumRows(ShDataType type);
 
  private:
     static const int kNumColumns = 4;
diff --git a/src/compiler/translator/VersionGLSL.cpp b/src/compiler/translator/VersionGLSL.cpp
index c03a543..3027a77 100644
--- a/src/compiler/translator/VersionGLSL.cpp
+++ b/src/compiler/translator/VersionGLSL.cpp
@@ -35,7 +35,7 @@
 //    - invariant gl_Position;
 //    - varying vec3 color; invariant color;
 //
-TVersionGLSL::TVersionGLSL(sh::GLenum type)
+TVersionGLSL::TVersionGLSL(ShShaderType type)
     : mVersion(GLSL_VERSION_110)
 {
 }
diff --git a/src/compiler/translator/VersionGLSL.h b/src/compiler/translator/VersionGLSL.h
index 442e46d..d2fa21b 100644
--- a/src/compiler/translator/VersionGLSL.h
+++ b/src/compiler/translator/VersionGLSL.h
@@ -26,7 +26,7 @@
 // TODO: ES3 equivalent versions of GLSL
 class TVersionGLSL : public TIntermTraverser {
 public:
-    TVersionGLSL(sh::GLenum type);
+    TVersionGLSL(ShShaderType type);
 
     // Returns 120 if the following is used the shader:
     // - "invariant",
diff --git a/src/compiler/translator/glslang.y b/src/compiler/translator/glslang.y
index 7cc1455..1680f79 100644
--- a/src/compiler/translator/glslang.y
+++ b/src/compiler/translator/glslang.y
@@ -37,7 +37,6 @@
 #include "compiler/translator/SymbolTable.h"
 #include "compiler/translator/ParseContext.h"
 #include "GLSLANG/ShaderLang.h"
-#include "angle_gl.h"
 
 #define YYENABLE_NLS 0
 
@@ -107,14 +106,14 @@
   } while (0)
 
 #define VERTEX_ONLY(S, L) {  \
-    if (context->shaderType != GL_VERTEX_SHADER) {  \
+    if (context->shaderType != SH_VERTEX_SHADER) {  \
         context->error(L, " supported in vertex shaders only ", S);  \
         context->recover();  \
     }  \
 }
 
 #define FRAG_ONLY(S, L) {  \
-    if (context->shaderType != GL_FRAGMENT_SHADER) {  \
+    if (context->shaderType != SH_FRAGMENT_SHADER) {  \
         context->error(L, " supported in fragment shaders only ", S);  \
         context->recover();  \
     }  \
@@ -821,7 +820,7 @@
         $$ = $1.intermAggregate;
     }
     | PRECISION precision_qualifier type_specifier_no_prec SEMICOLON {
-        if (($2 == EbpHigh) && (context->shaderType == GL_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
+        if (($2 == EbpHigh) && (context->shaderType == SH_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
             context->error(@1, "precision is not supported in fragment shader", "highp");
             context->recover();
         }
@@ -1163,7 +1162,7 @@
         ES2_ONLY("varying", @1);
         if (context->globalErrorCheck(@1, context->symbolTable.atGlobalLevel(), "varying"))
             context->recover();
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
             $$.setBasic(EbtVoid, EvqVaryingOut, @1);
         else
             $$.setBasic(EbtVoid, EvqVaryingIn, @1);
@@ -1172,7 +1171,7 @@
         ES2_ONLY("varying", @1);
         if (context->globalErrorCheck(@1, context->symbolTable.atGlobalLevel(), "invariant varying"))
             context->recover();
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
             $$.setBasic(EbtVoid, EvqInvariantVaryingOut, @1);
         else
             $$.setBasic(EbtVoid, EvqInvariantVaryingIn, @1);
@@ -1211,29 +1210,29 @@
     }
     | IN_QUAL {
         ES3_ONLY("in", @1, "storage qualifier");
-        $$.qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
+        $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
     }
     | OUT_QUAL {
         ES3_ONLY("out", @1, "storage qualifier");
-        $$.qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
+        $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
     }
     | CENTROID IN_QUAL {
         ES3_ONLY("centroid in", @1, "storage qualifier");
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
         {
             context->error(@1, "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
             context->recover();
         }
-        $$.qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
+        $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
     }
     | CENTROID OUT_QUAL {
         ES3_ONLY("centroid out", @1, "storage qualifier");
-        if (context->shaderType == GL_FRAGMENT_SHADER)
+        if (context->shaderType == SH_FRAGMENT_SHADER)
         {
             context->error(@1, "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
             context->recover();
         }
-        $$.qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
+        $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
     }
     | UNIFORM {
         if (context->globalErrorCheck(@1, context->symbolTable.atGlobalLevel(), "uniform"))
diff --git a/src/compiler/translator/glslang_tab.cpp b/src/compiler/translator/glslang_tab.cpp
index 21c715d..fc0169e 100644
--- a/src/compiler/translator/glslang_tab.cpp
+++ b/src/compiler/translator/glslang_tab.cpp
@@ -87,7 +87,6 @@
 #include "compiler/translator/SymbolTable.h"
 #include "compiler/translator/ParseContext.h"
 #include "GLSLANG/ShaderLang.h"
-#include "angle_gl.h"
 
 #define YYENABLE_NLS 0
 
@@ -363,14 +362,14 @@
   } while (0)
 
 #define VERTEX_ONLY(S, L) {  \
-    if (context->shaderType != GL_VERTEX_SHADER) {  \
+    if (context->shaderType != SH_VERTEX_SHADER) {  \
         context->error(L, " supported in vertex shaders only ", S);  \
         context->recover();  \
     }  \
 }
 
 #define FRAG_ONLY(S, L) {  \
-    if (context->shaderType != GL_FRAGMENT_SHADER) {  \
+    if (context->shaderType != SH_FRAGMENT_SHADER) {  \
         context->error(L, " supported in fragment shaders only ", S);  \
         context->recover();  \
     }  \
@@ -3353,7 +3352,7 @@
   case 76:
 
     {
-        if (((yyvsp[(2) - (4)].interm.precision) == EbpHigh) && (context->shaderType == GL_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
+        if (((yyvsp[(2) - (4)].interm.precision) == EbpHigh) && (context->shaderType == SH_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
             context->error((yylsp[(1) - (4)]), "precision is not supported in fragment shader", "highp");
             context->recover();
         }
@@ -3796,7 +3795,7 @@
         ES2_ONLY("varying", (yylsp[(1) - (1)]));
         if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
             context->recover();
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
         else
             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
@@ -3809,7 +3808,7 @@
         ES2_ONLY("varying", (yylsp[(1) - (2)]));
         if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
             context->recover();
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
         else
             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
@@ -3873,7 +3872,7 @@
 
     {
         ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
-        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
+        (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
     }
     break;
 
@@ -3881,7 +3880,7 @@
 
     {
         ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
-        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
+        (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
     }
     break;
 
@@ -3889,12 +3888,12 @@
 
     {
         ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
-        if (context->shaderType == GL_VERTEX_SHADER)
+        if (context->shaderType == SH_VERTEX_SHADER)
         {
             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
             context->recover();
         }
-        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
+        (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
     }
     break;
 
@@ -3902,12 +3901,12 @@
 
     {
         ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
-        if (context->shaderType == GL_FRAGMENT_SHADER)
+        if (context->shaderType == SH_FRAGMENT_SHADER)
         {
             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
             context->recover();
         }
-        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
+        (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
     }
     break;