Less memory intensive initializing of builtins.

R=alokp@chromium.org

Review URL: https://codereview.appspot.com/9436044

git-svn-id: http://angleproject.googlecode.com/svn/trunk@2425 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/build_angle.gypi b/src/build_angle.gypi
index 456f6a2..df6711b 100644
--- a/src/build_angle.gypi
+++ b/src/build_angle.gypi
@@ -64,6 +64,8 @@
         'COMPILER_IMPLEMENTATION',
       ],
       'sources': [
+        'compiler/builtin_symbol_table.h',
+        'compiler/builtin_symbol_table.cpp',
         'compiler/BaseTypes.h',
         'compiler/BuiltInFunctionEmulator.cpp',
         'compiler/BuiltInFunctionEmulator.h',
diff --git a/src/compiler/Compiler.cpp b/src/compiler/Compiler.cpp
index 1aad550..9d3e407 100644
--- a/src/compiler/Compiler.cpp
+++ b/src/compiler/Compiler.cpp
@@ -4,6 +4,7 @@
 // found in the LICENSE file.
 //
 
+#include "compiler/builtin_symbol_table.h"
 #include "compiler/BuiltInFunctionEmulator.h"
 #include "compiler/DetectCallDepth.h"
 #include "compiler/ForLoopUnroll.h"
@@ -68,6 +69,7 @@
         }
     }
 
+    InsertBuiltInFunctionsCommon(resources, &symbolTable);
     IdentifyBuiltIns(type, spec, resources, symbolTable);
 
     return true;
@@ -132,6 +134,7 @@
     // Generate built-in symbol table.
     if (!InitBuiltInSymbolTable(resources))
         return false;
+
     InitExtensionBehavior(resources, extensionBehavior);
     fragmentPrecisionHigh = resources.FragmentPrecisionHigh == 1;
 
diff --git a/src/compiler/Initialize.cpp b/src/compiler/Initialize.cpp
index 4aa36b2..9b22d1e 100644
--- a/src/compiler/Initialize.cpp
+++ b/src/compiler/Initialize.cpp
@@ -16,348 +16,6 @@
 
 //============================================================================
 //
