Eliminate compiling for the WebGL spec.

Bug 19331817

Change-Id: I85cbfd61a267e39832b951121422a676f5af4a54
Reviewed-on: https://swiftshader-review.googlesource.com/2289
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/Compiler.h b/src/OpenGL/compiler/Compiler.h
index 7e9a7c3..b0fa548 100644
--- a/src/OpenGL/compiler/Compiler.h
+++ b/src/OpenGL/compiler/Compiler.h
@@ -11,32 +11,6 @@
 #include "InfoSink.h"
 #include "SymbolTable.h"
 
-//
-// The names of the following enums have been derived by replacing GL prefix
-// with SH. For example, SH_INFO_LOG_LENGTH is equivalent to GL_INFO_LOG_LENGTH.
-// The enum values are also equal to the values of their GL counterpart. This
-// is done to make it easier for applications to use the shader library.
-//
-enum ShShaderType
-{
-  SH_FRAGMENT_SHADER = 0x8B30,
-  SH_VERTEX_SHADER   = 0x8B31
-};
-
-enum ShShaderSpec
-{
-  SH_GLES2_SPEC = 0x8B40,
-  SH_WEBGL_SPEC = 0x8B41
-};
-
- enum ShShaderInfo
-{
-  SH_INFO_LOG_LENGTH             =  0x8B84,
-  SH_OBJECT_CODE_LENGTH          =  0x8B88,  // GL_SHADER_SOURCE_LENGTH
-  SH_ACTIVE_UNIFORM_MAX_LENGTH   =  0x8B87,
-  SH_ACTIVE_ATTRIBUTE_MAX_LENGTH =  0x8B8A
-};
-
 enum ShCompileOptions
 {
   SH_VALIDATE                = 0,
@@ -75,6 +49,10 @@
     unsigned int MaxCallStackDepth;
 };
 
+typedef unsigned int GLenum;
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+
 //
 // The base class for the machine dependent compiler to derive from
 // for managing object code from the compile.
@@ -82,7 +60,7 @@
 class TCompiler
 {
 public:
-    TCompiler(ShShaderType type, ShShaderSpec spec);
+    TCompiler(GLenum shaderType);
     virtual ~TCompiler();
     virtual TCompiler* getAsCompiler() { return this; }
 
@@ -96,8 +74,7 @@
     TInfoSink& getInfoSink() { return infoSink; }
 
 protected:
-    ShShaderType getShaderType() const { return shaderType; }
-    ShShaderSpec getShaderSpec() const { return shaderSpec; }
+    GLenum getShaderType() const { return shaderType; }
     // Initialize symbol-table with built-in symbols.
     bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
     // Clears the results from the previous compilation.
@@ -113,8 +90,7 @@
     const TExtensionBehavior& getExtensionBehavior() const;
 
 private:
-    ShShaderType shaderType;
-    ShShaderSpec shaderSpec;
+    GLenum shaderType;
 
     unsigned int maxCallStackDepth;