-// Prototypes for built-in functions seen by both vertex and fragment shaders.
-//
-//============================================================================
-static TString BuiltInFunctionsCommon(const ShBuiltInResources& resources)
-{
-    TString s;
-
-    //
-    // Angle and Trigonometric Functions.
-    //
-    s.append(TString("float radians(float degrees);"));
-    s.append(TString("vec2  radians(vec2  degrees);"));
-    s.append(TString("vec3  radians(vec3  degrees);"));
-    s.append(TString("vec4  radians(vec4  degrees);"));
-
-    s.append(TString("float degrees(float radians);"));
-    s.append(TString("vec2  degrees(vec2  radians);"));
-    s.append(TString("vec3  degrees(vec3  radians);"));
-    s.append(TString("vec4  degrees(vec4  radians);"));
-
-    s.append(TString("float sin(float angle);"));
-    s.append(TString("vec2  sin(vec2  angle);"));
-    s.append(TString("vec3  sin(vec3  angle);"));
-    s.append(TString("vec4  sin(vec4  angle);"));
-
-    s.append(TString("float cos(float angle);"));
-    s.append(TString("vec2  cos(vec2  angle);"));
-    s.append(TString("vec3  cos(vec3  angle);"));
-    s.append(TString("vec4  cos(vec4  angle);"));
-
-    s.append(TString("float tan(float angle);"));
-    s.append(TString("vec2  tan(vec2  angle);"));
-    s.append(TString("vec3  tan(vec3  angle);"));
-    s.append(TString("vec4  tan(vec4  angle);"));
-
-    s.append(TString("float asin(float x);"));
-    s.append(TString("vec2  asin(vec2  x);"));
-    s.append(TString("vec3  asin(vec3  x);"));
-    s.append(TString("vec4  asin(vec4  x);"));
-
-    s.append(TString("float acos(float x);"));
-    s.append(TString("vec2  acos(vec2  x);"));
-    s.append(TString("vec3  acos(vec3  x);"));
-    s.append(TString("vec4  acos(vec4  x);"));
-
-    s.append(TString("float atan(float y, float x);"));
-    s.append(TString("vec2  atan(vec2  y, vec2  x);"));
-    s.append(TString("vec3  atan(vec3  y, vec3  x);"));
-    s.append(TString("vec4  atan(vec4  y, vec4  x);"));
-
-    s.append(TString("float atan(float y_over_x);"));
-    s.append(TString("vec2  atan(vec2  y_over_x);"));
-    s.append(TString("vec3  atan(vec3  y_over_x);"));
-    s.append(TString("vec4  atan(vec4  y_over_x);"));
-
-    //
-    // Exponential Functions.
-    //
-    s.append(TString("float pow(float x, float y);"));
-    s.append(TString("vec2  pow(vec2  x, vec2  y);"));
-    s.append(TString("vec3  pow(vec3  x, vec3  y);"));
-    s.append(TString("vec4  pow(vec4  x, vec4  y);"));
-
-    s.append(TString("float exp(float x);"));
-    s.append(TString("vec2  exp(vec2  x);"));
-    s.append(TString("vec3  exp(vec3  x);"));
-    s.append(TString("vec4  exp(vec4  x);"));
-
-    s.append(TString("float log(float x);"));
-    s.append(TString("vec2  log(vec2  x);"));
-    s.append(TString("vec3  log(vec3  x);"));
-    s.append(TString("vec4  log(vec4  x);"));
-
-    s.append(TString("float exp2(float x);"));
-    s.append(TString("vec2  exp2(vec2  x);"));
-    s.append(TString("vec3  exp2(vec3  x);"));
-    s.append(TString("vec4  exp2(vec4  x);"));
-
-    s.append(TString("float log2(float x);"));
-    s.append(TString("vec2  log2(vec2  x);"));
-    s.append(TString("vec3  log2(vec3  x);"));
-    s.append(TString("vec4  log2(vec4  x);"));
-
-    s.append(TString("float sqrt(float x);"));
-    s.append(TString("vec2  sqrt(vec2  x);"));
-    s.append(TString("vec3  sqrt(vec3  x);"));
-    s.append(TString("vec4  sqrt(vec4  x);"));
-
-    s.append(TString("float inversesqrt(float x);"));
-    s.append(TString("vec2  inversesqrt(vec2  x);"));
-    s.append(TString("vec3  inversesqrt(vec3  x);"));
-    s.append(TString("vec4  inversesqrt(vec4  x);"));
-
-    //
-    // Common Functions.
-    //
-    s.append(TString("float abs(float x);"));
-    s.append(TString("vec2  abs(vec2  x);"));
-    s.append(TString("vec3  abs(vec3  x);"));
-    s.append(TString("vec4  abs(vec4  x);"));
-
-    s.append(TString("float sign(float x);"));
-    s.append(TString("vec2  sign(vec2  x);"));
-    s.append(TString("vec3  sign(vec3  x);"));
-    s.append(TString("vec4  sign(vec4  x);"));
-
-    s.append(TString("float floor(float x);"));
-    s.append(TString("vec2  floor(vec2  x);"));
-    s.append(TString("vec3  floor(vec3  x);"));
-    s.append(TString("vec4  floor(vec4  x);"));
-
-    s.append(TString("float ceil(float x);"));
-    s.append(TString("vec2  ceil(vec2  x);"));
-    s.append(TString("vec3  ceil(vec3  x);"));
-    s.append(TString("vec4  ceil(vec4  x);"));
-
-    s.append(TString("float fract(float x);"));
-    s.append(TString("vec2  fract(vec2  x);"));
-    s.append(TString("vec3  fract(vec3  x);"));
-    s.append(TString("vec4  fract(vec4  x);"));
-
-    s.append(TString("float mod(float x, float y);"));
-    s.append(TString("vec2  mod(vec2  x, float y);"));
-    s.append(TString("vec3  mod(vec3  x, float y);"));
-    s.append(TString("vec4  mod(vec4  x, float y);"));
-    s.append(TString("vec2  mod(vec2  x, vec2  y);"));
-    s.append(TString("vec3  mod(vec3  x, vec3  y);"));
-    s.append(TString("vec4  mod(vec4  x, vec4  y);"));
-
-    s.append(TString("float min(float x, float y);"));
-    s.append(TString("vec2  min(vec2  x, float y);"));
-    s.append(TString("vec3  min(vec3  x, float y);"));
-    s.append(TString("vec4  min(vec4  x, float y);"));
-    s.append(TString("vec2  min(vec2  x, vec2  y);"));
-    s.append(TString("vec3  min(vec3  x, vec3  y);"));
-    s.append(TString("vec4  min(vec4  x, vec4  y);"));
-
-    s.append(TString("float max(float x, float y);"));
-    s.append(TString("vec2  max(vec2  x, float y);"));
-    s.append(TString("vec3  max(vec3  x, float y);"));
-    s.append(TString("vec4  max(vec4  x, float y);"));
-    s.append(TString("vec2  max(vec2  x, vec2  y);"));
-    s.append(TString("vec3  max(vec3  x, vec3  y);"));
-    s.append(TString("vec4  max(vec4  x, vec4  y);"));
-
-    s.append(TString("float clamp(float x, float minVal, float maxVal);"));
-    s.append(TString("vec2  clamp(vec2  x, float minVal, float maxVal);"));
-    s.append(TString("vec3  clamp(vec3  x, float minVal, float maxVal);"));
-    s.append(TString("vec4  clamp(vec4  x, float minVal, float maxVal);"));
-    s.append(TString("vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);"));
-    s.append(TString("vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);"));
-    s.append(TString("vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);"));
-
-    s.append(TString("float mix(float x, float y, float a);"));
-    s.append(TString("vec2  mix(vec2  x, vec2  y, float a);"));
-    s.append(TString("vec3  mix(vec3  x, vec3  y, float a);"));
-    s.append(TString("vec4  mix(vec4  x, vec4  y, float a);"));
-    s.append(TString("vec2  mix(vec2  x, vec2  y, vec2  a);"));
-    s.append(TString("vec3  mix(vec3  x, vec3  y, vec3  a);"));
-    s.append(TString("vec4  mix(vec4  x, vec4  y, vec4  a);"));
-
-    s.append(TString("float step(float edge, float x);"));
-    s.append(TString("vec2  step(vec2  edge, vec2  x);"));
-    s.append(TString("vec3  step(vec3  edge, vec3  x);"));
-    s.append(TString("vec4  step(vec4  edge, vec4  x);"));
-    s.append(TString("vec2  step(float edge, vec2  x);"));
-    s.append(TString("vec3  step(float edge, vec3  x);"));
-    s.append(TString("vec4  step(float edge, vec4  x);"));
-
-    s.append(TString("float smoothstep(float edge0, float edge1, float x);"));
-    s.append(TString("vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);"));
-    s.append(TString("vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);"));
-    s.append(TString("vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);"));
-    s.append(TString("vec2  smoothstep(float edge0, float edge1, vec2  x);"));
-    s.append(TString("vec3  smoothstep(float edge0, float edge1, vec3  x);"));
-    s.append(TString("vec4  smoothstep(float edge0, float edge1, vec4  x);"));
-
-    //
-    // Geometric Functions.
-    //
-    s.append(TString("float length(float x);"));
-    s.append(TString("float length(vec2  x);"));
-    s.append(TString("float length(vec3  x);"));
-    s.append(TString("float length(vec4  x);"));
-
-    s.append(TString("float distance(float p0, float p1);"));
-    s.append(TString("float distance(vec2  p0, vec2  p1);"));
-    s.append(TString("float distance(vec3  p0, vec3  p1);"));
-    s.append(TString("float distance(vec4  p0, vec4  p1);"));
-
-    s.append(TString("float dot(float x, float y);"));
-    s.append(TString("float dot(vec2  x, vec2  y);"));
-    s.append(TString("float dot(vec3  x, vec3  y);"));
-    s.append(TString("float dot(vec4  x, vec4  y);"));
-
-    s.append(TString("vec3 cross(vec3 x, vec3 y);"));
-    s.append(TString("float normalize(float x);"));
-    s.append(TString("vec2  normalize(vec2  x);"));
-    s.append(TString("vec3  normalize(vec3  x);"));
-    s.append(TString("vec4  normalize(vec4  x);"));
-
-    s.append(TString("float faceforward(float N, float I, float Nref);"));
-    s.append(TString("vec2  faceforward(vec2  N, vec2  I, vec2  Nref);"));
-    s.append(TString("vec3  faceforward(vec3  N, vec3  I, vec3  Nref);"));
-    s.append(TString("vec4  faceforward(vec4  N, vec4  I, vec4  Nref);"));
-
-    s.append(TString("float reflect(float I, float N);"));
-    s.append(TString("vec2  reflect(vec2  I, vec2  N);"));
-    s.append(TString("vec3  reflect(vec3  I, vec3  N);"));
-    s.append(TString("vec4  reflect(vec4  I, vec4  N);"));
-
-    s.append(TString("float refract(float I, float N, float eta);"));
-    s.append(TString("vec2  refract(vec2  I, vec2  N, float eta);"));
-    s.append(TString("vec3  refract(vec3  I, vec3  N, float eta);"));
-    s.append(TString("vec4  refract(vec4  I, vec4  N, float eta);"));
-
-    //
-    // Matrix Functions.
-    //
-    s.append(TString("mat2 matrixCompMult(mat2 x, mat2 y);"));
-    s.append(TString("mat3 matrixCompMult(mat3 x, mat3 y);"));
-    s.append(TString("mat4 matrixCompMult(mat4 x, mat4 y);"));
-
-    //
-    // Vector relational functions.
-    //
-    s.append(TString("bvec2 lessThan(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 lessThan(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 lessThan(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 lessThan(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 lessThan(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 lessThan(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 lessThanEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 lessThanEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 lessThanEqual(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 lessThanEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 lessThanEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 lessThanEqual(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 greaterThan(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 greaterThan(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 greaterThan(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 greaterThan(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 greaterThan(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 greaterThan(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 greaterThanEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 greaterThanEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 greaterThanEqual(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 greaterThanEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 greaterThanEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 greaterThanEqual(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 equal(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 equal(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 equal(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 equal(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 equal(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 equal(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 equal(bvec2 x, bvec2 y);"));
-    s.append(TString("bvec3 equal(bvec3 x, bvec3 y);"));
-    s.append(TString("bvec4 equal(bvec4 x, bvec4 y);"));
-
-    s.append(TString("bvec2 notEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 notEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 notEqual(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 notEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 notEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 notEqual(ivec4 x, ivec4 y);"));
-
-    s.append(TString("bvec2 notEqual(bvec2 x, bvec2 y);"));
-    s.append(TString("bvec3 notEqual(bvec3 x, bvec3 y);"));
-    s.append(TString("bvec4 notEqual(bvec4 x, bvec4 y);"));
-
-    s.append(TString("bool any(bvec2 x);"));
-    s.append(TString("bool any(bvec3 x);"));
-    s.append(TString("bool any(bvec4 x);"));
-
-    s.append(TString("bool all(bvec2 x);"));
-    s.append(TString("bool all(bvec3 x);"));
-    s.append(TString("bool all(bvec4 x);"));
-
-    s.append(TString("bvec2 not(bvec2 x);"));
-    s.append(TString("bvec3 not(bvec3 x);"));
-    s.append(TString("bvec4 not(bvec4 x);"));
-
-    //
-    // Texture Functions.
-    //
-    s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);"));
-    s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);"));
-
-    if (resources.OES_EGL_image_external) {
-        s.append(TString("vec4 texture2D(samplerExternalOES sampler, vec2 coord);"));
-        s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec3 coord);"));
-        s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec4 coord);"));
-    }
-
-    if (resources.ARB_texture_rectangle) {
-        s.append(TString("vec4 texture2DRect(sampler2DRect sampler, vec2 coord);"));
-        s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);"));
-        s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);"));
-    }
-
-    //
-    // Noise functions.
-    //
-    //s.append(TString("float noise1(float x);"));
-    //s.append(TString("float noise1(vec2  x);"));
-    //s.append(TString("float noise1(vec3  x);"));
-    //s.append(TString("float noise1(vec4  x);"));
-
-    //s.append(TString("vec2 noise2(float x);"));
-    //s.append(TString("vec2 noise2(vec2  x);"));
-    //s.append(TString("vec2 noise2(vec3  x);"));
-    //s.append(TString("vec2 noise2(vec4  x);"));
-
-    //s.append(TString("vec3 noise3(float x);"));
-    //s.append(TString("vec3 noise3(vec2  x);"));
-    //s.append(TString("vec3 noise3(vec3  x);"));
-    //s.append(TString("vec3 noise3(vec4  x);"));
-
-    //s.append(TString("vec4 noise4(float x);"));
-    //s.append(TString("vec4 noise4(vec2  x);"));
-    //s.append(TString("vec4 noise4(vec3  x);"));
-    //s.append(TString("vec4 noise4(vec4  x);"));
-
-    return s;
-}
-
-//============================================================================
-//
 // Prototypes for built-in functions seen by vertex shaders only.
 //
 //============================================================================
@@ -500,14 +158,12 @@
     switch (type) {
     case SH_FRAGMENT_SHADER:
         builtInStrings.push_back(DefaultPrecisionFragment());
-        builtInStrings.push_back(BuiltInFunctionsCommon(resources));
         builtInStrings.push_back(BuiltInFunctionsFragment(resources));
         builtInStrings.push_back(StandardUniforms());
         break;
 
     case SH_VERTEX_SHADER:
         builtInStrings.push_back(DefaultPrecisionVertex());
-        builtInStrings.push_back(BuiltInFunctionsCommon(resources));
         builtInStrings.push_back(BuiltInFunctionsVertex(resources));
         builtInStrings.push_back(StandardUniforms());
         break;
diff --git a/src/compiler/builtin_symbol_table.cpp b/src/compiler/builtin_symbol_table.cpp
new file mode 100644
index 0000000..f9d27d3
--- /dev/null
+++ b/src/compiler/builtin_symbol_table.cpp
@@ -0,0 +1,279 @@
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// *************************************************************
+// This file is generated by generate_builtin_symbol_table.py.
+//                 * DO NOT HAND MODIFY *
+// *************************************************************
+#include "compiler/builtin_symbol_table.h"
+#include "compiler/SymbolTable.h"
+
+static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param = {new TString(pname1), ptype1};
+  f->addParameter(param);
+  t->insert(*f);
+}
+static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param1 = {new TString(pname1), ptype1};
+  f->addParameter(param1);
+  TParameter param2 = {new TString(pname2), ptype2};
+  f->addParameter(param2);
+  t->insert(*f);
+}
+
+static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2, TType* ptype3, const char* pname3)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param1 = {new TString(pname1), ptype1};
+  f->addParameter(param1);
+  TParameter param2 = {new TString(pname2), ptype2};
+  f->addParameter(param2);
+  TParameter param3 = {new TString(pname3), ptype3};
+  f->addParameter(param3);
+  t->insert(*f);
+}
+void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "degrees");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "degrees");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "degrees");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "degrees");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "degrees", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "radians");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "degrees", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "radians");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "degrees", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "radians");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "degrees", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "radians");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "sin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "sin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "sin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "sin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "cos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "cos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "cos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "cos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "tan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "tan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "tan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "tan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "angle");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "asin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "asin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "asin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "asin", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "acos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "acos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "acos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "acos", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y_over_x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y_over_x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y_over_x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "atan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y_over_x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "pow", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "pow", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "pow", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "pow", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "exp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "exp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "exp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "exp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "log", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "log", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "log", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "log", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "exp2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "exp2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "exp2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "exp2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "log2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "log2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "log2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "log2", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "sqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "sqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "sqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "sqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "inversesqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "inversesqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "inversesqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "inversesqrt", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "abs", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "abs", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "abs", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "abs", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "sign", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "sign", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "sign", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "sign", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "floor", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "floor", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "floor", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "floor", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "ceil", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "ceil", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "ceil", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "ceil", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "fract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "fract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "fract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "fract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "mod", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "min", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "max", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "clamp", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "minVal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "maxVal");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "a");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "mix", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "a");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "step", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "smoothstep", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "edge1", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "length", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "length", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "length", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "length", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "distance", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "p0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "p1");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "distance", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "p0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "p1");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "distance", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "p0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "p1");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "distance", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "p0", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "p1");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "dot", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "dot", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "dot", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "dot", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "cross", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "normalize", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "normalize", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "normalize", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "normalize", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "faceforward", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "Nref");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "faceforward", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "Nref");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "faceforward", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "Nref");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "faceforward", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "Nref");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "reflect", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "N");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "reflect", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "N");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "reflect", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "N");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "reflect", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "N");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "refract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "eta");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "refract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "eta");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "refract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "eta");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "refract", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "I", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "N", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "eta");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, true, false), "matrixCompMult", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, true, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, true, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, true, false), "matrixCompMult", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, true, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, true, false), "y");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, true, false), "matrixCompMult", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, true, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, true, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "lessThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "lessThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "lessThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "lessThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "lessThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "lessThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "lessThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "lessThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "lessThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "lessThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "lessThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "lessThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "greaterThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "greaterThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "greaterThan", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "greaterThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "greaterThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "greaterThan", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "greaterThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "greaterThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "greaterThanEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "greaterThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "greaterThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "greaterThanEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "equal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "equal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "equal", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "equal", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "equal", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "equal", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "equal", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "equal", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "equal", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "notEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "notEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "notEqual", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "notEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "notEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "notEqual", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "notEqual", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "notEqual", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "y");
+    builtin2(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "notEqual", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "x", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "y");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "any", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "any", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "any", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "all", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "all", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false), "all", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "not", new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "not", new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false), "x");
+    builtin1(t, new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "not", new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false), "x");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2D", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "coord");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProj", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProj", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord");
+    builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "textureCube", new TType(EbtSamplerCube, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord");
+    if (resources.OES_EGL_image_external) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2D", new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "coord");
+    }
+    if (resources.OES_EGL_image_external) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProj", new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord");
+    }
+    if (resources.OES_EGL_image_external) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProj", new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord");
+    }
+    if (resources.ARB_texture_rectangle) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DRect", new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "coord");
+    }
+    if (resources.ARB_texture_rectangle) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DRectProj", new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord");
+    }
+    if (resources.ARB_texture_rectangle) {
+        builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DRectProj", new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord");
+    }
+}
diff --git a/src/compiler/builtin_symbol_table.h b/src/compiler/builtin_symbol_table.h
new file mode 100644
index 0000000..44d0d52
--- /dev/null
+++ b/src/compiler/builtin_symbol_table.h
@@ -0,0 +1,15 @@
+//
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+#ifndef _BUILTIN_SYMBOL_TABLE_INCLUDED_
+#define _BUILTIN_SYMBOL_TABLE_INCLUDED_
+
+#include "GLSLANG/ShaderLang.h"
+
+class TSymbolTable;
+
+extern void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t);
+
+#endif // _BUILTIN_SYMBOL_TABLE_INCLUDED_
diff --git a/src/compiler/builtin_symbols.json b/src/compiler/builtin_symbols.json
new file mode 100644
index 0000000..41c5591
--- /dev/null
+++ b/src/compiler/builtin_symbols.json
@@ -0,0 +1,1776 @@
+{
+"ttypemap" : {
+ "float":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false)",
+ "int":"new TType(EbtInt, EbpUndefined, EvqGlobal, 1, false, false)",
+ "bool":"new TType(EbtBool, EbpUndefined, EvqGlobal, 1, false, false)",
+ "vec2":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false)",
+ "vec3":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false)",
+ "vec4":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false)",
+ "bvec2":"new TType(EbtBool, EbpUndefined, EvqGlobal, 2, false, false)",
+ "bvec3":"new TType(EbtBool, EbpUndefined, EvqGlobal, 3, false, false)",
+ "bvec4":"new TType(EbtBool, EbpUndefined, EvqGlobal, 4, false, false)",
+ "ivec2":"new TType(EbtInt, EbpUndefined, EvqGlobal, 2, false, false)",
+ "ivec3":"new TType(EbtInt, EbpUndefined, EvqGlobal, 3, false, false)",
+ "ivec4":"new TType(EbtInt, EbpUndefined, EvqGlobal, 4, false, false)",
+ "mat2":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, true, false)",
+ "mat3":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, true, false)",
+ "mat4":"new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, true, false)",
+ "sampler2D":"new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false)",
+ "samplerCube":"new TType(EbtSamplerCube, EbpUndefined, EvqGlobal, 1, false, false)",
+ "samplerExternalOES":"new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1, false, false)",
+ "sampler2DRect":"new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false)"
+},
+
+"common" : [
+{
+ "name": "radians",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "degrees"}
+ ]
+},
+{
+ "name": "radians",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "degrees"}
+ ]
+},
+{
+ "name": "radians",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "degrees"}
+ ]
+},
+{
+ "name": "radians",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "degrees"}
+ ]
+},
+{
+ "name": "degrees",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "radians"}
+ ]
+},
+{
+ "name": "degrees",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "radians"}
+ ]
+},
+{
+ "name": "degrees",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "radians"}
+ ]
+},
+{
+ "name": "degrees",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "radians"}
+ ]
+},
+{
+ "name": "sin",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "angle"}
+ ]
+},
+{
+ "name": "sin",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "angle"}
+ ]
+},
+{
+ "name": "sin",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "angle"}
+ ]
+},
+{
+ "name": "sin",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "angle"}
+ ]
+},
+{
+ "name": "cos",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "angle"}
+ ]
+},
+{
+ "name": "cos",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "angle"}
+ ]
+},
+{
+ "name": "cos",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "angle"}
+ ]
+},
+{
+ "name": "cos",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "angle"}
+ ]
+},
+{
+ "name": "tan",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "angle"}
+ ]
+},
+{
+ "name": "tan",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "angle"}
+ ]
+},
+{
+ "name": "tan",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "angle"}
+ ]
+},
+{
+ "name": "tan",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "angle"}
+ ]
+},
+{
+ "name": "asin",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "asin",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "asin",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "asin",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "acos",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "acos",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "acos",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "acos",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "y"},
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "y"},
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "y"},
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "y"},
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "y_over_x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "y_over_x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "y_over_x"}
+ ]
+},
+{
+ "name": "atan",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "y_over_x"}
+ ]
+},
+{
+ "name": "pow",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "pow",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "pow",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "pow",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "exp",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "exp",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "exp",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "exp",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "log",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "log",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "log",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "log",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "exp2",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "exp2",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "exp2",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "exp2",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "log2",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "log2",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "log2",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "log2",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "sqrt",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "sqrt",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "sqrt",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "sqrt",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "inversesqrt",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "inversesqrt",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "inversesqrt",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "inversesqrt",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "abs",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "abs",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "abs",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "abs",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "sign",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "sign",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "sign",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "sign",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "floor",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "floor",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "floor",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "floor",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "ceil",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "ceil",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "ceil",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "ceil",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "fract",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "fract",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "fract",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "fract",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "mod",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "min",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "max",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "minVal"},
+  {"type": "float", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "float", "name": "minVal"},
+  {"type": "float", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "float", "name": "minVal"},
+  {"type": "float", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "float", "name": "minVal"},
+  {"type": "float", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "minVal"},
+  {"type": "vec2", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "minVal"},
+  {"type": "vec3", "name": "maxVal"}
+ ]
+},
+{
+ "name": "clamp",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "minVal"},
+  {"type": "vec4", "name": "maxVal"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"},
+  {"type": "float", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"},
+  {"type": "float", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"},
+  {"type": "float", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"},
+  {"type": "float", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"},
+  {"type": "vec2", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"},
+  {"type": "vec3", "name": "a"}
+ ]
+},
+{
+ "name": "mix",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"},
+  {"type": "vec4", "name": "a"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "edge"},
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "edge"},
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "edge"},
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "edge"},
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "float", "name": "edge"},
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "float", "name": "edge"},
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "step",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "float", "name": "edge"},
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "edge0"},
+  {"type": "float", "name": "edge1"},
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "edge0"},
+  {"type": "vec2", "name": "edge1"},
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "edge0"},
+  {"type": "vec3", "name": "edge1"},
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "edge0"},
+  {"type": "vec4", "name": "edge1"},
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "float", "name": "edge0"},
+  {"type": "float", "name": "edge1"},
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "float", "name": "edge0"},
+  {"type": "float", "name": "edge1"},
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "smoothstep",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "float", "name": "edge0"},
+  {"type": "float", "name": "edge1"},
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "length",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "length",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "length",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "length",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "distance",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "p0"},
+  {"type": "float", "name": "p1"}
+ ]
+},
+{
+ "name": "distance",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec2", "name": "p0"},
+  {"type": "vec2", "name": "p1"}
+ ]
+},
+{
+ "name": "distance",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec3", "name": "p0"},
+  {"type": "vec3", "name": "p1"}
+ ]
+},
+{
+ "name": "distance",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec4", "name": "p0"},
+  {"type": "vec4", "name": "p1"}
+ ]
+},
+{
+ "name": "dot",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"},
+  {"type": "float", "name": "y"}
+ ]
+},
+{
+ "name": "dot",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "dot",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "dot",
+ "return_type": "float",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "cross",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "normalize",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "x"}
+ ]
+},
+{
+ "name": "normalize",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"}
+ ]
+},
+{
+ "name": "normalize",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"}
+ ]
+},
+{
+ "name": "normalize",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"}
+ ]
+},
+{
+ "name": "faceforward",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "N"},
+  {"type": "float", "name": "I"},
+  {"type": "float", "name": "Nref"}
+ ]
+},
+{
+ "name": "faceforward",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "N"},
+  {"type": "vec2", "name": "I"},
+  {"type": "vec2", "name": "Nref"}
+ ]
+},
+{
+ "name": "faceforward",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "N"},
+  {"type": "vec3", "name": "I"},
+  {"type": "vec3", "name": "Nref"}
+ ]
+},
+{
+ "name": "faceforward",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "N"},
+  {"type": "vec4", "name": "I"},
+  {"type": "vec4", "name": "Nref"}
+ ]
+},
+{
+ "name": "reflect",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "I"},
+  {"type": "float", "name": "N"}
+ ]
+},
+{
+ "name": "reflect",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "I"},
+  {"type": "vec2", "name": "N"}
+ ]
+},
+{
+ "name": "reflect",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "I"},
+  {"type": "vec3", "name": "N"}
+ ]
+},
+{
+ "name": "reflect",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "I"},
+  {"type": "vec4", "name": "N"}
+ ]
+},
+{
+ "name": "refract",
+ "return_type": "float",
+ "parameter": [
+  {"type": "float", "name": "I"},
+  {"type": "float", "name": "N"},
+  {"type": "float", "name": "eta"}
+ ]
+},
+{
+ "name": "refract",
+ "return_type": "vec2",
+ "parameter": [
+  {"type": "vec2", "name": "I"},
+  {"type": "vec2", "name": "N"},
+  {"type": "float", "name": "eta"}
+ ]
+},
+{
+ "name": "refract",
+ "return_type": "vec3",
+ "parameter": [
+  {"type": "vec3", "name": "I"},
+  {"type": "vec3", "name": "N"},
+  {"type": "float", "name": "eta"}
+ ]
+},
+{
+ "name": "refract",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "vec4", "name": "I"},
+  {"type": "vec4", "name": "N"},
+  {"type": "float", "name": "eta"}
+ ]
+},
+{
+ "name": "matrixCompMult",
+ "return_type": "mat2",
+ "parameter": [
+  {"type": "mat2", "name": "x"},
+  {"type": "mat2", "name": "y"}
+ ]
+},
+{
+ "name": "matrixCompMult",
+ "return_type": "mat3",
+ "parameter": [
+  {"type": "mat3", "name": "x"},
+  {"type": "mat3", "name": "y"}
+ ]
+},
+{
+ "name": "matrixCompMult",
+ "return_type": "mat4",
+ "parameter": [
+  {"type": "mat4", "name": "x"},
+  {"type": "mat4", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "lessThan",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "lessThanEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThan",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "greaterThanEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "bvec2", "name": "x"},
+  {"type": "bvec2", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "bvec3", "name": "x"},
+  {"type": "bvec3", "name": "y"}
+ ]
+},
+{
+ "name": "equal",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "bvec4", "name": "x"},
+  {"type": "bvec4", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "vec2", "name": "x"},
+  {"type": "vec2", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "vec3", "name": "x"},
+  {"type": "vec3", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "vec4", "name": "x"},
+  {"type": "vec4", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "ivec2", "name": "x"},
+  {"type": "ivec2", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "ivec3", "name": "x"},
+  {"type": "ivec3", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "ivec4", "name": "x"},
+  {"type": "ivec4", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "bvec2", "name": "x"},
+  {"type": "bvec2", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "bvec3", "name": "x"},
+  {"type": "bvec3", "name": "y"}
+ ]
+},
+{
+ "name": "notEqual",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "bvec4", "name": "x"},
+  {"type": "bvec4", "name": "y"}
+ ]
+},
+{
+ "name": "any",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec2", "name": "x"}
+ ]
+},
+{
+ "name": "any",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec3", "name": "x"}
+ ]
+},
+{
+ "name": "any",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec4", "name": "x"}
+ ]
+},
+{
+ "name": "all",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec2", "name": "x"}
+ ]
+},
+{
+ "name": "all",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec3", "name": "x"}
+ ]
+},
+{
+ "name": "all",
+ "return_type": "bool",
+ "parameter": [
+  {"type": "bvec4", "name": "x"}
+ ]
+},
+{
+ "name": "not",
+ "return_type": "bvec2",
+ "parameter": [
+  {"type": "bvec2", "name": "x"}
+ ]
+},
+{
+ "name": "not",
+ "return_type": "bvec3",
+ "parameter": [
+  {"type": "bvec3", "name": "x"}
+ ]
+},
+{
+ "name": "not",
+ "return_type": "bvec4",
+ "parameter": [
+  {"type": "bvec4", "name": "x"}
+ ]
+},
+{
+ "name": "texture2D",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2D", "name": "sampler"},
+  {"type": "vec2", "name": "coord"}
+ ]
+},
+{
+ "name": "texture2DProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2D", "name": "sampler"},
+  {"type": "vec3", "name": "coord"}
+ ]
+},
+{
+ "name": "texture2DProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2D", "name": "sampler"},
+  {"type": "vec4", "name": "coord"}
+ ]
+},
+{
+ "name": "textureCube",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "samplerCube", "name": "sampler"},
+  {"type": "vec3", "name": "coord"}
+ ]
+},
+{
+ "name": "texture2D",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "samplerExternalOES", "name": "sampler"},
+  {"type": "vec2", "name": "coord"}
+ ],
+ "condition":"resources.OES_EGL_image_external"
+},
+{
+ "name": "texture2DProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "samplerExternalOES", "name": "sampler"},
+  {"type": "vec3", "name": "coord"}
+ ],
+ "condition":"resources.OES_EGL_image_external"
+},
+{
+ "name": "texture2DProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "samplerExternalOES", "name": "sampler"},
+  {"type": "vec4", "name": "coord"}
+ ],
+ "condition":"resources.OES_EGL_image_external"
+},
+{
+ "name": "texture2DRect",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2DRect", "name": "sampler"},
+  {"type": "vec2", "name": "coord"}
+ ],
+ "condition":"resources.ARB_texture_rectangle"
+},
+{
+ "name": "texture2DRectProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2DRect", "name": "sampler"},
+  {"type": "vec3", "name": "coord"}
+ ],
+ "condition":"resources.ARB_texture_rectangle"
+},
+{
+ "name": "texture2DRectProj",
+ "return_type": "vec4",
+ "parameter": [
+  {"type": "sampler2DRect", "name": "sampler"},
+  {"type": "vec4", "name": "coord"}
+ ],
+ "condition":"resources.ARB_texture_rectangle"
+}
+]
+} 
diff --git a/src/compiler/generate_builtin_symbol_table.py b/src/compiler/generate_builtin_symbol_table.py
new file mode 100644
index 0000000..d20970c
--- /dev/null
+++ b/src/compiler/generate_builtin_symbol_table.py
@@ -0,0 +1,91 @@
+#!/usr/bin/python
+
+# Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import json
+
+# This file contains the definitions for all the builtin in JSON format.
+json_data = open('builtin_symbols.json')
+builtin = json.load(json_data)
+
+# This maps the shader language's types and how to create the TTypes in the symbol table.
+ttypeMap = builtin["ttypemap"]
+
+# This is the output that we are going to generate.
+output = open('builtin_symbol_table.cpp', 'w');
+
+# The header part of the file.
+header = """// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// *************************************************************
+// This file is generated by generate_builtin_symbol_table.py.
+//                 * DO NOT HAND MODIFY *
+// *************************************************************
+#include "compiler/builtin_symbol_table.h"
+#include "compiler/SymbolTable.h"
+"""
+output.write(header)
+
+registerfunc = """
+static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param = {new TString(pname1), ptype1};
+  f->addParameter(param);
+  t->insert(*f);
+}
+static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param1 = {new TString(pname1), ptype1};
+  f->addParameter(param1);
+  TParameter param2 = {new TString(pname2), ptype2};
+  f->addParameter(param2);
+  t->insert(*f);
+}
+
+static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2, TType* ptype3, const char* pname3)
+{
+  TFunction* f = new TFunction(new TString(name), *rvalue);
+  TParameter param1 = {new TString(pname1), ptype1};
+  f->addParameter(param1);
+  TParameter param2 = {new TString(pname2), ptype2};
+  f->addParameter(param2);
+  TParameter param3 = {new TString(pname3), ptype3};
+  f->addParameter(param3);
+  t->insert(*f);
+}
+"""
+output.write(registerfunc)
+
+commonHeader = "void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {\n"
+output.write(commonHeader)
+
+for func in builtin["common"]:
+	out = ""
+	indent = "    ";
+	size = len(func['parameter'])
+	if 'condition' in func:
+		out += indent + "if (" + func['condition'] + ") {\n"
+		indent += indent;
+	out += indent + "builtin" + str(size) + "(t, "
+	out += ttypeMap[func['return_type']]
+	out += ", \"" + func['name'] + "\""
+	paramlist = func['parameter']
+	paramdef = "";
+	for param in paramlist:
+		paramdef += ", "
+		paramdef += ttypeMap[param['type']] 
+		paramdef += ", \"" + param['name'] + "\""
+	out += paramdef + ");\n"
+	if 'condition' in func:
+		out += "    }\n"
+	output.write(out)
+output.write("}\n")
+
+json_data.close()
+output.close()