summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-08-11 16:53:52 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-08-13 19:09:36 -0700
commit43ff8f1a4b90554eae489cebb7e05f983dd9ad66 (patch)
treed9a63bb1ce1257b45aea4bbcae450959b75cc64c
parentd802ba110f78c3eee9541867cde819ada1b2c449 (diff)
glsl2: Rework builtin function generation.
Each language version/extension and target now has a "profile" containing all of the available builtin function prototypes. These are written in GLSL, and come directly out of the GLSL spec (except for expanding genType). A new builtins/ir/ folder contains the hand-written IR for each builtin, regardless of what version includes it. Only those definitions that have prototypes in the profile will be included. The autogenerated IR for texture builtins is no longer written to disk, so there's no longer any confusion as to what's hand-written or generated. All scripts are now in python instead of perl.
-rw-r--r--src/glsl/Makefile5
-rw-r--r--src/glsl/builtin_function.cpp16561
-rw-r--r--src/glsl/builtins/110/clamp50
-rw-r--r--src/glsl/builtins/110/matrixCompMult32
-rw-r--r--src/glsl/builtins/110/max43
-rw-r--r--src/glsl/builtins/110/min43
-rw-r--r--src/glsl/builtins/110/noise_fake76
-rw-r--r--src/glsl/builtins/110/sign21
-rw-r--r--src/glsl/builtins/110/textures213
-rw-r--r--src/glsl/builtins/110_fs/derivatives73
-rw-r--r--src/glsl/builtins/110_fs/textures113
-rw-r--r--src/glsl/builtins/130/equal31
-rw-r--r--src/glsl/builtins/130/greaterThan31
-rw-r--r--src/glsl/builtins/130/greaterThanEqual31
-rw-r--r--src/glsl/builtins/130/lessThan31
-rw-r--r--src/glsl/builtins/130/lessThanEqual31
-rw-r--r--src/glsl/builtins/130/mix39
-rw-r--r--src/glsl/builtins/130/notEqual31
-rw-r--r--src/glsl/builtins/130/texelFetch107
-rw-r--r--src/glsl/builtins/130/texture110
-rw-r--r--src/glsl/builtins/130/textureGrad147
-rw-r--r--src/glsl/builtins/130/textureLod128
-rw-r--r--src/glsl/builtins/130/textureProj92
-rw-r--r--src/glsl/builtins/130/textureProjGrad122
-rw-r--r--src/glsl/builtins/130/textureProjLod107
-rw-r--r--src/glsl/builtins/130_fs/texture128
-rw-r--r--src/glsl/builtins/130_fs/textureProj107
-rw-r--r--src/glsl/builtins/ARB_texture_rectangle/textures16
-rw-r--r--src/glsl/builtins/EXT_texture_array/textures59
-rw-r--r--src/glsl/builtins/EXT_texture_array_fs/textures27
-rw-r--r--src/glsl/builtins/ir/abs (renamed from src/glsl/builtins/110/abs)0
-rw-r--r--src/glsl/builtins/ir/acos22
-rw-r--r--src/glsl/builtins/ir/all (renamed from src/glsl/builtins/110/all)0
-rw-r--r--src/glsl/builtins/ir/any (renamed from src/glsl/builtins/110/any)0
-rw-r--r--src/glsl/builtins/ir/asin (renamed from src/glsl/builtins/110/asin)25
-rw-r--r--src/glsl/builtins/ir/atan (renamed from src/glsl/builtins/110/atan)0
-rw-r--r--src/glsl/builtins/ir/ceil (renamed from src/glsl/builtins/110/ceil)0
-rw-r--r--src/glsl/builtins/ir/clamp (renamed from src/glsl/builtins/130/clamp)49
-rw-r--r--src/glsl/builtins/ir/cos (renamed from src/glsl/builtins/110/cos)0
-rw-r--r--src/glsl/builtins/ir/cosh (renamed from src/glsl/builtins/130/cosh)0
-rw-r--r--src/glsl/builtins/ir/cross (renamed from src/glsl/builtins/110/cross)0
-rw-r--r--src/glsl/builtins/ir/dFdx21
-rw-r--r--src/glsl/builtins/ir/dFdy21
-rw-r--r--src/glsl/builtins/ir/degrees (renamed from src/glsl/builtins/110/degrees)0
-rw-r--r--src/glsl/builtins/ir/distance (renamed from src/glsl/builtins/110/distance)0
-rw-r--r--src/glsl/builtins/ir/dot (renamed from src/glsl/builtins/110/dot)0
-rw-r--r--src/glsl/builtins/ir/equal (renamed from src/glsl/builtins/110/equal)30
-rw-r--r--src/glsl/builtins/ir/exp (renamed from src/glsl/builtins/110/exp)0
-rw-r--r--src/glsl/builtins/ir/exp2 (renamed from src/glsl/builtins/110/exp2)0
-rw-r--r--src/glsl/builtins/ir/faceforward (renamed from src/glsl/builtins/110/faceforward)0
-rw-r--r--src/glsl/builtins/ir/floor (renamed from src/glsl/builtins/110/floor)0
-rw-r--r--src/glsl/builtins/ir/fract (renamed from src/glsl/builtins/110/fract)0
-rw-r--r--src/glsl/builtins/ir/ftransform (renamed from src/glsl/builtins/110_vs/ftransform)0
-rw-r--r--src/glsl/builtins/ir/fwidth29
-rw-r--r--src/glsl/builtins/ir/greaterThan (renamed from src/glsl/builtins/110/greaterThan)30
-rw-r--r--src/glsl/builtins/ir/greaterThanEqual (renamed from src/glsl/builtins/110/greaterThanEqual)30
-rw-r--r--src/glsl/builtins/ir/inversesqrt (renamed from src/glsl/builtins/110/inversesqrt)0
-rw-r--r--src/glsl/builtins/ir/length (renamed from src/glsl/builtins/110/length)0
-rw-r--r--src/glsl/builtins/ir/lessThan (renamed from src/glsl/builtins/110/lessThan)30
-rw-r--r--src/glsl/builtins/ir/lessThanEqual (renamed from src/glsl/builtins/110/lessThanEqual)30
-rw-r--r--src/glsl/builtins/ir/log (renamed from src/glsl/builtins/110/log)0
-rw-r--r--src/glsl/builtins/ir/log2 (renamed from src/glsl/builtins/110/log2)0
-rw-r--r--src/glsl/builtins/ir/matrixCompMult (renamed from src/glsl/builtins/120/matrixCompMult)30
-rw-r--r--src/glsl/builtins/ir/max (renamed from src/glsl/builtins/130/max)42
-rw-r--r--src/glsl/builtins/ir/min (renamed from src/glsl/builtins/130/min)42
-rw-r--r--src/glsl/builtins/ir/mix (renamed from src/glsl/builtins/110/mix)38
-rw-r--r--src/glsl/builtins/ir/mod (renamed from src/glsl/builtins/110/mod)0
-rw-r--r--src/glsl/builtins/ir/noise118
-rw-r--r--src/glsl/builtins/ir/noise218
-rw-r--r--src/glsl/builtins/ir/noise318
-rw-r--r--src/glsl/builtins/ir/noise418
-rw-r--r--src/glsl/builtins/ir/normalize (renamed from src/glsl/builtins/110/normalize)0
-rw-r--r--src/glsl/builtins/ir/not (renamed from src/glsl/builtins/110/not)0
-rw-r--r--src/glsl/builtins/ir/notEqual (renamed from src/glsl/builtins/110/notEqual)30
-rw-r--r--src/glsl/builtins/ir/outerProduct (renamed from src/glsl/builtins/120/outerProduct)0
-rw-r--r--src/glsl/builtins/ir/pow (renamed from src/glsl/builtins/110/pow)0
-rw-r--r--src/glsl/builtins/ir/radians (renamed from src/glsl/builtins/110/radians)0
-rw-r--r--src/glsl/builtins/ir/reflect (renamed from src/glsl/builtins/110/reflect)0
-rw-r--r--src/glsl/builtins/ir/refract (renamed from src/glsl/builtins/110/refract)0
-rw-r--r--src/glsl/builtins/ir/sign (renamed from src/glsl/builtins/130/sign)20
-rw-r--r--src/glsl/builtins/ir/sin (renamed from src/glsl/builtins/110/sin)0
-rw-r--r--src/glsl/builtins/ir/sinh (renamed from src/glsl/builtins/130/sinh)0
-rw-r--r--src/glsl/builtins/ir/smoothstep (renamed from src/glsl/builtins/110/smoothstep)0
-rw-r--r--src/glsl/builtins/ir/sqrt (renamed from src/glsl/builtins/110/sqrt)0
-rw-r--r--src/glsl/builtins/ir/step (renamed from src/glsl/builtins/110/step)0
-rw-r--r--src/glsl/builtins/ir/tan (renamed from src/glsl/builtins/110/tan)0
-rw-r--r--src/glsl/builtins/ir/tanh (renamed from src/glsl/builtins/130/tanh)0
-rw-r--r--src/glsl/builtins/ir/transpose (renamed from src/glsl/builtins/120/transpose)0
-rw-r--r--src/glsl/builtins/profiles/110.frag364
-rw-r--r--src/glsl/builtins/profiles/110.vert351
-rw-r--r--src/glsl/builtins/profiles/120.frag396
-rw-r--r--src/glsl/builtins/profiles/120.vert383
-rw-r--r--src/glsl/builtins/profiles/ARB_texture_rectangle.frag7
-rw-r--r--src/glsl/builtins/profiles/ARB_texture_rectangle.vert7
-rw-r--r--src/glsl/builtins/profiles/EXT_texture_array.frag11
-rw-r--r--src/glsl/builtins/profiles/EXT_texture_array.vert11
-rw-r--r--src/glsl/builtins/tools/builtin_function.cpp39
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.pl164
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py207
-rwxr-xr-xsrc/glsl/builtins/tools/texture_builtins.py261
-rw-r--r--src/glsl/ir_reader.cpp24
-rw-r--r--src/glsl/ir_reader.h2
102 files changed, 15738 insertions, 5685 deletions
diff --git a/src/glsl/Makefile b/src/glsl/Makefile
index 110228e72a..b13a612591 100644
--- a/src/glsl/Makefile
+++ b/src/glsl/Makefile
@@ -164,7 +164,8 @@ glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
bison -v -o "$@" --defines=glcpp/glcpp-parse.h $<
-builtin_function.cpp: builtins/*/*
- ./builtins/tools/generate_builtins.pl > builtin_function.cpp
+builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py
+ cp builtins/tools/builtin_function.cpp .
+ ./builtins/tools/generate_builtins.py > builtin_function.cpp
-include depend
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index 1d9a58a5ca..f2abea961d 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -1,4 +1,4 @@
-/* DO NOT MODIFY - automatically generated by generate_builtins.pl */
+/* DO NOT MODIFY - automatically generated by generate_builtins.py */
/*
* Copyright © 2010 Intel Corporation
*
@@ -27,12 +27,13 @@
#include "glsl_parser_extras.h"
#include "ir_reader.h"
#include "program.h"
+#include "ast.h"
extern "C" struct gl_shader *
_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
gl_shader *
-read_builtins(GLenum target, const char **functions, unsigned count)
+read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
{
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
@@ -46,13 +47,19 @@ read_builtins(GLenum target, const char **functions, unsigned count)
sh->ir = new(sh) exec_list;
sh->symbols = st->symbols;
+ /* Read the IR containing the prototypes */
+ _mesa_glsl_read_ir(st, sh->ir, protos, true);
+
+ /* Read ALL the function bodies, telling the IR reader not to scan for
+ * prototypes (we've already created them). The IR reader will skip any
+ * signature that does not already exist as a prototype.
+ */
for (unsigned i = 0; i < count; i++) {
- _mesa_glsl_read_ir(st, sh->ir, functions[i]);
+ _mesa_glsl_read_ir(st, sh->ir, functions[i], false);
if (st->error) {
- printf("error reading builtin: %.35s ...\n", functions[i]);
- delete st;
- talloc_free(sh);
+ printf("error reading builtin: %.35s ...\n", functions[i]);
+ talloc_free(sh);
return NULL;
}
}
@@ -63,33 +70,7 @@ read_builtins(GLenum target, const char **functions, unsigned count)
return sh;
}
-/* 110 builtins */
-
-static const char *builtins_110_abs = {
- "((function abs\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float abs (var_ref arg0)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 abs (var_ref arg0)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 abs (var_ref arg0)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 abs (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_all = {
+static const char *builtin_all =
"((function all\n"
" (signature bool\n"
" (parameters\n"
@@ -106,1240 +87,661 @@ static const char *builtins_110_all = {
" (declare (in) bvec4 arg0))\n"
" ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))\n"
"))\n"
-};
-
-static const char *builtins_110_any = {
- "((function any\n"
- " (signature bool\n"
+ ""
+;
+static const char *builtin_textureProj =
+ "((function textureProj\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) bvec2 arg0))\n"
- " ((return (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
"\n"
- " (signature bool\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) bvec3 arg0))\n"
- " ((return (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
"\n"
- " (signature bool\n"
- " (parameters\n"
- " (declare (in) bvec4 arg0))\n"
- " ((return (expression bool || (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_asin = {
- "((function asin\n"
- " (signature float\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) float x))\n"
- " ((return (expression float *\n"
- " (expression float sign (var_ref x))\n"
- " (expression float -\n"
- " (expression float *\n"
- " (constant float (3.1415926))\n"
- " (constant float (0.5)))\n"
- " (expression float *\n"
- " (expression float sqrt\n"
- " (expression float -\n"
- " (constant float (1.0))\n"
- " (expression float abs (var_ref x))))\n"
- " (expression float +\n"
- " (constant float (1.5707288))\n"
- " (expression float *\n"
- " (expression float abs (var_ref x))\n"
- " (expression float +\n"
- " (constant float (-0.2121144))\n"
- " (expression float *\n"
- " (constant float (0.0742610))\n"
- " (expression float abs (var_ref x))))))))))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (expression vec2 *\n"
- " (expression vec2 sign (var_ref x))\n"
- " (expression vec2 -\n"
- " (expression float *\n"
- " (constant float (3.1415926))\n"
- " (constant float (0.5)))\n"
- " (expression vec2 *\n"
- " (expression vec2 sqrt\n"
- " (expression vec2 -\n"
- " (constant float (1.0))\n"
- " (expression vec2 abs (var_ref x))))\n"
- " (expression vec2 +\n"
- " (constant float (1.5707288))\n"
- " (expression vec2 *\n"
- " (expression vec2 abs (var_ref x))\n"
- " (expression vec2 +\n"
- " (constant float (-0.2121144))\n"
- " (expression vec2 *\n"
- " (constant float (0.0742610))\n"
- " (expression vec2 abs (var_ref x))))))))))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (expression vec3 *\n"
- " (expression vec3 sign (var_ref x))\n"
- " (expression vec3 -\n"
- " (expression float *\n"
- " (constant float (3.1415926))\n"
- " (constant float (0.5)))\n"
- " (expression vec3 *\n"
- " (expression vec3 sqrt\n"
- " (expression vec3 -\n"
- " (constant float (1.0))\n"
- " (expression vec3 abs (var_ref x))))\n"
- " (expression vec3 +\n"
- " (constant float (1.5707288))\n"
- " (expression vec3 *\n"
- " (expression vec3 abs (var_ref x))\n"
- " (expression vec3 +\n"
- " (constant float (-0.2121144))\n"
- " (expression vec3 *\n"
- " (constant float (0.0742610))\n"
- " (expression vec3 abs (var_ref x))))))))))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (expression vec4 *\n"
- " (expression vec4 sign (var_ref x))\n"
- " (expression vec4 -\n"
- " (expression float *\n"
- " (constant float (3.1415926))\n"
- " (constant float (0.5)))\n"
- " (expression vec4 *\n"
- " (expression vec4 sqrt\n"
- " (expression vec4 -\n"
- " (constant float (1.0))\n"
- " (expression vec4 abs (var_ref x))))\n"
- " (expression vec4 +\n"
- " (constant float (1.5707288))\n"
- " (expression vec4 *\n"
- " (expression vec4 abs (var_ref x))\n"
- " (expression vec4 +\n"
- " (constant float (-0.2121144))\n"
- " (expression vec4 *\n"
- " (constant float (0.0742610))\n"
- " (expression vec4 abs (var_ref x)))))))))))\n"
- "))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (function acos\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (expression float - (constant float (1.5707963))\n"
- " (call asin ((var_ref x)))))))\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (expression vec2 - (constant float (1.5707963))\n"
- " (call asin ((var_ref x)))))))\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (expression vec3 - (constant float (1.5707963))\n"
- " (call asin ((var_ref x)))))))\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (expression vec4 - (constant float (1.5707963))\n"
- " (call asin ((var_ref x)))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_atan = {
- "((function atan\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (call asin ((expression float *\n"
- " (var_ref x)\n"
- " (expression float rsq\n"
- " (expression float +\n"
- " (expression float *\n"
- " (var_ref x)\n"
- " (var_ref x))\n"
- " (constant float (1.0))))))))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 y_over_x))\n"
- " ((return (call asin ((expression vec2 *\n"
- " (var_ref y_over_x)\n"
- " (expression vec2 rsq\n"
- " (expression vec2 +\n"
- " (expression vec2 *\n"
- " (var_ref y_over_x)\n"
- " (var_ref y_over_x))\n"
- " (constant float (1.0))))))))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 y_over_x))\n"
- " ((return (call asin ((expression vec3 *\n"
- " (var_ref y_over_x)\n"
- " (expression vec3 rsq\n"
- " (expression vec3 +\n"
- " (expression vec3 *\n"
- " (var_ref y_over_x)\n"
- " (var_ref y_over_x))\n"
- " (constant float (1.0))))))))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 y_over_x))\n"
- " ((return (call asin ((expression vec4 *\n"
- " (var_ref y_over_x)\n"
- " (expression vec4 rsq\n"
- " (expression vec4 +\n"
- " (expression vec4 *\n"
- " (var_ref y_over_x)\n"
- " (var_ref y_over_x))\n"
- " (constant float (1.0))))))))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in ) float y)\n"
- " (declare (in ) float x)\n"
- " )\n"
- " (\n"
- " (declare () float r)\n"
- " (declare ( ) float abs_retval)\n"
- " (assign (constant bool (1)) (var_ref abs_retval) (call abs ((var_ref x) ))\n"
- ") \n"
- " (if (expression bool > (var_ref abs_retval) (constant float (0.000100)) ) (\n"
- " (declare ( ) float atan_retval)\n"
- " (assign (constant bool (1)) (var_ref atan_retval) (call atan ((expression float / (var_ref y) (var_ref x) ) ))\n"
- ") \n"
- " (assign (constant bool (1)) (var_ref r) (var_ref atan_retval) ) \n"
- " (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n"
- " (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
- " (declare ( ) float assignment_tmp)\n"
- " (assign (constant bool (1)) (var_ref assignment_tmp) (expression float + (var_ref r) (constant float (3.141593)) ) ) \n"
- " (assign (constant bool (1)) (var_ref r) (var_ref assignment_tmp) ) \n"
- " )\n"
- " (\n"
- " (declare ( ) float assignment_tmp)\n"
- " (assign (constant bool (1)) (var_ref assignment_tmp) (expression float - (var_ref r) (constant float (3.141593)) ) ) \n"
- " (assign (constant bool (1)) (var_ref r) (var_ref assignment_tmp) ) \n"
- " ))\n"
- "\n"
- " )\n"
- " (\n"
- " ))\n"
- "\n"
- " )\n"
- " (\n"
- " (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
- " (assign (constant bool (1)) (var_ref r) (constant float (1.570796)) ) \n"
- " )\n"
- " (\n"
- " (assign (constant bool (1)) (var_ref r) (constant float (-1.570796)) ) \n"
- " ))\n"
- "\n"
- " ))\n"
- "\n"
- " (return (var_ref r) )\n"
- " ))\n"
- "\n"
- "\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 y)\n"
- " (declare (in) vec2 x))\n"
- " ((declare () vec2 r)\n"
- " (assign (constant bool (1))\n"
- " (swiz x (var_ref r))\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz y (var_ref r))\n"
- " (call atan ((swiz y (var_ref y))\n"
- " (swiz y (var_ref x)))))\n"
- " (return (var_ref r))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 y)\n"
- " (declare (in) vec3 x))\n"
- " ((declare () vec3 r)\n"
- " (assign (constant bool (1))\n"
- " (swiz x (var_ref r))\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz y (var_ref r))\n"
- " (call atan ((swiz y (var_ref y))\n"
- " (swiz y (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz z (var_ref r))\n"
- " (call atan ((swiz z (var_ref y))\n"
- " (swiz z (var_ref x)))))\n"
- " (return (var_ref r))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 y)\n"
- " (declare (in) vec4 x))\n"
- " ((declare () vec4 r)\n"
- " (assign (constant bool (1))\n"
- " (swiz x (var_ref r))\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz y (var_ref r))\n"
- " (call atan ((swiz y (var_ref y))\n"
- " (swiz y (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz z (var_ref r))\n"
- " (call atan ((swiz z (var_ref y))\n"
- " (swiz z (var_ref x)))))\n"
- " (assign (constant bool (1))\n"
- " (swiz w (var_ref r))\n"
- " (call atan ((swiz w (var_ref y))\n"
- " (swiz w (var_ref x)))))\n"
- " (return (var_ref r)))))\n"
- "\n"
- "))\n"
-};
-
-static const char *builtins_110_ceil = {
- "((function ceil\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float ceil (var_ref arg0)))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 ceil (var_ref arg0)))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 ceil (var_ref arg0)))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 ceil (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_clamp = {
- "((function clamp\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1)\n"
- " (declare (in) vec2 arg2))\n"
- " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1)\n"
- " (declare (in) vec3 arg2))\n"
- " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1)\n"
- " (declare (in) vec4 arg2))\n"
- " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) float arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) float arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) float arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_cos = {
- "((function cos\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float angle))\n"
- " ((return (expression float cos (var_ref angle)))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 angle))\n"
- " ((return (expression vec2 cos (var_ref angle)))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 angle))\n"
- " ((return (expression vec3 cos (var_ref angle)))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 angle))\n"
- " ((return (expression vec4 cos (var_ref angle)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_cross = {
- "((function cross\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((return (expression vec3 cross (var_ref arg0) (var_ref arg1)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_degrees = {
- "((function degrees\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float * (var_ref arg0) (constant float (57.295780))))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_distance = {
- "((function distance\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float p0)\n"
- " (declare (in) float p1))\n"
- " ((declare () float p)\n"
- " (assign (constant bool (1)) (var_ref p) (expression float - (var_ref p0) (var_ref p1)))\n"
- " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature float\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 p0)\n"
- " (declare (in) vec2 p1))\n"
- " ((declare () vec2 p)\n"
- " (assign (constant bool (1)) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n"
- " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature float\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 p0)\n"
- " (declare (in) vec3 p1))\n"
- " ((declare () vec3 p)\n"
- " (assign (constant bool (1)) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n"
- " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec4 p0)\n"
- " (declare (in) vec4 p1))\n"
- " ((declare () vec4 p)\n"
- " (assign (constant bool (1)) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n"
- " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
"))\n"
-};
-
-static const char *builtins_110_dot = {
- "((function dot\n"
+ ""
+;
+static const char *builtin_fwidth =
+ "((function fwidth\n"
" (signature float\n"
" (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) float p))\n"
+ " ((return (expression float +\n"
+ " (expression float abs (expression float dFdx (var_ref p)))\n"
+ " (expression float abs (expression float dFdy (var_ref p)))))))\n"
"\n"
- " (signature float\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec2 p))\n"
+ " ((return (expression vec2 +\n"
+ " (expression vec2 abs (expression vec2 dFdx (var_ref p)))\n"
+ " (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))\n"
"\n"
- " (signature float\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec3 p))\n"
+ " ((return (expression vec3 +\n"
+ " (expression vec3 abs (expression vec3 dFdx (var_ref p)))\n"
+ " (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))\n"
"\n"
- " (signature float\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec4 p))\n"
+ " ((return (expression vec4 +\n"
+ " (expression vec4 abs (expression vec4 dFdx (var_ref p)))\n"
+ " (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))\n"
"))\n"
-};
-
-static const char *builtins_110_equal = {
- "((function equal\n"
- " (signature bvec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec3\n"
+ ""
+;
+static const char *builtin_texture2DProj =
+ "((function texture2DProj\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- " (signature bvec2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_110_exp = {
- "((function exp\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float exp (var_ref arg0)))))\n"
- "\n"
- " (signature vec2\n"
+ ""
+;
+static const char *builtin_shadow1DProjLod =
+ "((function shadow1DProjLod\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 exp (var_ref arg0)))))\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
- " (signature vec3\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture3DLod =
+ "((function texture3DLod\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 exp (var_ref arg0)))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
+ "))\n"
+ ""
+;
+static const char *builtin_textureCubeLod =
+ "((function textureCubeLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 exp (var_ref arg0)))))\n"
+ " (declare (in) samplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
"))\n"
-};
-
-static const char *builtins_110_exp2 = {
- "((function exp2\n"
- " (signature float\n"
+ ""
+;
+static const char *builtin_texture =
+ "((function texture\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float exp2 (var_ref arg0)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 exp2 (var_ref arg0)))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 exp2 (var_ref arg0)))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 exp2 (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_faceforward = {
- "((function faceforward\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float N)\n"
- " (declare (in) float I)\n"
- " (declare (in) float Nref))\n"
- " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
- " ((return (var_ref N)))\n"
- " ((return (expression float neg (var_ref N)))))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 N)\n"
- " (declare (in) vec2 I)\n"
- " (declare (in) vec2 Nref))\n"
- " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
- " ((return (var_ref N)))\n"
- " ((return (expression vec2 neg (var_ref N)))))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 N)\n"
- " (declare (in) vec3 I)\n"
- " (declare (in) vec3 Nref))\n"
- " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
- " ((return (var_ref N)))\n"
- " ((return (expression vec3 neg (var_ref N)))))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 N)\n"
- " (declare (in) vec4 I)\n"
- " (declare (in) vec4 Nref))\n"
- " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
- " ((return (var_ref N)))\n"
- " ((return (expression vec4 neg (var_ref N)))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_floor = {
- "((function floor\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float floor (var_ref arg0)))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 floor (var_ref arg0)))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 floor (var_ref arg0)))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 floor (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_fract = {
- "((function fract\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (expression float fract (var_ref x)))))\n"
+ " (declare (in) samplerCube sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (expression vec2 fract (var_ref x)))))\n"
+ " (declare (in) isamplerCube sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (expression vec3 fract (var_ref x)))))\n"
+ " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (expression vec4 fract (var_ref x)))))\n"
- "))\n"
- "\n"
-};
-
-static const char *builtins_110_greaterThan = {
- "((function greaterThan\n"
- " (signature bvec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec2\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_110_greaterThanEqual = {
- "((function greaterThanEqual\n"
- " (signature bvec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_110_inversesqrt = {
- "((function inversesqrt\n"
- " (signature float\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float rsq (var_ref arg0)))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 rsq (var_ref arg0)))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 rsq (var_ref arg0)))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 rsq (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_length = {
- "((function length\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature float\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_lessThan = {
- "((function lessThan\n"
- " (signature bvec2\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) samplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec2\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_110_lessThanEqual = {
- "((function lessThanEqual\n"
- " (signature bvec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_110_log = {
- "((function log\n"
+ ""
+;
+static const char *builtin_degrees =
+ "((function degrees\n"
" (signature float\n"
" (parameters\n"
" (declare (in) float arg0))\n"
- " ((return (expression float log (var_ref arg0)))))\n"
+ " ((return (expression float * (var_ref arg0) (constant float (57.295780))))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 log (var_ref arg0)))))\n"
+ " ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 log (var_ref arg0)))))\n"
+ " ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 log (var_ref arg0)))))\n"
+ " ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))\n"
"))\n"
-};
-
-static const char *builtins_110_log2 = {
- "((function log2\n"
+ ""
+;
+static const char *builtin_texture2DArrayLod =
+ "((function texture2DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_ceil =
+ "((function ceil\n"
" (signature float\n"
" (parameters\n"
" (declare (in) float arg0))\n"
- " ((return (expression float log2 (var_ref arg0)))))\n"
+ " ((return (expression float ceil (var_ref arg0)))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 log2 (var_ref arg0)))))\n"
+ " ((return (expression vec2 ceil (var_ref arg0)))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 log2 (var_ref arg0)))))\n"
+ " ((return (expression vec3 ceil (var_ref arg0)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 log2 (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_matrixCompMult = {
- "((function matrixCompMult\n"
- " (signature mat2\n"
- " (parameters\n"
- " (declare (in) mat2 x)\n"
- " (declare (in) mat2 y))\n"
- " ((declare () mat2 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- "(return (var_ref z))))\n"
- "\n"
- " (signature mat3\n"
- " (parameters\n"
- " (declare (in) mat3 x)\n"
- " (declare (in) mat3 y))\n"
- " ((declare () mat3 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- "(return (var_ref z))))\n"
- "\n"
- " (signature mat4\n"
- " (parameters\n"
- " (declare (in) mat4 x)\n"
- " (declare (in) mat4 y))\n"
- " ((declare () mat4 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
- "(return (var_ref z))))\n"
+ " ((return (expression vec4 ceil (var_ref arg0)))))\n"
"))\n"
- "\n"
-};
-
-static const char *builtins_110_max = {
- "((function max\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression float max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
+ ""
+;
+static const char *builtin_texture1D =
+ "((function texture1D\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_min = {
- "((function min\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression float min (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
"))\n"
-};
-
-static const char *builtins_110_mix = {
- "((function mix\n"
- " (signature float\n"
+ ""
+;
+static const char *builtin_not =
+ "((function not\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))\n"
+ " (declare (in) bvec2 arg0))\n"
+ " ((return (expression bvec2 ! (var_ref arg0)))))\n"
"\n"
- " (signature vec2\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1)\n"
- " (declare (in) vec2 arg2))\n"
- " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
+ " (declare (in) bvec3 arg0))\n"
+ " ((return (expression bvec3 ! (var_ref arg0)))))\n"
"\n"
- " (signature vec3\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1)\n"
- " (declare (in) vec3 arg2))\n"
- " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
- "\n"
+ " (declare (in) bvec4 arg0))\n"
+ " ((return (expression bvec4 ! (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2DRectProj =
+ "((function texture2DRectProj\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1)\n"
- " (declare (in) vec4 arg2))\n"
- " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
+ " (declare (in) sampler2DRect sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1)\n"
- " (declare (in) float arg2))\n"
- " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
+ " (declare (in) sampler2DRect sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ "\n"
"))\n"
-};
-
-static const char *builtins_110_mod = {
+ ""
+;
+static const char *builtin_mod =
"((function mod\n"
" (signature float\n"
" (parameters\n"
@@ -1383,223 +785,9 @@ static const char *builtins_110_mod = {
" (declare (in) float arg1))\n"
" ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n"
"))\n"
-};
-
-static const char *builtins_110_noise_fake = {
- "((function noise1\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (constant float (0)))))\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (constant float (0)))))\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (constant float (0)))))\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (constant float (0)))))\n"
- " )\n"
- "\n"
- " (function noise2\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (constant vec2 (0 0)))))\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (constant vec2 (0 0)))))\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (constant vec2 (0 0)))))\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (constant vec2 (0 0)))))\n"
- " )\n"
- "\n"
- " (function noise3\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (constant vec3 (0 0 0)))))\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (constant vec3 (0 0 0)))))\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (constant vec3 (0 0 0)))))\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (constant vec3 (0 0 0)))))\n"
- " )\n"
- "\n"
- " (function noise4\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (constant vec4 (0 0 0 0)))))\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (constant vec4 (0 0 0 0)))))\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (constant vec4 (0 0 0 0)))))\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (constant vec4 (0 0 0 0)))))\n"
- " )\n"
- ")\n"
-};
-
-static const char *builtins_110_normalize = {
- "((function normalize\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
- "))\n"
-};
-
-static const char *builtins_110_not = {
- "((function not\n"
- " (signature bvec2\n"
- " (parameters\n"
- " (declare (in) bvec2 arg0))\n"
- " ((return (expression bvec2 ! (var_ref arg0)))))\n"
- "\n"
- " (signature bvec3\n"
- " (parameters\n"
- " (declare (in) bvec3 arg0))\n"
- " ((return (expression bvec3 ! (var_ref arg0)))))\n"
- "\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) bvec4 arg0))\n"
- " ((return (expression bvec4 ! (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_notEqual = {
- "((function notEqual\n"
- " (signature bvec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec2\n"
- " (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec3\n"
- " (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "\n"
- " (signature bvec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
- " (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_110_pow = {
- "((function pow\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float arg0)\n"
- " (declare (in) float arg1))\n"
- " ((return (expression float pow (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0)\n"
- " (declare (in) vec3 arg1))\n"
- " ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0)\n"
- " (declare (in) vec4 arg1))\n"
- " ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_radians = {
+ ""
+;
+static const char *builtin_radians =
"((function radians\n"
" (signature float\n"
" (parameters\n"
@@ -1621,223 +809,9 @@ static const char *builtins_110_radians = {
" (declare (in) vec4 arg0))\n"
" ((return (expression vec4 * (var_ref arg0) (constant float (0.017453))))))\n"
"))\n"
-};
-
-static const char *builtins_110_reflect = {
- "((function reflect\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float i)\n"
- " (declare (in) float n))\n"
- " ((return (expression float -\n"
- " (var_ref i)\n"
- " (expression float *\n"
- " (constant float (2.0))\n"
- " (expression float *\n"
- " (expression float dot\n"
- " (var_ref n)\n"
- " (var_ref i))\n"
- " (var_ref n)))))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 i)\n"
- " (declare (in) vec2 n))\n"
- " ((return (expression vec2 -\n"
- " (var_ref i)\n"
- " (expression vec2 *\n"
- " (constant float (2.0))\n"
- " (expression vec2 *\n"
- " (expression float dot\n"
- " (var_ref n)\n"
- " (var_ref i))\n"
- " (var_ref n)))))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 i)\n"
- " (declare (in) vec3 n))\n"
- " ((return (expression vec3 -\n"
- " (var_ref i)\n"
- " (expression vec3 *\n"
- " (constant float (2.0))\n"
- " (expression vec3 *\n"
- " (expression float dot\n"
- " (var_ref n)\n"
- " (var_ref i))\n"
- " (var_ref n)))))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 i)\n"
- " (declare (in) vec4 n))\n"
- " ((return (expression vec4 -\n"
- " (var_ref i)\n"
- " (expression vec4 *\n"
- " (constant float (2.0))\n"
- " (expression vec4 *\n"
- " (expression float dot\n"
- " (var_ref n)\n"
- " (var_ref i))\n"
- " (var_ref n)))))))\n"
- "\n"
- "))\n"
-};
-
-static const char *builtins_110_refract = {
- "((function refract\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float i)\n"
- " (declare (in) float n)\n"
- " (declare (in) float eta))\n"
- " ((declare () float k)\n"
- " (assign (constant bool (1)) (var_ref k)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * (var_ref eta)\n"
- " (expression float * (var_ref eta)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * \n"
- " (expression float dot (var_ref n) (var_ref i))\n"
- " (expression float dot (var_ref n) (var_ref i))))))))\n"
- " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
- " ((return (constant float (0.0))))\n"
- " ((return (expression float -\n"
- " (expression float * (var_ref eta) (var_ref i))\n"
- " (expression float *\n"
- " (expression float +\n"
- " (expression float * (var_ref eta)\n"
- " (expression float dot (var_ref n) (var_ref i)))\n"
- " (expression float sqrt (var_ref k)))\n"
- " (var_ref n))))))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 i)\n"
- " (declare (in) vec2 n)\n"
- " (declare (in) float eta))\n"
- " ((declare () float k)\n"
- " (assign (constant bool (1)) (var_ref k)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * (var_ref eta)\n"
- " (expression float * (var_ref eta)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * \n"
- " (expression float dot (var_ref n) (var_ref i))\n"
- " (expression float dot (var_ref n) (var_ref i))))))))\n"
- " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
- " ((return (constant vec2 (0.0 0.0))))\n"
- " ((return (expression vec2 -\n"
- " (expression vec2 * (var_ref eta) (var_ref i))\n"
- " (expression vec2 *\n"
- " (expression float +\n"
- " (expression float * (var_ref eta)\n"
- " (expression float dot (var_ref n) (var_ref i)))\n"
- " (expression float sqrt (var_ref k)))\n"
- " (var_ref n))))))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 i)\n"
- " (declare (in) vec3 n)\n"
- " (declare (in) float eta))\n"
- " ((declare () float k)\n"
- " (assign (constant bool (1)) (var_ref k)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * (var_ref eta)\n"
- " (expression float * (var_ref eta)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * \n"
- " (expression float dot (var_ref n) (var_ref i))\n"
- " (expression float dot (var_ref n) (var_ref i))))))))\n"
- " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
- " ((return (constant vec3 (0.0 0.0 0.0))))\n"
- " ((return (expression vec3 -\n"
- " (expression vec3 * (var_ref eta) (var_ref i))\n"
- " (expression vec3 *\n"
- " (expression float +\n"
- " (expression float * (var_ref eta)\n"
- " (expression float dot (var_ref n) (var_ref i)))\n"
- " (expression float sqrt (var_ref k)))\n"
- " (var_ref n))))))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 i)\n"
- " (declare (in) vec4 n)\n"
- " (declare (in) float eta))\n"
- " ((declare () float k)\n"
- " (assign (constant bool (1)) (var_ref k)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * (var_ref eta)\n"
- " (expression float * (var_ref eta)\n"
- " (expression float - (constant float (1.0))\n"
- " (expression float * \n"
- " (expression float dot (var_ref n) (var_ref i))\n"
- " (expression float dot (var_ref n) (var_ref i))))))))\n"
- " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
- " ((return (constant vec4 (0.0 0.0 0.0 0.0))))\n"
- " ((return (expression vec4 -\n"
- " (expression vec4 * (var_ref eta) (var_ref i))\n"
- " (expression vec4 *\n"
- " (expression float +\n"
- " (expression float * (var_ref eta)\n"
- " (expression float dot (var_ref n) (var_ref i)))\n"
- " (expression float sqrt (var_ref k)))\n"
- " (var_ref n))))))))\n"
- "\n"
- "))\n"
-};
-
-static const char *builtins_110_sign = {
- "((function sign\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float x))\n"
- " ((return (expression float sign (var_ref x)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 x))\n"
- " ((return (expression vec2 sign (var_ref x)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 x))\n"
- " ((return (expression vec3 sign (var_ref x)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 x))\n"
- " ((return (expression vec4 sign (var_ref x)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_sin = {
- "((function sin\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) float angle))\n"
- " ((return (expression float sin (var_ref angle)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 angle))\n"
- " ((return (expression vec2 sin (var_ref angle)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 angle))\n"
- " ((return (expression vec3 sin (var_ref angle)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 angle))\n"
- " ((return (expression vec4 sin (var_ref angle)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_smoothstep = {
+ ""
+;
+static const char *builtin_smoothstep =
"((function smoothstep\n"
" (signature float\n"
" (parameters\n"
@@ -1991,481 +965,651 @@ static const char *builtins_110_smoothstep = {
" (constant vec4 (0.0 0.0 0.0 0.0))))))\n"
"))\n"
"\n"
-};
-
-static const char *builtins_110_sqrt = {
- "((function sqrt\n"
- " (signature float\n"
+ ""
+;
+static const char *builtin_textureProjGrad =
+ "((function textureProjGrad\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) float arg0))\n"
- " ((return (expression float sqrt (var_ref arg0)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 sqrt (var_ref arg0)))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 sqrt (var_ref arg0)))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 sqrt (var_ref arg0)))))\n"
- "))\n"
-};
-
-static const char *builtins_110_step = {
- "((function step\n"
- " (signature float\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) float edge)\n"
- " (declare (in) float x))\n"
- " ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) float edge)\n"
- " (declare (in) vec2 x))\n"
- " ((declare () vec2 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (return (var_ref t))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) float edge)\n"
- " (declare (in) vec3 x))\n"
- " ((declare () vec3 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
- " (return (var_ref t))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) float edge)\n"
- " (declare (in) vec4 x))\n"
- " ((declare () vec4 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (swiz w (var_ref t)) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n"
- " (return (var_ref t))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) vec2 edge)\n"
- " (declare (in) vec2 x))\n"
- " ((declare () vec2 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (return (var_ref t))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) vec3 edge)\n"
- " (declare (in) vec3 x))\n"
- " ((declare () vec3 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
- " (return (var_ref t))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 edge)\n"
- " (declare (in) vec4 x))\n"
- " ((declare () vec4 t)\n"
- " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz z (var_ref edge)))))\n"
- " (assign (constant bool (1)) (swiz w (var_ref t)) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n"
- " (return (var_ref t))))\n"
- "))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
-};
-
-static const char *builtins_110_tan = {
- "((function tan\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_dFdx =
+ "((function dFdx\n"
" (signature float\n"
" (parameters\n"
- " (declare (in) float angle))\n"
- " ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))\n"
+ " (declare (in) float p))\n"
+ " ((return (expression float dFdx (var_ref p)))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
- " (declare (in) vec2 angle))\n"
- " ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))\n"
+ " (declare (in) vec2 p))\n"
+ " ((return (expression vec2 dFdx (var_ref p)))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
- " (declare (in) vec3 angle))\n"
- " ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))\n"
+ " (declare (in) vec3 p))\n"
+ " ((return (expression vec3 dFdx (var_ref p)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 angle))\n"
- " ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))\n"
+ " (declare (in) vec4 p))\n"
+ " ((return (expression vec4 dFdx (var_ref p)))))\n"
"))\n"
-};
-
-static const char *builtins_110_textures = {
- "((function texture1D\n"
- " (signature vec4\n"
+ ""
+;
+static const char *builtin_dFdy =
+ "((function dFdy\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) float p))\n"
+ " ((return (expression float dFdy (var_ref p)))))\n"
"\n"
- ")\n"
- " (function texture1DLod\n"
- " (signature vec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec2 p))\n"
+ " ((return (expression vec2 dFdy (var_ref p)))))\n"
"\n"
- ")\n"
- " (function texture1DProj\n"
- " (signature vec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " (declare (in) vec3 p))\n"
+ " ((return (expression vec3 dFdy (var_ref p)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
- "\n"
- ")\n"
- " (function texture1DProjLod\n"
+ " (declare (in) vec4 p))\n"
+ " ((return (expression vec4 dFdy (var_ref p)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_textureGrad =
+ "((function textureGrad\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture2D\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- "(function texture2DLod\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture2DProj\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture2DProjLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
+ " (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture3D\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture3DLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
+ " (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture3DProj\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) isamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function texture3DProjLod\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function textureCube\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function textureCubeLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
+ " (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function shadow1D\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function shadow1DLod\n"
- " (signature vec4\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) usampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
- ")\n"
- " (function shadow1DProj\n"
- " (signature vec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_clamp =
+ "((function clamp\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- ")\n"
- " (function shadow1DProjLod\n"
- " (signature vec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1)\n"
+ " (declare (in) vec2 arg2))\n"
+ " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- ")\n"
- " (function shadow2D\n"
- " (signature vec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1)\n"
+ " (declare (in) vec3 arg2))\n"
+ " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- ")\n"
- " (function shadow2DLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1)\n"
+ " (declare (in) vec4 arg2))\n"
+ " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- ")\n"
- " (function shadow2DProj\n"
- " (signature vec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) float arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) float arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- ")\n"
- " (function shadow2DProjLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) float arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- "))\n"
-};
-
-static const char *functions_for_110 [] = {
- builtins_110_abs,
- builtins_110_all,
- builtins_110_any,
- builtins_110_asin,
- builtins_110_atan,
- builtins_110_ceil,
- builtins_110_clamp,
- builtins_110_cos,
- builtins_110_cross,
- builtins_110_degrees,
- builtins_110_distance,
- builtins_110_dot,
- builtins_110_equal,
- builtins_110_exp,
- builtins_110_exp2,
- builtins_110_faceforward,
- builtins_110_floor,
- builtins_110_fract,
- builtins_110_greaterThan,
- builtins_110_greaterThanEqual,
- builtins_110_inversesqrt,
- builtins_110_length,
- builtins_110_lessThan,
- builtins_110_lessThanEqual,
- builtins_110_log,
- builtins_110_log2,
- builtins_110_matrixCompMult,
- builtins_110_max,
- builtins_110_min,
- builtins_110_mix,
- builtins_110_mod,
- builtins_110_noise_fake,
- builtins_110_normalize,
- builtins_110_not,
- builtins_110_notEqual,
- builtins_110_pow,
- builtins_110_radians,
- builtins_110_reflect,
- builtins_110_refract,
- builtins_110_sign,
- builtins_110_sin,
- builtins_110_smoothstep,
- builtins_110_sqrt,
- builtins_110_step,
- builtins_110_tan,
- builtins_110_textures,
-};
-
-/* 110_fs builtins */
-
-static const char *builtins_110_fs_derivatives = {
- "((function dFdx\n"
- " (signature float\n"
+ " (signature int\n"
" (parameters\n"
- " (declare (in) float p))\n"
- " ((return (expression float dFdx (var_ref p)))))\n"
+ " (declare (in) int arg0)\n"
+ " (declare (in) int arg1)\n"
+ " (declare (in) int arg2))\n"
+ " ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- " (signature vec2\n"
+ " (signature ivec2\n"
" (parameters\n"
- " (declare (in) vec2 p))\n"
- " ((return (expression vec2 dFdx (var_ref p)))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1)\n"
+ " (declare (in) ivec2 arg2))\n"
+ " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
- " (signature vec3\n"
+ " (signature ivec3\n"
" (parameters\n"
- " (declare (in) vec3 p))\n"
- " ((return (expression vec3 dFdx (var_ref p)))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1)\n"
+ " (declare (in) ivec3 arg2))\n"
+ " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1)\n"
+ " (declare (in) ivec4 arg2))\n"
+ " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature ivec2\n"
+ " (parameters\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) int arg1)\n"
+ " (declare (in) int arg2))\n"
+ " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature ivec3\n"
+ " (parameters\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) int arg1)\n"
+ " (declare (in) int arg2))\n"
+ " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
"\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) int arg1)\n"
+ " (declare (in) int arg2))\n"
+ " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uint\n"
+ " (parameters\n"
+ " (declare (in) uint arg0)\n"
+ " (declare (in) uint arg1)\n"
+ " (declare (in) uint arg2))\n"
+ " ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec2\n"
+ " (parameters\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1)\n"
+ " (declare (in) uvec2 arg2))\n"
+ " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec3\n"
+ " (parameters\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1)\n"
+ " (declare (in) uvec3 arg2))\n"
+ " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1)\n"
+ " (declare (in) uvec4 arg2))\n"
+ " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec2\n"
+ " (parameters\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uint arg1)\n"
+ " (declare (in) uint arg2))\n"
+ " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec3\n"
+ " (parameters\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uint arg1)\n"
+ " (declare (in) uint arg2))\n"
+ " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uint arg1)\n"
+ " (declare (in) uint arg2))\n"
+ " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2DRect =
+ "((function texture2DRect\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 p))\n"
- " ((return (expression vec4 dFdx (var_ref p)))))\n"
- " )\n"
+ " (declare (in) sampler2DRect sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (function dFdy\n"
+ "))\n"
+ ""
+;
+static const char *builtin_cosh =
+ "((function cosh\n"
" (signature float\n"
" (parameters\n"
- " (declare (in) float p))\n"
- " ((return (expression float dFdy (var_ref p)))))\n"
- "\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float * (constant float (0.5))\n"
+ " (expression float +\n"
+ " (expression float exp (var_ref x))\n"
+ " (expression float exp (expression float neg (var_ref x))))))))\n"
" (signature vec2\n"
" (parameters\n"
- " (declare (in) vec2 p))\n"
- " ((return (expression vec2 dFdy (var_ref p)))))\n"
- "\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (expression vec2 * (constant vec2 (0.5))\n"
+ " (expression vec2 +\n"
+ " (expression vec2 exp (var_ref x))\n"
+ " (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
" (signature vec3\n"
" (parameters\n"
- " (declare (in) vec3 p))\n"
- " ((return (expression vec3 dFdy (var_ref p)))))\n"
- "\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (expression vec3 * (constant vec3 (0.5))\n"
+ " (expression vec3 +\n"
+ " (expression vec3 exp (var_ref x))\n"
+ " (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 p))\n"
- " ((return (expression vec4 dFdy (var_ref p)))))\n"
- " )\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (expression vec4 * (constant vec4 (0.5))\n"
+ " (expression vec4 +\n"
+ " (expression vec4 exp (var_ref x))\n"
+ " (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture1DArrayLod =
+ "((function texture1DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- " (function fwidth\n"
+ "))\n"
+ ""
+;
+static const char *builtin_asin =
+ "((function asin\n"
" (signature float\n"
" (parameters\n"
- " (declare (in) float p))\n"
- " ((return (expression float +\n"
- " (expression float abs (expression float dFdx (var_ref p)))\n"
- " (expression float abs (expression float dFdy (var_ref p)))))))\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float *\n"
+ " (expression float sign (var_ref x))\n"
+ " (expression float -\n"
+ " (expression float *\n"
+ " (constant float (3.1415926))\n"
+ " (constant float (0.5)))\n"
+ " (expression float *\n"
+ " (expression float sqrt\n"
+ " (expression float -\n"
+ " (constant float (1.0))\n"
+ " (expression float abs (var_ref x))))\n"
+ " (expression float +\n"
+ " (constant float (1.5707288))\n"
+ " (expression float *\n"
+ " (expression float abs (var_ref x))\n"
+ " (expression float +\n"
+ " (constant float (-0.2121144))\n"
+ " (expression float *\n"
+ " (constant float (0.0742610))\n"
+ " (expression float abs (var_ref x))))))))))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
- " (declare (in) vec2 p))\n"
- " ((return (expression vec2 +\n"
- " (expression vec2 abs (expression vec2 dFdx (var_ref p)))\n"
- " (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (expression vec2 *\n"
+ " (expression vec2 sign (var_ref x))\n"
+ " (expression vec2 -\n"
+ " (expression float *\n"
+ " (constant float (3.1415926))\n"
+ " (constant float (0.5)))\n"
+ " (expression vec2 *\n"
+ " (expression vec2 sqrt\n"
+ " (expression vec2 -\n"
+ " (constant float (1.0))\n"
+ " (expression vec2 abs (var_ref x))))\n"
+ " (expression vec2 +\n"
+ " (constant float (1.5707288))\n"
+ " (expression vec2 *\n"
+ " (expression vec2 abs (var_ref x))\n"
+ " (expression vec2 +\n"
+ " (constant float (-0.2121144))\n"
+ " (expression vec2 *\n"
+ " (constant float (0.0742610))\n"
+ " (expression vec2 abs (var_ref x))))))))))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
- " (declare (in) vec3 p))\n"
- " ((return (expression vec3 +\n"
- " (expression vec3 abs (expression vec3 dFdx (var_ref p)))\n"
- " (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (expression vec3 *\n"
+ " (expression vec3 sign (var_ref x))\n"
+ " (expression vec3 -\n"
+ " (expression float *\n"
+ " (constant float (3.1415926))\n"
+ " (constant float (0.5)))\n"
+ " (expression vec3 *\n"
+ " (expression vec3 sqrt\n"
+ " (expression vec3 -\n"
+ " (constant float (1.0))\n"
+ " (expression vec3 abs (var_ref x))))\n"
+ " (expression vec3 +\n"
+ " (constant float (1.5707288))\n"
+ " (expression vec3 *\n"
+ " (expression vec3 abs (var_ref x))\n"
+ " (expression vec3 +\n"
+ " (constant float (-0.2121144))\n"
+ " (expression vec3 *\n"
+ " (constant float (0.0742610))\n"
+ " (expression vec3 abs (var_ref x))))))))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 p))\n"
- " ((return (expression vec4 +\n"
- " (expression vec4 abs (expression vec4 dFdx (var_ref p)))\n"
- " (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (expression vec4 *\n"
+ " (expression vec4 sign (var_ref x))\n"
+ " (expression vec4 -\n"
+ " (expression float *\n"
+ " (constant float (3.1415926))\n"
+ " (constant float (0.5)))\n"
+ " (expression vec4 *\n"
+ " (expression vec4 sqrt\n"
+ " (expression vec4 -\n"
+ " (constant float (1.0))\n"
+ " (expression vec4 abs (var_ref x))))\n"
+ " (expression vec4 +\n"
+ " (constant float (1.5707288))\n"
+ " (expression vec4 *\n"
+ " (expression vec4 abs (var_ref x))\n"
+ " (expression vec4 +\n"
+ " (constant float (-0.2121144))\n"
+ " (expression vec4 *\n"
+ " (constant float (0.0742610))\n"
+ " (expression vec4 abs (var_ref x))))))))))))\n"
"))\n"
-};
-
-static const char *builtins_110_fs_textures = {
- "((function texture1D\n"
+ ""
+;
+static const char *builtin_texture1DProj =
+ "((function texture1DProj\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
"\n"
- ")\n"
- " (function texture1DProj\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
@@ -2480,282 +1624,446 @@ static const char *builtins_110_fs_textures = {
" (declare (in) float bias) )\n"
" ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
- ")\n"
- " (function texture2D\n"
+ "))\n"
+ ""
+;
+static const char *builtin_lessThan =
+ "((function lessThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2DProj =
+ "((function shadow2DProj\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
- ")\n"
- " (function texture2DProj\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_textureLod =
+ "((function textureLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function texture3D\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function texture3DProj\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function textureCube\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function shadow1D\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) isamplerCube sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function shadow1DProj\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function shadow2D\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- ")\n"
- " (function shadow2DProj\n"
- " (signature vec4\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
-};
-
-static const char *functions_for_110_fs [] = {
- builtins_110_fs_derivatives,
- builtins_110_fs_textures,
-};
-
-/* 110_vs builtins */
-
-static const char *builtins_110_vs_ftransform = {
- "((declare (uniform) mat4 gl_ModelViewProjectionMatrix)\n"
- " (declare (in) vec4 gl_Vertex)\n"
- " (function ftransform\n"
+ ""
+;
+static const char *builtin_faceforward =
+ "((function faceforward\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float N)\n"
+ " (declare (in) float I)\n"
+ " (declare (in) float Nref))\n"
+ " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
+ " ((return (var_ref N)))\n"
+ " ((return (expression float neg (var_ref N)))))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 N)\n"
+ " (declare (in) vec2 I)\n"
+ " (declare (in) vec2 Nref))\n"
+ " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
+ " ((return (var_ref N)))\n"
+ " ((return (expression vec2 neg (var_ref N)))))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 N)\n"
+ " (declare (in) vec3 I)\n"
+ " (declare (in) vec3 Nref))\n"
+ " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
+ " ((return (var_ref N)))\n"
+ " ((return (expression vec3 neg (var_ref N)))))))\n"
+ "\n"
" (signature vec4\n"
- " (parameters)\n"
- " ((return (expression vec4 *\n"
- " (var_ref gl_ModelViewProjectionMatrix)\n"
- " (var_ref gl_Vertex)))))\n"
+ " (parameters\n"
+ " (declare (in) vec4 N)\n"
+ " (declare (in) vec4 I)\n"
+ " (declare (in) vec4 Nref))\n"
+ " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
+ " ((return (var_ref N)))\n"
+ " ((return (expression vec4 neg (var_ref N)))))))\n"
"))\n"
-};
-
-static const char *functions_for_110_vs [] = {
- builtins_110_vs_ftransform,
-};
-
-/* 120 builtins */
-
-static const char *builtins_120_matrixCompMult = {
- "((function matrixCompMult\n"
- " (signature mat2x3\n"
+ ""
+;
+static const char *builtin_abs =
+ "((function abs\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) mat2x3 x)\n"
- " (declare (in) mat2x3 y))\n"
- " ((declare () mat2x3 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float abs (var_ref arg0)))))\n"
"\n"
- " (signature mat3x2\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) mat3x2 x)\n"
- " (declare (in) mat3x2 y))\n"
- " ((declare () mat3x2 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 abs (var_ref arg0)))))\n"
"\n"
- " (signature mat2x4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) mat2x4 x)\n"
- " (declare (in) mat2x4 y))\n"
- " ((declare () mat2x4 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 abs (var_ref arg0)))))\n"
"\n"
- " (signature mat4x2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) mat4x2 x)\n"
- " (declare (in) mat4x2 y))\n"
- " ((declare () mat4x2 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 abs (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_log2 =
+ "((function log2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float log2 (var_ref arg0)))))\n"
"\n"
- " (signature mat3x4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) mat3x4 x)\n"
- " (declare (in) mat3x4 y))\n"
- " ((declare () mat3x4 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 log2 (var_ref arg0)))))\n"
"\n"
- " (signature mat4x3\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) mat4x3 x)\n"
- " (declare (in) mat4x3 y))\n"
- " ((declare () mat4x3 z)\n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
- " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
- "(return (var_ref z))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 log2 (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 log2 (var_ref arg0)))))\n"
"))\n"
-};
-
-static const char *builtins_120_outerProduct = {
- "((function outerProduct\n"
- " (signature mat2\n"
+ ""
+;
+static const char *builtin_shadow2DRect =
+ "((function shadow2DRect\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) vec2 u)\n"
- " (declare (in) vec2 v))\n"
- " ((declare () mat2 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) sampler2DRectShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
"\n"
- " (signature mat2x3\n"
+ "))\n"
+ ""
+;
+static const char *builtin_lessThanEqual =
+ "((function lessThanEqual\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) vec3 u)\n"
- " (declare (in) vec2 v))\n"
- " ((declare () mat2x3 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat2x4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) vec4 u)\n"
- " (declare (in) vec2 v))\n"
- " ((declare () mat2x4 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat3x2\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) vec2 u)\n"
- " (declare (in) vec3 v))\n"
- " ((declare () mat3x2 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
- " (return (var_ref m))\n"
- " ))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat3\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) vec3 u)\n"
- " (declare (in) vec3 v))\n"
- " ((declare () mat3 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat3x4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) vec4 u)\n"
- " (declare (in) vec3 v))\n"
- " ((declare () mat3x4 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat4x2\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) vec2 u)\n"
- " (declare (in) vec4 v))\n"
- " ((declare () mat4x2 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat4x3\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) vec3 u)\n"
- " (declare (in) vec4 v))\n"
- " ((declare () mat4x3 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature mat4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) vec4 u)\n"
- " (declare (in) vec4 v))\n"
- " ((declare () mat4 m)\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n"
- " (return (var_ref m))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_120_transpose = {
+ ""
+;
+static const char *builtin_transpose =
"((function transpose\n"
" (signature mat2\n"
" (parameters\n"
@@ -2895,157 +2203,165 @@ static const char *builtins_120_transpose = {
"\n"
")\n"
"\n"
-};
-
-static const char *functions_for_120 [] = {
- builtins_120_matrixCompMult,
- builtins_120_outerProduct,
- builtins_120_transpose,
-};
-
-/* 130 builtins */
-
-static const char *builtins_130_clamp = {
- "((function clamp\n"
- " (signature int\n"
- " (parameters\n"
- " (declare (in) int arg0)\n"
- " (declare (in) int arg1)\n"
- " (declare (in) int arg2))\n"
- " ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec2\n"
- " (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1)\n"
- " (declare (in) ivec2 arg2))\n"
- " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec3\n"
- " (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1)\n"
- " (declare (in) ivec3 arg2))\n"
- " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1)\n"
- " (declare (in) ivec4 arg2))\n"
- " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec2\n"
- " (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) int arg1)\n"
- " (declare (in) int arg2))\n"
- " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec3\n"
- " (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) int arg1)\n"
- " (declare (in) int arg2))\n"
- " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) int arg1)\n"
- " (declare (in) int arg2))\n"
- " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
- "\n"
- " (signature uint\n"
+ ""
+;
+static const char *builtin_step =
+ "((function step\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uint arg0)\n"
- " (declare (in) uint arg1)\n"
- " (declare (in) uint arg2))\n"
- " ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) float edge)\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))\n"
"\n"
- " (signature uvec2\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1)\n"
- " (declare (in) uvec2 arg2))\n"
- " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) float edge)\n"
+ " (declare (in) vec2 x))\n"
+ " ((declare () vec2 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (return (var_ref t))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1)\n"
- " (declare (in) uvec3 arg2))\n"
- " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) float edge)\n"
+ " (declare (in) vec3 x))\n"
+ " ((declare () vec3 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
+ " (return (var_ref t))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1)\n"
- " (declare (in) uvec4 arg2))\n"
- " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) float edge)\n"
+ " (declare (in) vec4 x))\n"
+ " ((declare () vec4 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
+ " (assign (constant bool (1)) (swiz w (var_ref t)) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n"
+ " (return (var_ref t))))\n"
"\n"
- " (signature uvec2\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uint arg1)\n"
- " (declare (in) uint arg2))\n"
- " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) vec2 edge)\n"
+ " (declare (in) vec2 x))\n"
+ " ((declare () vec2 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (return (var_ref t))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uint arg1)\n"
- " (declare (in) uint arg2))\n"
- " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) vec3 edge)\n"
+ " (declare (in) vec3 x))\n"
+ " ((declare () vec3 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
+ " (return (var_ref t))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uint arg1)\n"
- " (declare (in) uint arg2))\n"
- " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
+ " (declare (in) vec4 edge)\n"
+ " (declare (in) vec4 x))\n"
+ " ((declare () vec4 t)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref t)) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref t)) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz z (var_ref edge)))))\n"
+ " (assign (constant bool (1)) (swiz w (var_ref t)) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n"
+ " (return (var_ref t))))\n"
"))\n"
-};
-
-static const char *builtins_130_cosh = {
- "((function cosh\n"
+ "\n"
+ ""
+;
+static const char *builtin_sinh =
+ "((function sinh\n"
" (signature float\n"
" (parameters\n"
" (declare (in) float x))\n"
" ((return (expression float * (constant float (0.5))\n"
- " (expression float +\n"
+ " (expression float -\n"
" (expression float exp (var_ref x))\n"
" (expression float exp (expression float neg (var_ref x))))))))\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 x))\n"
" ((return (expression vec2 * (constant vec2 (0.5))\n"
- " (expression vec2 +\n"
+ " (expression vec2 -\n"
" (expression vec2 exp (var_ref x))\n"
" (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 x))\n"
" ((return (expression vec3 * (constant vec3 (0.5))\n"
- " (expression vec3 +\n"
+ " (expression vec3 -\n"
" (expression vec3 exp (var_ref x))\n"
" (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 x))\n"
" ((return (expression vec4 * (constant vec4 (0.5))\n"
- " (expression vec4 +\n"
+ " (expression vec4 -\n"
" (expression vec4 exp (var_ref x))\n"
" (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
"))\n"
-};
-
-static const char *builtins_130_equal = {
+ ""
+;
+static const char *builtin_cos =
+ "((function cos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float angle))\n"
+ " ((return (expression float cos (var_ref angle)))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 angle))\n"
+ " ((return (expression vec2 cos (var_ref angle)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 angle))\n"
+ " ((return (expression vec3 cos (var_ref angle)))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 angle))\n"
+ " ((return (expression vec4 cos (var_ref angle)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2DProjLod =
+ "((function shadow2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2DArray =
+ "((function shadow2DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArrayShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) 1 (swiz w (var_ref P)) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_equal =
"((function equal\n"
" (signature bvec2\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
" ((declare () bvec2 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
@@ -3053,8 +2369,8 @@ static const char *builtins_130_equal = {
"\n"
" (signature bvec3\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
" ((declare () bvec3 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
@@ -3063,60 +2379,52 @@ static const char *builtins_130_equal = {
"\n"
" (signature bvec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
" ((declare () bvec4 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
" (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
" (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_130_greaterThan = {
- "((function greaterThan\n"
+ "\n"
" (signature bvec2\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
" ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec3\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
" ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
" ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_130_greaterThanEqual = {
- "((function greaterThanEqual\n"
+ "\n"
" (signature bvec2\n"
" (parameters\n"
" (declare (in) uvec2 arg0)\n"
" (declare (in) uvec2 arg1))\n"
" ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec3\n"
@@ -3124,9 +2432,9 @@ static const char *builtins_130_greaterThanEqual = {
" (declare (in) uvec3 arg0)\n"
" (declare (in) uvec3 arg1))\n"
" ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec4\n"
@@ -3134,336 +2442,469 @@ static const char *builtins_130_greaterThanEqual = {
" (declare (in) uvec4 arg0)\n"
" (declare (in) uvec4 arg1))\n"
" ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
" (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_130_lessThan = {
- "((function lessThan\n"
- " (signature bvec2\n"
+ ""
+;
+static const char *builtin_length =
+ "((function length\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
"))\n"
-};
-
-static const char *builtins_130_lessThanEqual = {
- "((function lessThanEqual\n"
- " (signature bvec2\n"
+ ""
+;
+static const char *builtin_acos =
+ "((function acos\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float - (constant float (1.5707963))\n"
+ " (call asin ((var_ref x)))))))\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (expression vec2 - (constant float (1.5707963))\n"
+ " (call asin ((var_ref x)))))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (expression vec3 - (constant float (1.5707963))\n"
+ " (call asin ((var_ref x)))))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (expression vec4 - (constant float (1.5707963))\n"
+ " (call asin ((var_ref x)))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_matrixCompMult =
+ "((function matrixCompMult\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in) mat2 x)\n"
+ " (declare (in) mat2 y))\n"
+ " ((declare () mat2 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature bvec3\n"
+ " (signature mat3\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) mat3 x)\n"
+ " (declare (in) mat3 y))\n"
+ " ((declare () mat3 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature bvec4\n"
+ " (signature mat4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
- "))\n"
-};
-
-static const char *builtins_130_max = {
- "((function max\n"
- " (signature int\n"
+ " (declare (in) mat4 x)\n"
+ " (declare (in) mat4 y))\n"
+ " ((declare () mat4 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
+ "(return (var_ref z))))\n"
+ "\n"
+ " (signature mat2x3\n"
" (parameters\n"
- " (declare (in) int arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression int max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat2x3 x)\n"
+ " (declare (in) mat2x3 y))\n"
+ " ((declare () mat2x3 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature ivec2\n"
+ " (signature mat3x2\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat3x2 x)\n"
+ " (declare (in) mat3x2 y))\n"
+ " ((declare () mat3x2 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature ivec3\n"
+ " (signature mat2x4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat2x4 x)\n"
+ " (declare (in) mat2x4 y))\n"
+ " ((declare () mat2x4 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature mat4x2\n"
" (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat4x2 x)\n"
+ " (declare (in) mat4x2 y))\n"
+ " ((declare () mat4x2 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature ivec2\n"
+ " (signature mat3x4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat3x4 x)\n"
+ " (declare (in) mat3x4 y))\n"
+ " ((declare () mat3x4 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ "(return (var_ref z))))\n"
"\n"
- " (signature ivec3\n"
+ " (signature mat4x3\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) mat4x3 x)\n"
+ " (declare (in) mat4x3 y))\n"
+ " ((declare () mat4x3 z)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2))))) \n"
+ " (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3))))) \n"
+ "(return (var_ref z))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_pow =
+ "((function pow\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression float pow (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uint\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) uint arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uint max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
- " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2DProjLod =
+ "((function texture2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
- " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_textureProjLod =
+ "((function textureProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
- " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uvec2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
- "))\n"
-};
-
-static const char *builtins_130_min = {
- "((function min\n"
- " (signature int\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) int arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression int min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature ivec2\n"
+ " (signature ivec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) ivec2 arg1))\n"
- " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature ivec3\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) ivec3 arg1))\n"
- " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) ivec4 arg1))\n"
- " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature ivec2\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) ivec2 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature ivec3\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) ivec3 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) ivec4 arg0)\n"
- " (declare (in) int arg1))\n"
- " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uint\n"
+ " (signature uvec4\n"
" (parameters\n"
- " (declare (in) uint arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uint min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uvec2\n"
+ "))\n"
+ ""
+;
+static const char *builtin_log =
+ "((function log\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
- " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float log (var_ref arg0)))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
- " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 log (var_ref arg0)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
- " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 log (var_ref arg0)))))\n"
"\n"
- " (signature uvec2\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 log (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_exp2 =
+ "((function exp2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float exp2 (var_ref arg0)))))\n"
"\n"
- " (signature uvec3\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 exp2 (var_ref arg0)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uint arg1))\n"
- " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 exp2 (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 exp2 (var_ref arg0)))))\n"
"))\n"
-};
-
-static const char *builtins_130_mix = {
- "((function mix\n"
+ ""
+;
+static const char *builtin_fract =
+ "((function fract\n"
" (signature float\n"
" (parameters\n"
- " (declare (in) float v1)\n"
- " (declare (in) float v2)\n"
- " (declare (in) bool a))\n"
- " ((assign (var_ref a) (var_ref v1) (var_ref v2))\n"
- " (return (var_ref v1))))\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float fract (var_ref x)))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
- " (declare (in) vec2 v1)\n"
- " (declare (in) vec2 v2)\n"
- " (declare (in) bvec2 a))\n"
- " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
- " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
- " (return (var_ref v1))))\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (expression vec2 fract (var_ref x)))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
- " (declare (in) vec3 v1)\n"
- " (declare (in) vec3 v2)\n"
- " (declare (in) bvec3 a))\n"
- " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
- " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
- " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
- " (return (var_ref v1))))\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (expression vec3 fract (var_ref x)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) vec4 v1)\n"
- " (declare (in) vec4 v2)\n"
- " (declare (in) bvec4 a))\n"
- " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
- " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
- " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
- " (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))\n"
- " (return (var_ref v1))))\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (expression vec4 fract (var_ref x)))))\n"
"))\n"
-};
-
-static const char *builtins_130_notEqual = {
- "((function notEqual\n"
- " (signature bvec2\n"
+ "\n"
+ ""
+;
+static const char *builtin_shadow1DLod =
+ "((function shadow1DLod\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec2 arg0)\n"
- " (declare (in) uvec2 arg1))\n"
- " ((declare () bvec2 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
- " (signature bvec3\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture1DLod =
+ "((function texture1DLod\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec3 arg0)\n"
- " (declare (in) uvec3 arg1))\n"
- " ((declare () bvec3 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- " (signature bvec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2DArray =
+ "((function texture2DArray\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) uvec4 arg0)\n"
- " (declare (in) uvec4 arg1))\n"
- " ((declare () bvec4 temp)\n"
- " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
- " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
- " (return (var_ref temp))))\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ "\n"
"))\n"
-};
-
-static const char *builtins_130_sign = {
+ ""
+;
+static const char *builtin_texture3DProj =
+ "((function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_sign =
"((function sign\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float x))\n"
+ " ((return (expression float sign (var_ref x)))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (expression vec2 sign (var_ref x)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (expression vec3 sign (var_ref x)))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (expression vec4 sign (var_ref x)))))\n"
+ "\n"
" (signature int\n"
" (parameters\n"
" (declare (in) int x))\n"
@@ -3485,42 +2926,90 @@ static const char *builtins_130_sign = {
" ((return (expression ivec4 sign (var_ref x)))))\n"
"))\n"
"\n"
-};
-
-static const char *builtins_130_sinh = {
- "((function sinh\n"
+ ""
+;
+static const char *builtin_inversesqrt =
+ "((function inversesqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float rsq (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 rsq (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 rsq (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 rsq (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_distance =
+ "((function distance\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float p0)\n"
+ " (declare (in) float p1))\n"
+ " ((declare () float p)\n"
+ " (assign (constant bool (1)) (var_ref p) (expression float - (var_ref p0) (var_ref p1)))\n"
+ " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ "\n"
" (signature float\n"
" (parameters\n"
+ " (declare (in) vec2 p0)\n"
+ " (declare (in) vec2 p1))\n"
+ " ((declare () vec2 p)\n"
+ " (assign (constant bool (1)) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n"
+ " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec3 p0)\n"
+ " (declare (in) vec3 p1))\n"
+ " ((declare () vec3 p)\n"
+ " (assign (constant bool (1)) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n"
+ " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec4 p0)\n"
+ " (declare (in) vec4 p1))\n"
+ " ((declare () vec4 p)\n"
+ " (assign (constant bool (1)) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n"
+ " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_noise2 =
+ "((function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
" (declare (in) float x))\n"
- " ((return (expression float * (constant float (0.5))\n"
- " (expression float -\n"
- " (expression float exp (var_ref x))\n"
- " (expression float exp (expression float neg (var_ref x))))))))\n"
+ " ((return (constant vec2 (0 0)))))\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 x))\n"
- " ((return (expression vec2 * (constant vec2 (0.5))\n"
- " (expression vec2 -\n"
- " (expression vec2 exp (var_ref x))\n"
- " (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
- " (signature vec3\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " (signature vec2\n"
" (parameters\n"
" (declare (in) vec3 x))\n"
- " ((return (expression vec3 * (constant vec3 (0.5))\n"
- " (expression vec3 -\n"
- " (expression vec3 exp (var_ref x))\n"
- " (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
- " (signature vec4\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " (signature vec2\n"
" (parameters\n"
" (declare (in) vec4 x))\n"
- " ((return (expression vec4 * (constant vec4 (0.5))\n"
- " (expression vec4 -\n"
- " (expression vec4 exp (var_ref x))\n"
- " (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
+ " ((return (constant vec2 (0 0)))))\n"
"))\n"
-};
-
-static const char *builtins_130_tanh = {
+ ""
+;
+static const char *builtin_tanh =
"((function tanh\n"
" (signature float\n"
" (parameters\n"
@@ -3563,1241 +3052,11626 @@ static const char *builtins_130_tanh = {
" (expression vec4 exp (var_ref x))\n"
" (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
"))\n"
-};
-
-static const char *builtins_130_texelFetch = {
- "((function texelFetch\n"
+ ""
+;
+static const char *builtin_texture1DProjLod =
+ "((function texture1DProjLod\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
- " (declare (in) int P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) int P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) int P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture1DArray =
+ "((function texture1DArray\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature uvec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2D =
+ "((function texture2D\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_greaterThanEqual =
+ "((function greaterThanEqual\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) ivec2 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) ivec3 P) \n"
- " (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_130_texture = {
- "((function texture\n"
+ ""
+;
+static const char *builtin_texture3DProjLod =
+ "((function texture3DProjLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_tan =
+ "((function tan\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) float angle))\n"
+ " ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec2 angle))\n"
+ " ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 angle))\n"
+ " ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec4 angle))\n"
+ " ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_any =
+ "((function any\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in) bvec2 arg0))\n"
+ " ((return (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bool\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) bvec3 arg0))\n"
+ " ((return (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bool\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) bvec4 arg0))\n"
+ " ((return (expression bool || (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_normalize =
+ "((function normalize\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
"\n"
- " (signature vec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow1DProj =
+ "((function shadow1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_floor =
+ "((function floor\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isamplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float floor (var_ref arg0)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usamplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 floor (var_ref arg0)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 floor (var_ref arg0)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 floor (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_cross =
+ "((function cross\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((return (expression vec3 cross (var_ref arg0) (var_ref arg1)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_sqrt =
+ "((function sqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float sqrt (var_ref arg0)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 sqrt (var_ref arg0)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 sqrt (var_ref arg0)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 sqrt (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_mix =
+ "((function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1)\n"
+ " (declare (in) vec2 arg2))\n"
+ " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1)\n"
+ " (declare (in) vec3 arg2))\n"
+ " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- "))\n"
-};
-
-static const char *builtins_130_textureGrad = {
- "((function textureGrad\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1)\n"
+ " (declare (in) vec4 arg2))\n"
+ " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float v1)\n"
+ " (declare (in) float v2)\n"
+ " (declare (in) bool a))\n"
+ " ((assign (var_ref a) (var_ref v1) (var_ref v2))\n"
+ " (return (var_ref v1))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 v1)\n"
+ " (declare (in) vec2 v2)\n"
+ " (declare (in) bvec2 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 v1)\n"
+ " (declare (in) vec3 v2)\n"
+ " (declare (in) bvec3 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 v1)\n"
+ " (declare (in) vec4 v2)\n"
+ " (declare (in) bvec4 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
+ " (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow1DArrayLod =
+ "((function shadow1DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_ftransform =
+ "((declare (uniform) mat4 gl_ModelViewProjectionMatrix)\n"
+ " (declare (in) vec4 gl_Vertex)\n"
+ " (function ftransform\n"
+ " (signature vec4\n"
+ " (parameters)\n"
+ " ((return (expression vec4 *\n"
+ " (var_ref gl_ModelViewProjectionMatrix)\n"
+ " (var_ref gl_Vertex)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_sin =
+ "((function sin\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float angle))\n"
+ " ((return (expression float sin (var_ref angle)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 angle))\n"
+ " ((return (expression vec2 sin (var_ref angle)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 angle))\n"
+ " ((return (expression vec3 sin (var_ref angle)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec4 angle))\n"
+ " ((return (expression vec4 sin (var_ref angle)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2D =
+ "((function shadow2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) isamplerCube sampler)\n"
+ " (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
- " (signature uvec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2DLod =
+ "((function shadow2DLod\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow2DRectProj =
+ "((function shadow2DRectProj\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) sampler2DRectShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_atan =
+ "((function atan\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) float x))\n"
+ " ((return (call asin ((expression float *\n"
+ " (var_ref x)\n"
+ " (expression float rsq\n"
+ " (expression float +\n"
+ " (expression float *\n"
+ " (var_ref x)\n"
+ " (var_ref x))\n"
+ " (constant float (1.0))))))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 y_over_x))\n"
+ " ((return (call asin ((expression vec2 *\n"
+ " (var_ref y_over_x)\n"
+ " (expression vec2 rsq\n"
+ " (expression vec2 +\n"
+ " (expression vec2 *\n"
+ " (var_ref y_over_x)\n"
+ " (var_ref y_over_x))\n"
+ " (constant float (1.0))))))))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 y_over_x))\n"
+ " ((return (call asin ((expression vec3 *\n"
+ " (var_ref y_over_x)\n"
+ " (expression vec3 rsq\n"
+ " (expression vec3 +\n"
+ " (expression vec3 *\n"
+ " (var_ref y_over_x)\n"
+ " (var_ref y_over_x))\n"
+ " (constant float (1.0))))))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec4 y_over_x))\n"
+ " ((return (call asin ((expression vec4 *\n"
+ " (var_ref y_over_x)\n"
+ " (expression vec4 rsq\n"
+ " (expression vec4 +\n"
+ " (expression vec4 *\n"
+ " (var_ref y_over_x)\n"
+ " (var_ref y_over_x))\n"
+ " (constant float (1.0))))))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y)\n"
+ " (declare (in ) float x)\n"
+ " )\n"
+ " (\n"
+ " (declare () float r)\n"
+ " (declare ( ) float abs_retval)\n"
+ " (assign (constant bool (1)) (var_ref abs_retval) (call abs ((var_ref x) ))\n"
+ ") \n"
+ " (if (expression bool > (var_ref abs_retval) (constant float (0.000100)) ) (\n"
+ " (declare ( ) float atan_retval)\n"
+ " (assign (constant bool (1)) (var_ref atan_retval) (call atan ((expression float / (var_ref y) (var_ref x) ) ))\n"
+ ") \n"
+ " (assign (constant bool (1)) (var_ref r) (var_ref atan_retval) ) \n"
+ " (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n"
+ " (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
+ " (declare ( ) float assignment_tmp)\n"
+ " (assign (constant bool (1)) (var_ref assignment_tmp) (expression float + (var_ref r) (constant float (3.141593)) ) ) \n"
+ " (assign (constant bool (1)) (var_ref r) (var_ref assignment_tmp) ) \n"
+ " )\n"
+ " (\n"
+ " (declare ( ) float assignment_tmp)\n"
+ " (assign (constant bool (1)) (var_ref assignment_tmp) (expression float - (var_ref r) (constant float (3.141593)) ) ) \n"
+ " (assign (constant bool (1)) (var_ref r) (var_ref assignment_tmp) ) \n"
+ " ))\n"
+ "\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " )\n"
+ " (\n"
+ " (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
+ " (assign (constant bool (1)) (var_ref r) (constant float (1.570796)) ) \n"
+ " )\n"
+ " (\n"
+ " (assign (constant bool (1)) (var_ref r) (constant float (-1.570796)) ) \n"
+ " ))\n"
+ "\n"
+ " ))\n"
+ "\n"
+ " (return (var_ref r) )\n"
+ " ))\n"
+ "\n"
+ "\n"
+ "\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 y)\n"
+ " (declare (in) vec2 x))\n"
+ " ((declare () vec2 r)\n"
+ " (assign (constant bool (1))\n"
+ " (swiz x (var_ref r))\n"
+ " (call atan ((swiz x (var_ref y))\n"
+ " (swiz x (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz y (var_ref r))\n"
+ " (call atan ((swiz y (var_ref y))\n"
+ " (swiz y (var_ref x)))))\n"
+ " (return (var_ref r))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec3 y)\n"
+ " (declare (in) vec3 x))\n"
+ " ((declare () vec3 r)\n"
+ " (assign (constant bool (1))\n"
+ " (swiz x (var_ref r))\n"
+ " (call atan ((swiz x (var_ref y))\n"
+ " (swiz x (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz y (var_ref r))\n"
+ " (call atan ((swiz y (var_ref y))\n"
+ " (swiz y (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz z (var_ref r))\n"
+ " (call atan ((swiz z (var_ref y))\n"
+ " (swiz z (var_ref x)))))\n"
+ " (return (var_ref r))))\n"
"\n"
- ")\n"
- ")\n"
-};
-
-static const char *builtins_130_textureLod = {
- "((function textureLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec4 y)\n"
+ " (declare (in) vec4 x))\n"
+ " ((declare () vec4 r)\n"
+ " (assign (constant bool (1))\n"
+ " (swiz x (var_ref r))\n"
+ " (call atan ((swiz x (var_ref y))\n"
+ " (swiz x (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz y (var_ref r))\n"
+ " (call atan ((swiz y (var_ref y))\n"
+ " (swiz y (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz z (var_ref r))\n"
+ " (call atan ((swiz z (var_ref y))\n"
+ " (swiz z (var_ref x)))))\n"
+ " (assign (constant bool (1))\n"
+ " (swiz w (var_ref r))\n"
+ " (call atan ((swiz w (var_ref y))\n"
+ " (swiz w (var_ref x)))))\n"
+ " (return (var_ref r)))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_max =
+ "((function max\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression float max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature int\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) int arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression int max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature ivec2\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec3\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isamplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature ivec2\n"
" (parameters\n"
- " (declare (in) usamplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec3\n"
" (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature uint\n"
" (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) uint arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uint max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature uvec2\n"
" (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature uvec3\n"
" (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- "))\n"
-};
-
-static const char *builtins_130_textureProj = {
- "((function textureProj\n"
- " (signature vec4\n"
+ " (signature uvec2\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature uvec3\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_reflect =
+ "((function reflect\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float i)\n"
+ " (declare (in) float n))\n"
+ " ((return (expression float -\n"
+ " (var_ref i)\n"
+ " (expression float *\n"
+ " (constant float (2.0))\n"
+ " (expression float *\n"
+ " (expression float dot\n"
+ " (var_ref n)\n"
+ " (var_ref i))\n"
+ " (var_ref n)))))))\n"
"\n"
- " (signature vec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) vec2 i)\n"
+ " (declare (in) vec2 n))\n"
+ " ((return (expression vec2 -\n"
+ " (var_ref i)\n"
+ " (expression vec2 *\n"
+ " (constant float (2.0))\n"
+ " (expression vec2 *\n"
+ " (expression float dot\n"
+ " (var_ref n)\n"
+ " (var_ref i))\n"
+ " (var_ref n)))))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) vec3 i)\n"
+ " (declare (in) vec3 n))\n"
+ " ((return (expression vec3 -\n"
+ " (var_ref i)\n"
+ " (expression vec3 *\n"
+ " (constant float (2.0))\n"
+ " (expression vec3 *\n"
+ " (expression float dot\n"
+ " (var_ref n)\n"
+ " (var_ref i))\n"
+ " (var_ref n)))))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) vec4 i)\n"
+ " (declare (in) vec4 n))\n"
+ " ((return (expression vec4 -\n"
+ " (var_ref i)\n"
+ " (expression vec4 *\n"
+ " (constant float (2.0))\n"
+ " (expression vec4 *\n"
+ " (expression float dot\n"
+ " (var_ref n)\n"
+ " (var_ref i))\n"
+ " (var_ref n)))))))\n"
"\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture3D =
+ "((function texture3D\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
+ " (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texelFetch =
+ "((function texelFetch\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
- "))\n"
-};
-
-static const char *builtins_130_textureProjGrad = {
- "((function textureProjGrad\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) )\n"
+ " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
"\n"
+ "))\n"
+ ""
+;
+static const char *builtin_noise4 =
+ "((function noise4\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature ivec4\n"
+ " (declare (in) float x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_notEqual =
+ "((function notEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"))\n"
-};
-
-static const char *builtins_130_textureProjLod = {
- "((function textureProjLod\n"
- " (signature vec4\n"
+ ""
+;
+static const char *builtin_outerProduct =
+ "((function outerProduct\n"
+ " (signature mat2\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec2 u)\n"
+ " (declare (in) vec2 v))\n"
+ " ((declare () mat2 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (return (var_ref m))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature mat2x3\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec3 u)\n"
+ " (declare (in) vec2 v))\n"
+ " ((declare () mat2x3 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (return (var_ref m))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature mat2x4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec4 u)\n"
+ " (declare (in) vec2 v))\n"
+ " ((declare () mat2x4 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (return (var_ref m))))\n"
"\n"
- " (signature vec4\n"
+ " (signature mat3x2\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec2 u)\n"
+ " (declare (in) vec3 v))\n"
+ " ((declare () mat3x2 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (return (var_ref m))\n"
+ " ))\n"
"\n"
- " (signature ivec4\n"
+ " (signature mat3\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec3 u)\n"
+ " (declare (in) vec3 v))\n"
+ " ((declare () mat3 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (return (var_ref m))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature mat3x4\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec4 u)\n"
+ " (declare (in) vec3 v))\n"
+ " ((declare () mat3x4 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (return (var_ref m))))\n"
"\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in) vec2 u)\n"
+ " (declare (in) vec4 v))\n"
+ " ((declare () mat4x2 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (return (var_ref m))))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in) vec3 u)\n"
+ " (declare (in) vec4 v))\n"
+ " ((declare () mat4x3 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (return (var_ref m))))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in) vec4 u)\n"
+ " (declare (in) vec4 v))\n"
+ " ((declare () mat4 m)\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (constant bool (1)) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (return (var_ref m))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow1D =
+ "((function shadow1D\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
+ " (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
- " (signature uvec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_noise1 =
+ "((function noise1\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) float x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant float (0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_refract =
+ "((function refract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float i)\n"
+ " (declare (in) float n)\n"
+ " (declare (in) float eta))\n"
+ " ((declare () float k)\n"
+ " (assign (constant bool (1)) (var_ref k)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * \n"
+ " (expression float dot (var_ref n) (var_ref i))\n"
+ " (expression float dot (var_ref n) (var_ref i))))))))\n"
+ " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
+ " ((return (constant float (0.0))))\n"
+ " ((return (expression float -\n"
+ " (expression float * (var_ref eta) (var_ref i))\n"
+ " (expression float *\n"
+ " (expression float +\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float dot (var_ref n) (var_ref i)))\n"
+ " (expression float sqrt (var_ref k)))\n"
+ " (var_ref n))))))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 i)\n"
+ " (declare (in) vec2 n)\n"
+ " (declare (in) float eta))\n"
+ " ((declare () float k)\n"
+ " (assign (constant bool (1)) (var_ref k)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * \n"
+ " (expression float dot (var_ref n) (var_ref i))\n"
+ " (expression float dot (var_ref n) (var_ref i))))))))\n"
+ " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
+ " ((return (constant vec2 (0.0 0.0))))\n"
+ " ((return (expression vec2 -\n"
+ " (expression vec2 * (var_ref eta) (var_ref i))\n"
+ " (expression vec2 *\n"
+ " (expression float +\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float dot (var_ref n) (var_ref i)))\n"
+ " (expression float sqrt (var_ref k)))\n"
+ " (var_ref n))))))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 i)\n"
+ " (declare (in) vec3 n)\n"
+ " (declare (in) float eta))\n"
+ " ((declare () float k)\n"
+ " (assign (constant bool (1)) (var_ref k)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * \n"
+ " (expression float dot (var_ref n) (var_ref i))\n"
+ " (expression float dot (var_ref n) (var_ref i))))))))\n"
+ " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
+ " ((return (constant vec3 (0.0 0.0 0.0))))\n"
+ " ((return (expression vec3 -\n"
+ " (expression vec3 * (var_ref eta) (var_ref i))\n"
+ " (expression vec3 *\n"
+ " (expression float +\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float dot (var_ref n) (var_ref i)))\n"
+ " (expression float sqrt (var_ref k)))\n"
+ " (var_ref n))))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec4 i)\n"
+ " (declare (in) vec4 n)\n"
+ " (declare (in) float eta))\n"
+ " ((declare () float k)\n"
+ " (assign (constant bool (1)) (var_ref k)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float - (constant float (1.0))\n"
+ " (expression float * \n"
+ " (expression float dot (var_ref n) (var_ref i))\n"
+ " (expression float dot (var_ref n) (var_ref i))))))))\n"
+ " (if (expression bool < (var_ref k) (constant float (0.0)))\n"
+ " ((return (constant vec4 (0.0 0.0 0.0 0.0))))\n"
+ " ((return (expression vec4 -\n"
+ " (expression vec4 * (var_ref eta) (var_ref i))\n"
+ " (expression vec4 *\n"
+ " (expression float +\n"
+ " (expression float * (var_ref eta)\n"
+ " (expression float dot (var_ref n) (var_ref i)))\n"
+ " (expression float sqrt (var_ref k)))\n"
+ " (var_ref n))))))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_noise3 =
+ "((function noise3\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) float x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_min =
+ "((function min\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression float min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- "))\n"
-};
-
-static const char *functions_for_130 [] = {
- builtins_130_clamp,
- builtins_130_cosh,
- builtins_130_equal,
- builtins_130_greaterThan,
- builtins_130_greaterThanEqual,
- builtins_130_lessThan,
- builtins_130_lessThanEqual,
- builtins_130_max,
- builtins_130_min,
- builtins_130_mix,
- builtins_130_notEqual,
- builtins_130_sign,
- builtins_130_sinh,
- builtins_130_tanh,
- builtins_130_texelFetch,
- builtins_130_texture,
- builtins_130_textureGrad,
- builtins_130_textureLod,
- builtins_130_textureProj,
- builtins_130_textureProjGrad,
- builtins_130_textureProjLod,
-};
-
-/* 130_fs builtins */
-
-static const char *builtins_130_fs_texture = {
- "((function texture\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature int\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) int arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression int min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature ivec2\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec3\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature ivec2\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature ivec3\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) int arg1))\n"
+ " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature uint\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uint arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uint min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature uvec2\n"
" (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature uvec3\n"
" (parameters\n"
- " (declare (in) isamplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usamplerCube sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature vec4\n"
+ " (signature uvec2\n"
" (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature uvec3\n"
" (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uint arg1))\n"
+ " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_textureCube =
+ "((function textureCube\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) samplerCube sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
" ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_shadow1DArray =
+ "((function shadow1DArray\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec4\n"
" (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
-};
-
-static const char *builtins_130_fs_textureProj = {
- "((function textureProj\n"
- " (signature vec4\n"
+ ""
+;
+static const char *builtin_exp =
+ "((function exp\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) float arg0))\n"
+ " ((return (expression float exp (var_ref arg0)))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature vec2\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec2 arg0))\n"
+ " ((return (expression vec2 exp (var_ref arg0)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature vec3\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec3 arg0))\n"
+ " ((return (expression vec3 exp (var_ref arg0)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
+ " (declare (in) vec4 arg0))\n"
+ " ((return (expression vec4 exp (var_ref arg0)))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_greaterThan =
+ "((function greaterThan\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) ivec2 arg0)\n"
+ " (declare (in) ivec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) ivec3 arg0)\n"
+ " (declare (in) ivec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature vec4\n"
+ " (signature bvec4\n"
" (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) ivec4 arg0)\n"
+ " (declare (in) ivec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature ivec4\n"
+ " (signature bvec2\n"
" (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) uvec2 arg0)\n"
+ " (declare (in) uvec2 arg1))\n"
+ " ((declare () bvec2 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature bvec3\n"
" (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) uvec3 arg0)\n"
+ " (declare (in) uvec3 arg1))\n"
+ " ((declare () bvec3 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
"\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in) uvec4 arg0)\n"
+ " (declare (in) uvec4 arg1))\n"
+ " ((declare () bvec4 temp)\n"
+ " (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n"
+ " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n"
+ " (return (var_ref temp))))\n"
+ "))\n"
+ ""
+;
+static const char *builtin_texture2DLod =
+ "((function texture2DLod\n"
" (signature vec4\n"
" (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
"\n"
- " (signature ivec4\n"
+ "))\n"
+ ""
+;
+static const char *builtin_dot =
+ "((function dot\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) float arg0)\n"
+ " (declare (in) float arg1))\n"
+ " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
"\n"
- " (signature uvec4\n"
+ " (signature float\n"
" (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1))\n"
+ " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec3 arg0)\n"
+ " (declare (in) vec3 arg1))\n"
+ " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
"\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec4 arg0)\n"
+ " (declare (in) vec4 arg1))\n"
+ " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
"))\n"
+ ""
+;
+static const char *prototypes_for_120_vert =
+ "(\n"
+ "(function radians\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float degrees@0x22143e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 degrees@0x22147b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 degrees@0x22149a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 degrees@0x2214b90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function degrees\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float radians@0x2214d80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 radians@0x2215150)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 radians@0x2215340)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 radians@0x2215530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x2215720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x2215ad0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x2215cb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x2215e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x2216070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x2216420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x2216600)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x22167e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function tan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x22169c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x2216d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x2216f50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x2217130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function asin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x2217310)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x22176c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x22178a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x2217a80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function acos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x2217c60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x2218010)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x22181f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x22183d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function atan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y@0x22185b0)\n"
+ " (declare (in ) float x@0x22186c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y@0x2218a70)\n"
+ " (declare (in ) vec2 x@0x2218b80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y@0x2218d60)\n"
+ " (declare (in ) vec3 x@0x2218e70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y@0x2219050)\n"
+ " (declare (in ) vec4 x@0x2219160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y_over_x@0x2219340)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y_over_x@0x2219530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y_over_x@0x2219720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y_over_x@0x2219910)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function pow\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2219b00)\n"
+ " (declare (in ) float y@0x2219c10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2219fc0)\n"
+ " (declare (in ) vec2 y@0x221a0d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221a2b0)\n"
+ " (declare (in ) vec3 y@0x221a3c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221a5a0)\n"
+ " (declare (in ) vec4 y@0x221a6b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221a890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221ac40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221ae20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221b000)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221b1e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221b590)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221b770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221b950)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221bb30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221bee0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221c0c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221c2a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221c480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221c830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221ca10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221cbf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221cdd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221d180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221d360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221d540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function inversesqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221d720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221dae0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221dcc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221dea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function abs\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221e080)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221e430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221e610)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221e7f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sign\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221e9d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221ed80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221ef60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221f140)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function floor\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221f320)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x221f6d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x221f8b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x221fa90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ceil\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x221fc70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2220020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2220200)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x22203e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x22205c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2220970)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2220b50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2220d30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mod\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2220f10)\n"
+ " (declare (in ) float y@0x2221020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x22213d0)\n"
+ " (declare (in ) float y@0x22214e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x22216c0)\n"
+ " (declare (in ) float y@0x22217d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x22219b0)\n"
+ " (declare (in ) float y@0x2221ac0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2221ca0)\n"
+ " (declare (in ) vec2 y@0x2221db0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2221f90)\n"
+ " (declare (in ) vec3 y@0x22220a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2222280)\n"
+ " (declare (in ) vec4 y@0x2222390)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function min\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2222570)\n"
+ " (declare (in ) float y@0x2222680)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2222a30)\n"
+ " (declare (in ) vec2 y@0x2222b40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2222d20)\n"
+ " (declare (in ) vec3 y@0x2222e30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2223010)\n"
+ " (declare (in ) vec4 y@0x2223120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2223300)\n"
+ " (declare (in ) float y@0x2223410)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x22235f0)\n"
+ " (declare (in ) float y@0x2223700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x22238e0)\n"
+ " (declare (in ) float y@0x22239f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function max\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2223bd0)\n"
+ " (declare (in ) float y@0x2223ce0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2224090)\n"
+ " (declare (in ) vec2 y@0x22241a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2224380)\n"
+ " (declare (in ) vec3 y@0x2224490)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2224670)\n"
+ " (declare (in ) vec4 y@0x2224780)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2224960)\n"
+ " (declare (in ) float y@0x2224a70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2224c50)\n"
+ " (declare (in ) float y@0x2224d60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2224f40)\n"
+ " (declare (in ) float y@0x2225050)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function clamp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2225230)\n"
+ " (declare (in ) float minVal@0x2225340)\n"
+ " (declare (in ) float maxVal@0x2225450)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2225800)\n"
+ " (declare (in ) vec2 minVal@0x2225910)\n"
+ " (declare (in ) vec2 maxVal@0x2225a20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2225c00)\n"
+ " (declare (in ) vec3 minVal@0x2225d10)\n"
+ " (declare (in ) vec3 maxVal@0x2225e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2226000)\n"
+ " (declare (in ) vec4 minVal@0x2226110)\n"
+ " (declare (in ) vec4 maxVal@0x2226220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2226400)\n"
+ " (declare (in ) float minVal@0x2226510)\n"
+ " (declare (in ) float maxVal@0x2226620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2226800)\n"
+ " (declare (in ) float minVal@0x2226910)\n"
+ " (declare (in ) float maxVal@0x2226a20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2226c00)\n"
+ " (declare (in ) float minVal@0x2226d10)\n"
+ " (declare (in ) float maxVal@0x2226e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2227000)\n"
+ " (declare (in ) float y@0x2227110)\n"
+ " (declare (in ) float a@0x2227220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x22275d0)\n"
+ " (declare (in ) vec2 y@0x22276e0)\n"
+ " (declare (in ) vec2 a@0x22277f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x22279d0)\n"
+ " (declare (in ) vec3 y@0x2227ae0)\n"
+ " (declare (in ) vec3 a@0x2227bf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2227dd0)\n"
+ " (declare (in ) vec4 y@0x2227ee0)\n"
+ " (declare (in ) vec4 a@0x2227ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x22281d0)\n"
+ " (declare (in ) vec2 y@0x22282e0)\n"
+ " (declare (in ) float a@0x22283f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x22285d0)\n"
+ " (declare (in ) vec3 y@0x22286e0)\n"
+ " (declare (in ) float a@0x22287f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x22289d0)\n"
+ " (declare (in ) vec4 y@0x2228ae0)\n"
+ " (declare (in ) float a@0x2228bf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function step\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x2228dd0)\n"
+ " (declare (in ) float x@0x2228ee0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge@0x2229290)\n"
+ " (declare (in ) vec2 x@0x22293a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge@0x2229580)\n"
+ " (declare (in ) vec3 x@0x2229690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge@0x2229870)\n"
+ " (declare (in ) vec4 x@0x2229980)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x2229b60)\n"
+ " (declare (in ) vec2 x@0x2229c70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x2229e50)\n"
+ " (declare (in ) vec3 x@0x2229f60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x222a140)\n"
+ " (declare (in ) vec4 x@0x222a250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function smoothstep\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x222a430)\n"
+ " (declare (in ) float edge1@0x222a540)\n"
+ " (declare (in ) float x@0x222a650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge0@0x222aa10)\n"
+ " (declare (in ) vec2 edge1@0x222ab20)\n"
+ " (declare (in ) vec2 x@0x222ac30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge0@0x222ae10)\n"
+ " (declare (in ) vec3 edge1@0x222af20)\n"
+ " (declare (in ) vec3 x@0x222b030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge0@0x222b210)\n"
+ " (declare (in ) vec4 edge1@0x222b320)\n"
+ " (declare (in ) vec4 x@0x222b430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x222b610)\n"
+ " (declare (in ) float edge1@0x222b720)\n"
+ " (declare (in ) vec2 x@0x222b830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x222ba10)\n"
+ " (declare (in ) float edge1@0x222bb20)\n"
+ " (declare (in ) vec3 x@0x222bc30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x222be10)\n"
+ " (declare (in ) float edge1@0x222bf20)\n"
+ " (declare (in ) vec4 x@0x222c030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function length\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x222c210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x222c5c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x222c7a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x222c980)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function distance\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p0@0x222cb60)\n"
+ " (declare (in ) float p1@0x222cc70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p0@0x222d030)\n"
+ " (declare (in ) vec2 p1@0x222d140)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p0@0x222d320)\n"
+ " (declare (in ) vec3 p1@0x222d430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p0@0x222d610)\n"
+ " (declare (in ) vec4 p1@0x222d720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dot\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x222d900)\n"
+ " (declare (in ) float y@0x222da10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x222ddc0)\n"
+ " (declare (in ) vec2 y@0x222ded0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x222e0b0)\n"
+ " (declare (in ) vec3 y@0x222e1c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x222e3a0)\n"
+ " (declare (in ) vec4 y@0x222e4b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cross\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x222e690)\n"
+ " (declare (in ) vec3 y@0x222e7a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function normalize\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x222eb50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x222ef10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x222f0f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x222f2d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ftransform\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function faceforward\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float N@0x222f760)\n"
+ " (declare (in ) float I@0x222f870)\n"
+ " (declare (in ) float Nref@0x222f980)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 N@0x222fd40)\n"
+ " (declare (in ) vec2 I@0x222fe50)\n"
+ " (declare (in ) vec2 Nref@0x222ff60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 N@0x2230140)\n"
+ " (declare (in ) vec3 I@0x2230250)\n"
+ " (declare (in ) vec3 Nref@0x2230360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 N@0x2230540)\n"
+ " (declare (in ) vec4 I@0x2230650)\n"
+ " (declare (in ) vec4 Nref@0x2230760)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function reflect\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x2230940)\n"
+ " (declare (in ) float N@0x2230a50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x2230e10)\n"
+ " (declare (in ) vec2 N@0x2230f20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x2231100)\n"
+ " (declare (in ) vec3 N@0x2231210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x22313f0)\n"
+ " (declare (in ) vec4 N@0x2231500)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function refract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x22316e0)\n"
+ " (declare (in ) float N@0x22317f0)\n"
+ " (declare (in ) float eta@0x2231900)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x2231cc0)\n"
+ " (declare (in ) vec2 N@0x2231dd0)\n"
+ " (declare (in ) float eta@0x2231ee0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x22320c0)\n"
+ " (declare (in ) vec3 N@0x22321d0)\n"
+ " (declare (in ) float eta@0x22322e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x22324c0)\n"
+ " (declare (in ) vec4 N@0x22325d0)\n"
+ " (declare (in ) float eta@0x22326e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function matrixCompMult\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 x@0x22328c0)\n"
+ " (declare (in ) mat2 y@0x22329d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 x@0x2232d90)\n"
+ " (declare (in ) mat3 y@0x2232ea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 x@0x2233080)\n"
+ " (declare (in ) mat4 y@0x2233190)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) mat2x3 x@0x2233370)\n"
+ " (declare (in ) mat2x3 y@0x2233480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) mat2x4 x@0x2233660)\n"
+ " (declare (in ) mat2x4 y@0x2233770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) mat3x2 x@0x2233950)\n"
+ " (declare (in ) mat3x2 y@0x2233a60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) mat3x4 x@0x2233c40)\n"
+ " (declare (in ) mat3x4 y@0x2233d50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) mat4x2 x@0x2233f30)\n"
+ " (declare (in ) mat4x2 y@0x2234040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) mat4x3 x@0x2234220)\n"
+ " (declare (in ) mat4x3 y@0x2234330)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function outerProduct\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x2234510)\n"
+ " (declare (in ) vec2 r@0x2234620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x22349e0)\n"
+ " (declare (in ) vec3 r@0x2234af0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x2234cd0)\n"
+ " (declare (in ) vec4 r@0x2234de0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x2234fc0)\n"
+ " (declare (in ) vec2 r@0x22350d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x22352b0)\n"
+ " (declare (in ) vec3 r@0x22353c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x22355a0)\n"
+ " (declare (in ) vec2 r@0x22356b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x2235890)\n"
+ " (declare (in ) vec4 r@0x22359a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x2235b80)\n"
+ " (declare (in ) vec3 r@0x2235c90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x2235e70)\n"
+ " (declare (in ) vec4 r@0x2235f80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function transpose\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 m@0x2236160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 m@0x2236520)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 m@0x2236700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) mat3x2 m@0x22368e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) mat2x3 m@0x2236ac0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) mat4x2 m@0x2236ca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) mat2x4 m@0x2236e80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) mat4x3 m@0x2237060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) mat3x4 m@0x2237240)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2237420)\n"
+ " (declare (in ) vec2 y@0x2237530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x22378f0)\n"
+ " (declare (in ) vec3 y@0x2237a00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2237be0)\n"
+ " (declare (in ) vec4 y@0x2237cf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x2237ed0)\n"
+ " (declare (in ) ivec2 y@0x2237fe0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x22381c0)\n"
+ " (declare (in ) ivec3 y@0x22382d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x22384b0)\n"
+ " (declare (in ) ivec4 y@0x22385c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x22387a0)\n"
+ " (declare (in ) vec2 y@0x22388b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2238c70)\n"
+ " (declare (in ) vec3 y@0x2238d80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2238f60)\n"
+ " (declare (in ) vec4 y@0x2239070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x2239250)\n"
+ " (declare (in ) ivec2 y@0x2239360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x2239540)\n"
+ " (declare (in ) ivec3 y@0x2239650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x2239830)\n"
+ " (declare (in ) ivec4 y@0x2239940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x2239b20)\n"
+ " (declare (in ) vec2 y@0x2239c30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2239ff0)\n"
+ " (declare (in ) vec3 y@0x223a100)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x223a2e0)\n"
+ " (declare (in ) vec4 y@0x223a3f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x223a5d0)\n"
+ " (declare (in ) ivec2 y@0x223a6e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x223a8c0)\n"
+ " (declare (in ) ivec3 y@0x223a9d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x223abb0)\n"
+ " (declare (in ) ivec4 y@0x223acc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x223aea0)\n"
+ " (declare (in ) vec2 y@0x223afb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x223b370)\n"
+ " (declare (in ) vec3 y@0x223b480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x223b660)\n"
+ " (declare (in ) vec4 y@0x223b770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x223b950)\n"
+ " (declare (in ) ivec2 y@0x223ba60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x223bc40)\n"
+ " (declare (in ) ivec3 y@0x223bd50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x223bf30)\n"
+ " (declare (in ) ivec4 y@0x223c040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function equal\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x223c220)\n"
+ " (declare (in ) vec2 y@0x223c330)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x223c6e0)\n"
+ " (declare (in ) vec3 y@0x223c7f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x223c9d0)\n"
+ " (declare (in ) vec4 y@0x223cae0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x223ccc0)\n"
+ " (declare (in ) ivec2 y@0x223cdd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x223cfb0)\n"
+ " (declare (in ) ivec3 y@0x223d0c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x223d2a0)\n"
+ " (declare (in ) ivec4 y@0x223d3b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x223d590)\n"
+ " (declare (in ) bvec2 y@0x223d6a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x223d880)\n"
+ " (declare (in ) bvec3 y@0x223d990)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x223db70)\n"
+ " (declare (in ) bvec4 y@0x223dc80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function notEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x223de60)\n"
+ " (declare (in ) vec2 y@0x223df70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x223e330)\n"
+ " (declare (in ) vec3 y@0x223e440)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x223e620)\n"
+ " (declare (in ) vec4 y@0x223e730)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x223e910)\n"
+ " (declare (in ) ivec2 y@0x223ea20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x223ec00)\n"
+ " (declare (in ) ivec3 y@0x223ed10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x223eef0)\n"
+ " (declare (in ) ivec4 y@0x223f000)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x223f1e0)\n"
+ " (declare (in ) bvec2 y@0x223f2f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x223f4d0)\n"
+ " (declare (in ) bvec3 y@0x223f5e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x223f7c0)\n"
+ " (declare (in ) bvec4 y@0x223f8d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function any\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x223fab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x223fe60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x2240040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function all\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x2240220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x22405d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x22407b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function not\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x2240990)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x2240d40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x2240f20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x2241100)\n"
+ " (declare (in ) float coord@0x2241220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x22415e0)\n"
+ " (declare (in ) vec2 coord@0x2241700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x2241ac0)\n"
+ " (declare (in ) vec4 coord@0x2241be0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x2241dc0)\n"
+ " (declare (in ) float coord@0x2241ee0)\n"
+ " (declare (in ) float lod@0x2241ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x22423b0)\n"
+ " (declare (in ) vec2 coord@0x22424d0)\n"
+ " (declare (in ) float lod@0x22425e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x22429a0)\n"
+ " (declare (in ) vec4 coord@0x2242ac0)\n"
+ " (declare (in ) float lod@0x2242bd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2242db0)\n"
+ " (declare (in ) vec2 coord@0x2242ed0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2243290)\n"
+ " (declare (in ) vec3 coord@0x22433b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2243770)\n"
+ " (declare (in ) vec4 coord@0x2243890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2243a70)\n"
+ " (declare (in ) vec2 coord@0x2243b90)\n"
+ " (declare (in ) float lod@0x2243ca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2244060)\n"
+ " (declare (in ) vec3 coord@0x2244180)\n"
+ " (declare (in ) float lod@0x2244290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x2244650)\n"
+ " (declare (in ) vec4 coord@0x2244770)\n"
+ " (declare (in ) float lod@0x2244880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x2244a60)\n"
+ " (declare (in ) vec3 coord@0x2244b80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x2244f40)\n"
+ " (declare (in ) vec4 coord@0x2245060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x2245420)\n"
+ " (declare (in ) vec3 coord@0x2245540)\n"
+ " (declare (in ) float lod@0x2245650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x2245a10)\n"
+ " (declare (in ) vec4 coord@0x2245b30)\n"
+ " (declare (in ) float lod@0x2245c40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCube\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x2246000)\n"
+ " (declare (in ) vec3 coord@0x2246120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCubeLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x22464e0)\n"
+ " (declare (in ) vec3 coord@0x2246600)\n"
+ " (declare (in ) float lod@0x2246710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x2246ad0)\n"
+ " (declare (in ) vec3 coord@0x2246bf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x2246fb0)\n"
+ " (declare (in ) vec3 coord@0x22470d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x2247490)\n"
+ " (declare (in ) vec4 coord@0x22475b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x2247970)\n"
+ " (declare (in ) vec4 coord@0x2247a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x2247e50)\n"
+ " (declare (in ) vec3 coord@0x2247f70)\n"
+ " (declare (in ) float lod@0x2248080)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x2248440)\n"
+ " (declare (in ) vec3 coord@0x2248560)\n"
+ " (declare (in ) float lod@0x2248670)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x2248a30)\n"
+ " (declare (in ) vec4 coord@0x2248b50)\n"
+ " (declare (in ) float lod@0x2248c60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x2249020)\n"
+ " (declare (in ) vec4 coord@0x2249140)\n"
+ " (declare (in ) float lod@0x2249250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise1\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2249610)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x22499c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x2249ba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x2249d80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x2249f60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x224a310)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x224a4f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x224a6d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise3\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x224a8b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x224ac60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x224ae40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x224b020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise4\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x224b200)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x224b5b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x224b790)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x224b970)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_120_vert [] = {
+ builtin_clamp,
+ builtin_matrixCompMult,
+ builtin_shadow2DProjLod,
+ builtin_noise2,
+ builtin_texture3DProjLod,
+ builtin_pow,
+ builtin_texture2DProj,
+ builtin_greaterThanEqual,
+ builtin_sign,
+ builtin_texture3DProj,
+ builtin_texture2D,
+ builtin_equal,
+ builtin_faceforward,
+ builtin_tan,
+ builtin_shadow2DProj,
+ builtin_shadow1DProjLod,
+ builtin_any,
+ builtin_shadow1DProj,
+ builtin_normalize,
+ builtin_asin,
+ builtin_texture1DProj,
+ builtin_log,
+ builtin_floor,
+ builtin_exp2,
+ builtin_lessThan,
+ builtin_cross,
+ builtin_sqrt,
+ builtin_texture3DLod,
+ builtin_fract,
+ builtin_abs,
+ builtin_degrees,
+ builtin_shadow1DLod,
+ builtin_ftransform,
+ builtin_sin,
+ builtin_shadow2D,
+ builtin_shadow2DLod,
+ builtin_all,
+ builtin_log2,
+ builtin_atan,
+ builtin_notEqual,
+ builtin_max,
+ builtin_lessThanEqual,
+ builtin_transpose,
+ builtin_outerProduct,
+ builtin_ceil,
+ builtin_reflect,
+ builtin_textureCubeLod,
+ builtin_step,
+ builtin_texture1D,
+ builtin_greaterThan,
+ builtin_texture3D,
+ builtin_not,
+ builtin_texture2DProjLod,
+ builtin_inversesqrt,
+ builtin_mod,
+ builtin_noise4,
+ builtin_distance,
+ builtin_cos,
+ builtin_shadow1D,
+ builtin_noise1,
+ builtin_refract,
+ builtin_noise3,
+ builtin_texture2DLod,
+ builtin_min,
+ builtin_radians,
+ builtin_smoothstep,
+ builtin_texture1DProjLod,
+ builtin_textureCube,
+ builtin_length,
+ builtin_texture1DLod,
+ builtin_exp,
+ builtin_acos,
+ builtin_mix,
+ builtin_dot,
};
-
-static const char *functions_for_130_fs [] = {
- builtins_130_fs_texture,
- builtins_130_fs_textureProj,
+static const char *prototypes_for_EXT_texture_array_frag =
+ "(\n"
+ "(function texture1DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0xb9bd60)\n"
+ " (declare (in ) vec2 coord@0xb9be80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0xb9c240)\n"
+ " (declare (in ) vec2 coord@0xb9c360)\n"
+ " (declare (in ) float bias@0xb9c470)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0xb9c650)\n"
+ " (declare (in ) vec2 coord@0xb9c770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0xb9cb30)\n"
+ " (declare (in ) vec2 coord@0xb9cc50)\n"
+ " (declare (in ) float bias@0xb9cd60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArrayShadow sampler@0xb9cf40)\n"
+ " (declare (in ) vec3 coord@0xb9d060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArrayShadow sampler@0xb9d420)\n"
+ " (declare (in ) vec3 coord@0xb9d540)\n"
+ " (declare (in ) float bias@0xb9d650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DArrayShadow sampler@0xb9d830)\n"
+ " (declare (in ) vec4 coord@0xb9d950)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_EXT_texture_array_frag [] = {
+ builtin_shadow2DArray,
+ builtin_shadow1DArray,
+ builtin_texture1DArray,
+ builtin_texture2DArray,
};
-
-/* ARB_texture_rectangle builtins */
-
-static const char *builtins_ARB_texture_rectangle_textures = {
- "((function texture2DRect\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+static const char *prototypes_for_110_vert =
+ "(\n"
+ "(function radians\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float degrees@0x9e3c50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 degrees@0x9e4020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 degrees@0x9e4210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 degrees@0x9e4400)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function shadow2DRect\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
"\n"
- "))\n"
+ "(function degrees\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float radians@0x9e45f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 radians@0x9e49c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 radians@0x9e4bb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 radians@0x9e4da0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x9e4f90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x9e5340)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x9e5520)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x9e5700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x9e58e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x9e5c90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x9e5e70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x9e6050)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function tan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x9e6230)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x9e65e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x9e67c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x9e69a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function asin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x9e6b80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x9e6f30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x9e7110)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x9e72f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function acos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x9e74d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x9e7880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x9e7a60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x9e7c40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function atan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y@0x9e7e20)\n"
+ " (declare (in ) float x@0x9e7f30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y@0x9e82e0)\n"
+ " (declare (in ) vec2 x@0x9e83f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y@0x9e85d0)\n"
+ " (declare (in ) vec3 x@0x9e86e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y@0x9e88c0)\n"
+ " (declare (in ) vec4 x@0x9e89d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y_over_x@0x9e8bb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y_over_x@0x9e8da0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y_over_x@0x9e8f90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y_over_x@0x9e9180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function pow\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9e9370)\n"
+ " (declare (in ) float y@0x9e9480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9e9830)\n"
+ " (declare (in ) vec2 y@0x9e9940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9e9b20)\n"
+ " (declare (in ) vec3 y@0x9e9c30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9e9e10)\n"
+ " (declare (in ) vec4 y@0x9e9f20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ea100)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ea4b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ea690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ea870)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9eaa50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9eae00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9eafe0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9eb1c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9eb3a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9eb750)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9eb930)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ebb10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ebcf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ec0a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ec280)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ec460)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ec640)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ec9f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ecbd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ecdb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function inversesqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ecf90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ed350)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ed530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ed710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function abs\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ed8f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9edca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ede80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ee060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sign\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ee240)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ee5f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ee7d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ee9b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function floor\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9eeb90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9eef40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9ef120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9ef300)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ceil\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9ef4e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9ef890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9efa70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9efc50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9efe30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f01e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f03c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f05a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mod\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9f0780)\n"
+ " (declare (in ) float y@0x9f0890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f0c40)\n"
+ " (declare (in ) float y@0x9f0d50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f0f30)\n"
+ " (declare (in ) float y@0x9f1040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f1220)\n"
+ " (declare (in ) float y@0x9f1330)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f1510)\n"
+ " (declare (in ) vec2 y@0x9f1620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f1800)\n"
+ " (declare (in ) vec3 y@0x9f1910)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f1af0)\n"
+ " (declare (in ) vec4 y@0x9f1c00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function min\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9f1de0)\n"
+ " (declare (in ) float y@0x9f1ef0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f22a0)\n"
+ " (declare (in ) vec2 y@0x9f23b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f2590)\n"
+ " (declare (in ) vec3 y@0x9f26a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f2880)\n"
+ " (declare (in ) vec4 y@0x9f2990)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f2b70)\n"
+ " (declare (in ) float y@0x9f2c80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f2e60)\n"
+ " (declare (in ) float y@0x9f2f70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f3150)\n"
+ " (declare (in ) float y@0x9f3260)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function max\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9f3440)\n"
+ " (declare (in ) float y@0x9f3550)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f3900)\n"
+ " (declare (in ) vec2 y@0x9f3a10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f3bf0)\n"
+ " (declare (in ) vec3 y@0x9f3d00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f3ee0)\n"
+ " (declare (in ) vec4 y@0x9f3ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f41d0)\n"
+ " (declare (in ) float y@0x9f42e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f44c0)\n"
+ " (declare (in ) float y@0x9f45d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f47b0)\n"
+ " (declare (in ) float y@0x9f48c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function clamp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9f4aa0)\n"
+ " (declare (in ) float minVal@0x9f4bb0)\n"
+ " (declare (in ) float maxVal@0x9f4cc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f5070)\n"
+ " (declare (in ) vec2 minVal@0x9f5180)\n"
+ " (declare (in ) vec2 maxVal@0x9f5290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f5470)\n"
+ " (declare (in ) vec3 minVal@0x9f5580)\n"
+ " (declare (in ) vec3 maxVal@0x9f5690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f5870)\n"
+ " (declare (in ) vec4 minVal@0x9f5980)\n"
+ " (declare (in ) vec4 maxVal@0x9f5a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f5c70)\n"
+ " (declare (in ) float minVal@0x9f5d80)\n"
+ " (declare (in ) float maxVal@0x9f5e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f6070)\n"
+ " (declare (in ) float minVal@0x9f6180)\n"
+ " (declare (in ) float maxVal@0x9f6290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f6470)\n"
+ " (declare (in ) float minVal@0x9f6580)\n"
+ " (declare (in ) float maxVal@0x9f6690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9f6870)\n"
+ " (declare (in ) float y@0x9f6980)\n"
+ " (declare (in ) float a@0x9f6a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f6e40)\n"
+ " (declare (in ) vec2 y@0x9f6f50)\n"
+ " (declare (in ) vec2 a@0x9f7060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f7240)\n"
+ " (declare (in ) vec3 y@0x9f7350)\n"
+ " (declare (in ) vec3 a@0x9f7460)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f7640)\n"
+ " (declare (in ) vec4 y@0x9f7750)\n"
+ " (declare (in ) vec4 a@0x9f7860)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9f7a40)\n"
+ " (declare (in ) vec2 y@0x9f7b50)\n"
+ " (declare (in ) float a@0x9f7c60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9f7e40)\n"
+ " (declare (in ) vec3 y@0x9f7f50)\n"
+ " (declare (in ) float a@0x9f8060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9f8240)\n"
+ " (declare (in ) vec4 y@0x9f8350)\n"
+ " (declare (in ) float a@0x9f8460)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function step\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x9f8640)\n"
+ " (declare (in ) float x@0x9f8750)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge@0x9f8b00)\n"
+ " (declare (in ) vec2 x@0x9f8c10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge@0x9f8df0)\n"
+ " (declare (in ) vec3 x@0x9f8f00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge@0x9f90e0)\n"
+ " (declare (in ) vec4 x@0x9f91f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x9f93d0)\n"
+ " (declare (in ) vec2 x@0x9f94e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x9f96c0)\n"
+ " (declare (in ) vec3 x@0x9f97d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x9f99b0)\n"
+ " (declare (in ) vec4 x@0x9f9ac0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function smoothstep\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x9f9ca0)\n"
+ " (declare (in ) float edge1@0x9f9db0)\n"
+ " (declare (in ) float x@0x9f9ec0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge0@0x9fa280)\n"
+ " (declare (in ) vec2 edge1@0x9fa390)\n"
+ " (declare (in ) vec2 x@0x9fa4a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge0@0x9fa680)\n"
+ " (declare (in ) vec3 edge1@0x9fa790)\n"
+ " (declare (in ) vec3 x@0x9fa8a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge0@0x9faa80)\n"
+ " (declare (in ) vec4 edge1@0x9fab90)\n"
+ " (declare (in ) vec4 x@0x9faca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x9fae80)\n"
+ " (declare (in ) float edge1@0x9faf90)\n"
+ " (declare (in ) vec2 x@0x9fb0a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x9fb280)\n"
+ " (declare (in ) float edge1@0x9fb390)\n"
+ " (declare (in ) vec3 x@0x9fb4a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x9fb680)\n"
+ " (declare (in ) float edge1@0x9fb790)\n"
+ " (declare (in ) vec4 x@0x9fb8a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function length\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9fba80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9fbe30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9fc010)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9fc1f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function distance\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p0@0x9fc3d0)\n"
+ " (declare (in ) float p1@0x9fc4e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p0@0x9fc8a0)\n"
+ " (declare (in ) vec2 p1@0x9fc9b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p0@0x9fcb90)\n"
+ " (declare (in ) vec3 p1@0x9fcca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p0@0x9fce80)\n"
+ " (declare (in ) vec4 p1@0x9fcf90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dot\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9fd170)\n"
+ " (declare (in ) float y@0x9fd280)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9fd630)\n"
+ " (declare (in ) vec2 y@0x9fd740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9fd920)\n"
+ " (declare (in ) vec3 y@0x9fda30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9fdc10)\n"
+ " (declare (in ) vec4 y@0x9fdd20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cross\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9fdf00)\n"
+ " (declare (in ) vec3 y@0x9fe010)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function normalize\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x9fe3c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x9fe780)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x9fe960)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x9feb40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ftransform\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function faceforward\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float N@0x9fefd0)\n"
+ " (declare (in ) float I@0x9ff0e0)\n"
+ " (declare (in ) float Nref@0x9ff1f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 N@0x9ff5b0)\n"
+ " (declare (in ) vec2 I@0x9ff6c0)\n"
+ " (declare (in ) vec2 Nref@0x9ff7d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 N@0x9ff9b0)\n"
+ " (declare (in ) vec3 I@0x9ffac0)\n"
+ " (declare (in ) vec3 Nref@0x9ffbd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 N@0x9ffdb0)\n"
+ " (declare (in ) vec4 I@0x9ffec0)\n"
+ " (declare (in ) vec4 Nref@0x9fffd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function reflect\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0xa001b0)\n"
+ " (declare (in ) float N@0xa002c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0xa00680)\n"
+ " (declare (in ) vec2 N@0xa00790)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0xa00970)\n"
+ " (declare (in ) vec3 N@0xa00a80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0xa00c60)\n"
+ " (declare (in ) vec4 N@0xa00d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function refract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0xa00f50)\n"
+ " (declare (in ) float N@0xa01060)\n"
+ " (declare (in ) float eta@0xa01170)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0xa01530)\n"
+ " (declare (in ) vec2 N@0xa01640)\n"
+ " (declare (in ) float eta@0xa01750)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0xa01930)\n"
+ " (declare (in ) vec3 N@0xa01a40)\n"
+ " (declare (in ) float eta@0xa01b50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0xa01d30)\n"
+ " (declare (in ) vec4 N@0xa01e40)\n"
+ " (declare (in ) float eta@0xa01f50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function matrixCompMult\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 x@0xa02130)\n"
+ " (declare (in ) mat2 y@0xa02240)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 x@0xa02600)\n"
+ " (declare (in ) mat3 y@0xa02710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 x@0xa028f0)\n"
+ " (declare (in ) mat4 y@0xa02a00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa02be0)\n"
+ " (declare (in ) vec2 y@0xa02cf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa030b0)\n"
+ " (declare (in ) vec3 y@0xa031c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa033a0)\n"
+ " (declare (in ) vec4 y@0xa034b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa03690)\n"
+ " (declare (in ) ivec2 y@0xa037a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa03980)\n"
+ " (declare (in ) ivec3 y@0xa03a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa03c70)\n"
+ " (declare (in ) ivec4 y@0xa03d80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa03f60)\n"
+ " (declare (in ) vec2 y@0xa04070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa04430)\n"
+ " (declare (in ) vec3 y@0xa04540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa04720)\n"
+ " (declare (in ) vec4 y@0xa04830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa04a10)\n"
+ " (declare (in ) ivec2 y@0xa04b20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa04d00)\n"
+ " (declare (in ) ivec3 y@0xa04e10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa04ff0)\n"
+ " (declare (in ) ivec4 y@0xa05100)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa052e0)\n"
+ " (declare (in ) vec2 y@0xa053f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa057b0)\n"
+ " (declare (in ) vec3 y@0xa058c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa05aa0)\n"
+ " (declare (in ) vec4 y@0xa05bb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa05d90)\n"
+ " (declare (in ) ivec2 y@0xa05ea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa06080)\n"
+ " (declare (in ) ivec3 y@0xa06190)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa06370)\n"
+ " (declare (in ) ivec4 y@0xa06480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa06660)\n"
+ " (declare (in ) vec2 y@0xa06770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa06b30)\n"
+ " (declare (in ) vec3 y@0xa06c40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa06e20)\n"
+ " (declare (in ) vec4 y@0xa06f30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa07110)\n"
+ " (declare (in ) ivec2 y@0xa07220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa07400)\n"
+ " (declare (in ) ivec3 y@0xa07510)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa076f0)\n"
+ " (declare (in ) ivec4 y@0xa07800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function equal\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa079e0)\n"
+ " (declare (in ) vec2 y@0xa07af0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa07ea0)\n"
+ " (declare (in ) vec3 y@0xa07fb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa08190)\n"
+ " (declare (in ) vec4 y@0xa082a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa08480)\n"
+ " (declare (in ) ivec2 y@0xa08590)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa08770)\n"
+ " (declare (in ) ivec3 y@0xa08880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa08a60)\n"
+ " (declare (in ) ivec4 y@0xa08b70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0xa08d50)\n"
+ " (declare (in ) bvec2 y@0xa08e60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0xa09040)\n"
+ " (declare (in ) bvec3 y@0xa09150)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0xa09330)\n"
+ " (declare (in ) bvec4 y@0xa09440)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function notEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa09620)\n"
+ " (declare (in ) vec2 y@0xa09730)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa09af0)\n"
+ " (declare (in ) vec3 y@0xa09c00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa09de0)\n"
+ " (declare (in ) vec4 y@0xa09ef0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0xa0a0d0)\n"
+ " (declare (in ) ivec2 y@0xa0a1e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0xa0a3c0)\n"
+ " (declare (in ) ivec3 y@0xa0a4d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0xa0a6b0)\n"
+ " (declare (in ) ivec4 y@0xa0a7c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0xa0a9a0)\n"
+ " (declare (in ) bvec2 y@0xa0aab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0xa0ac90)\n"
+ " (declare (in ) bvec3 y@0xa0ada0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0xa0af80)\n"
+ " (declare (in ) bvec4 y@0xa0b090)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function any\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0xa0b270)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0xa0b620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0xa0b800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function all\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0xa0b9e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0xa0bd90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0xa0bf70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function not\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0xa0c150)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0xa0c500)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0xa0c6e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0c8c0)\n"
+ " (declare (in ) float coord@0xa0c9e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0cda0)\n"
+ " (declare (in ) vec2 coord@0xa0cec0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0d280)\n"
+ " (declare (in ) vec4 coord@0xa0d3a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0d580)\n"
+ " (declare (in ) float coord@0xa0d6a0)\n"
+ " (declare (in ) float lod@0xa0d7b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0db70)\n"
+ " (declare (in ) vec2 coord@0xa0dc90)\n"
+ " (declare (in ) float lod@0xa0dda0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0xa0e160)\n"
+ " (declare (in ) vec4 coord@0xa0e280)\n"
+ " (declare (in ) float lod@0xa0e390)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0e570)\n"
+ " (declare (in ) vec2 coord@0xa0e690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0ea50)\n"
+ " (declare (in ) vec3 coord@0xa0eb70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0ef30)\n"
+ " (declare (in ) vec4 coord@0xa0f050)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0f230)\n"
+ " (declare (in ) vec2 coord@0xa0f350)\n"
+ " (declare (in ) float lod@0xa0f460)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0f820)\n"
+ " (declare (in ) vec3 coord@0xa0f940)\n"
+ " (declare (in ) float lod@0xa0fa50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0xa0fe10)\n"
+ " (declare (in ) vec4 coord@0xa0ff30)\n"
+ " (declare (in ) float lod@0xa10040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0xa10220)\n"
+ " (declare (in ) vec3 coord@0xa10340)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0xa10700)\n"
+ " (declare (in ) vec4 coord@0xa10820)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0xa10be0)\n"
+ " (declare (in ) vec3 coord@0xa10d00)\n"
+ " (declare (in ) float lod@0xa10e10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0xa111d0)\n"
+ " (declare (in ) vec4 coord@0xa112f0)\n"
+ " (declare (in ) float lod@0xa11400)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCube\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0xa117c0)\n"
+ " (declare (in ) vec3 coord@0xa118e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCubeLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0xa11ca0)\n"
+ " (declare (in ) vec3 coord@0xa11dc0)\n"
+ " (declare (in ) float lod@0xa11ed0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0xa12290)\n"
+ " (declare (in ) vec3 coord@0xa123b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0xa12770)\n"
+ " (declare (in ) vec3 coord@0xa12890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0xa12c50)\n"
+ " (declare (in ) vec4 coord@0xa12d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0xa13130)\n"
+ " (declare (in ) vec4 coord@0xa13250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0xa13610)\n"
+ " (declare (in ) vec3 coord@0xa13730)\n"
+ " (declare (in ) float lod@0xa13840)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0xa13c00)\n"
+ " (declare (in ) vec3 coord@0xa13d20)\n"
+ " (declare (in ) float lod@0xa13e30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0xa141f0)\n"
+ " (declare (in ) vec4 coord@0xa14310)\n"
+ " (declare (in ) float lod@0xa14420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0xa147e0)\n"
+ " (declare (in ) vec4 coord@0xa14900)\n"
+ " (declare (in ) float lod@0xa14a10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise1\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0xa14dd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa15180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa15360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa15540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float x@0xa15720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa15ad0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa15cb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa15e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise3\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float x@0xa16070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa16420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa16600)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa167e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise4\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float x@0xa169c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0xa16d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0xa16f50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0xa17130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_110_vert [] = {
+ builtin_clamp,
+ builtin_matrixCompMult,
+ builtin_shadow2DProjLod,
+ builtin_noise2,
+ builtin_texture3DProjLod,
+ builtin_pow,
+ builtin_texture2DProj,
+ builtin_greaterThanEqual,
+ builtin_sign,
+ builtin_texture3DProj,
+ builtin_texture2D,
+ builtin_equal,
+ builtin_faceforward,
+ builtin_tan,
+ builtin_shadow2DProj,
+ builtin_shadow1DProjLod,
+ builtin_any,
+ builtin_normalize,
+ builtin_asin,
+ builtin_texture1DProj,
+ builtin_log,
+ builtin_floor,
+ builtin_exp2,
+ builtin_lessThan,
+ builtin_cross,
+ builtin_sqrt,
+ builtin_texture3DLod,
+ builtin_fract,
+ builtin_abs,
+ builtin_degrees,
+ builtin_shadow1DLod,
+ builtin_ftransform,
+ builtin_sin,
+ builtin_shadow2D,
+ builtin_shadow2DLod,
+ builtin_all,
+ builtin_log2,
+ builtin_atan,
+ builtin_notEqual,
+ builtin_max,
+ builtin_lessThanEqual,
+ builtin_shadow1DProj,
+ builtin_ceil,
+ builtin_reflect,
+ builtin_textureCubeLod,
+ builtin_step,
+ builtin_texture1D,
+ builtin_greaterThan,
+ builtin_texture3D,
+ builtin_not,
+ builtin_texture2DProjLod,
+ builtin_inversesqrt,
+ builtin_mod,
+ builtin_noise4,
+ builtin_distance,
+ builtin_cos,
+ builtin_shadow1D,
+ builtin_noise1,
+ builtin_refract,
+ builtin_noise3,
+ builtin_texture2DLod,
+ builtin_min,
+ builtin_radians,
+ builtin_smoothstep,
+ builtin_texture1DProjLod,
+ builtin_textureCube,
+ builtin_length,
+ builtin_texture1DLod,
+ builtin_exp,
+ builtin_acos,
+ builtin_mix,
+ builtin_dot,
};
-
-static const char *functions_for_ARB_texture_rectangle [] = {
- builtins_ARB_texture_rectangle_textures,
+static const char *prototypes_for_110_frag =
+ "(\n"
+ "(function radians\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float degrees@0x151ee40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 degrees@0x151f210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 degrees@0x151f400)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 degrees@0x151f5f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function degrees\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float radians@0x151f7e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 radians@0x151fbb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 radians@0x151fda0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 radians@0x151ff90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x1520180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x1520530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x1520710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x15208f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x1520ad0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x1520e80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x1521060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x1521240)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function tan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x1521420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x15217d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x15219b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x1521b90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function asin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x1521d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x1522120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x1522300)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x15224e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function acos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x15226c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x1522a70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x1522c50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x1522e30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function atan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y@0x1523010)\n"
+ " (declare (in ) float x@0x1523120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y@0x15234d0)\n"
+ " (declare (in ) vec2 x@0x15235e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y@0x15237c0)\n"
+ " (declare (in ) vec3 x@0x15238d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y@0x1523ab0)\n"
+ " (declare (in ) vec4 x@0x1523bc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y_over_x@0x1523da0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y_over_x@0x1523f90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y_over_x@0x1524180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y_over_x@0x1524370)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function pow\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1524560)\n"
+ " (declare (in ) float y@0x1524670)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1524a20)\n"
+ " (declare (in ) vec2 y@0x1524b30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1524d10)\n"
+ " (declare (in ) vec3 y@0x1524e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1525000)\n"
+ " (declare (in ) vec4 y@0x1525110)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x15252f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x15256a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1525880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1525a60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1525c40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1525ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15261d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x15263b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1526590)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1526940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1526b20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1526d00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1526ee0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1527290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1527470)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1527650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1527830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1527be0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1527dc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1527fa0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function inversesqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1528180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1528540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1528720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1528900)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function abs\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1528ae0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1528e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1529070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1529250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sign\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1529430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x15297e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15299c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1529ba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function floor\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1529d80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152a130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152a310)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152a4f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ceil\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152a6d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152aa80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152ac60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152ae40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152b020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152b3d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152b5b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152b790)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mod\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152b970)\n"
+ " (declare (in ) float y@0x152ba80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152be30)\n"
+ " (declare (in ) float y@0x152bf40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152c120)\n"
+ " (declare (in ) float y@0x152c230)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152c410)\n"
+ " (declare (in ) float y@0x152c520)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152c700)\n"
+ " (declare (in ) vec2 y@0x152c810)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152c9f0)\n"
+ " (declare (in ) vec3 y@0x152cb00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152cce0)\n"
+ " (declare (in ) vec4 y@0x152cdf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function min\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152cfd0)\n"
+ " (declare (in ) float y@0x152d0e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152d490)\n"
+ " (declare (in ) vec2 y@0x152d5a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152d780)\n"
+ " (declare (in ) vec3 y@0x152d890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152da70)\n"
+ " (declare (in ) vec4 y@0x152db80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152dd60)\n"
+ " (declare (in ) float y@0x152de70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152e050)\n"
+ " (declare (in ) float y@0x152e160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152e340)\n"
+ " (declare (in ) float y@0x152e450)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function max\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152e630)\n"
+ " (declare (in ) float y@0x152e740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152eaf0)\n"
+ " (declare (in ) vec2 y@0x152ec00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152ede0)\n"
+ " (declare (in ) vec3 y@0x152eef0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152f0d0)\n"
+ " (declare (in ) vec4 y@0x152f1e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x152f3c0)\n"
+ " (declare (in ) float y@0x152f4d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x152f6b0)\n"
+ " (declare (in ) float y@0x152f7c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x152f9a0)\n"
+ " (declare (in ) float y@0x152fab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function clamp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x152fc90)\n"
+ " (declare (in ) float minVal@0x152fda0)\n"
+ " (declare (in ) float maxVal@0x152feb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1530260)\n"
+ " (declare (in ) vec2 minVal@0x1530370)\n"
+ " (declare (in ) vec2 maxVal@0x1530480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1530660)\n"
+ " (declare (in ) vec3 minVal@0x1530770)\n"
+ " (declare (in ) vec3 maxVal@0x1530880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1530a60)\n"
+ " (declare (in ) vec4 minVal@0x1530b70)\n"
+ " (declare (in ) vec4 maxVal@0x1530c80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1530e60)\n"
+ " (declare (in ) float minVal@0x1530f70)\n"
+ " (declare (in ) float maxVal@0x1531080)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1531260)\n"
+ " (declare (in ) float minVal@0x1531370)\n"
+ " (declare (in ) float maxVal@0x1531480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1531660)\n"
+ " (declare (in ) float minVal@0x1531770)\n"
+ " (declare (in ) float maxVal@0x1531880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1531a60)\n"
+ " (declare (in ) float y@0x1531b70)\n"
+ " (declare (in ) float a@0x1531c80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1532030)\n"
+ " (declare (in ) vec2 y@0x1532140)\n"
+ " (declare (in ) vec2 a@0x1532250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1532430)\n"
+ " (declare (in ) vec3 y@0x1532540)\n"
+ " (declare (in ) vec3 a@0x1532650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1532830)\n"
+ " (declare (in ) vec4 y@0x1532940)\n"
+ " (declare (in ) vec4 a@0x1532a50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1532c30)\n"
+ " (declare (in ) vec2 y@0x1532d40)\n"
+ " (declare (in ) float a@0x1532e50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1533030)\n"
+ " (declare (in ) vec3 y@0x1533140)\n"
+ " (declare (in ) float a@0x1533250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1533430)\n"
+ " (declare (in ) vec4 y@0x1533540)\n"
+ " (declare (in ) float a@0x1533650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function step\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x1533830)\n"
+ " (declare (in ) float x@0x1533940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge@0x1533cf0)\n"
+ " (declare (in ) vec2 x@0x1533e00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge@0x1533fe0)\n"
+ " (declare (in ) vec3 x@0x15340f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge@0x15342d0)\n"
+ " (declare (in ) vec4 x@0x15343e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x15345c0)\n"
+ " (declare (in ) vec2 x@0x15346d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x15348b0)\n"
+ " (declare (in ) vec3 x@0x15349c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x1534ba0)\n"
+ " (declare (in ) vec4 x@0x1534cb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function smoothstep\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x1534e90)\n"
+ " (declare (in ) float edge1@0x1534fa0)\n"
+ " (declare (in ) float x@0x15350b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge0@0x1535470)\n"
+ " (declare (in ) vec2 edge1@0x1535580)\n"
+ " (declare (in ) vec2 x@0x1535690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge0@0x1535870)\n"
+ " (declare (in ) vec3 edge1@0x1535980)\n"
+ " (declare (in ) vec3 x@0x1535a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge0@0x1535c70)\n"
+ " (declare (in ) vec4 edge1@0x1535d80)\n"
+ " (declare (in ) vec4 x@0x1535e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x1536070)\n"
+ " (declare (in ) float edge1@0x1536180)\n"
+ " (declare (in ) vec2 x@0x1536290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x1536470)\n"
+ " (declare (in ) float edge1@0x1536580)\n"
+ " (declare (in ) vec3 x@0x1536690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x1536870)\n"
+ " (declare (in ) float edge1@0x1536980)\n"
+ " (declare (in ) vec4 x@0x1536a90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function length\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1536c70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1537020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1537200)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x15373e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function distance\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p0@0x15375c0)\n"
+ " (declare (in ) float p1@0x15376d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p0@0x1537a90)\n"
+ " (declare (in ) vec2 p1@0x1537ba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p0@0x1537d80)\n"
+ " (declare (in ) vec3 p1@0x1537e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p0@0x1538070)\n"
+ " (declare (in ) vec4 p1@0x1538180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dot\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1538360)\n"
+ " (declare (in ) float y@0x1538470)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1538820)\n"
+ " (declare (in ) vec2 y@0x1538930)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1538b10)\n"
+ " (declare (in ) vec3 y@0x1538c20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1538e00)\n"
+ " (declare (in ) vec4 y@0x1538f10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cross\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15390f0)\n"
+ " (declare (in ) vec3 y@0x1539200)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function normalize\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x15395b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1539970)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1539b50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1539d30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function faceforward\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float N@0x1539f10)\n"
+ " (declare (in ) float I@0x153a020)\n"
+ " (declare (in ) float Nref@0x153a130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 N@0x153a4f0)\n"
+ " (declare (in ) vec2 I@0x153a600)\n"
+ " (declare (in ) vec2 Nref@0x153a710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 N@0x153a8f0)\n"
+ " (declare (in ) vec3 I@0x153aa00)\n"
+ " (declare (in ) vec3 Nref@0x153ab10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 N@0x153acf0)\n"
+ " (declare (in ) vec4 I@0x153ae00)\n"
+ " (declare (in ) vec4 Nref@0x153af10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function reflect\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x153b0f0)\n"
+ " (declare (in ) float N@0x153b200)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x153b5c0)\n"
+ " (declare (in ) vec2 N@0x153b6d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x153b8b0)\n"
+ " (declare (in ) vec3 N@0x153b9c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x153bba0)\n"
+ " (declare (in ) vec4 N@0x153bcb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function refract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x153be90)\n"
+ " (declare (in ) float N@0x153bfa0)\n"
+ " (declare (in ) float eta@0x153c0b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x153c470)\n"
+ " (declare (in ) vec2 N@0x153c580)\n"
+ " (declare (in ) float eta@0x153c690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x153c870)\n"
+ " (declare (in ) vec3 N@0x153c980)\n"
+ " (declare (in ) float eta@0x153ca90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x153cc70)\n"
+ " (declare (in ) vec4 N@0x153cd80)\n"
+ " (declare (in ) float eta@0x153ce90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function matrixCompMult\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 x@0x153d070)\n"
+ " (declare (in ) mat2 y@0x153d180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 x@0x153d540)\n"
+ " (declare (in ) mat3 y@0x153d650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 x@0x153d830)\n"
+ " (declare (in ) mat4 y@0x153d940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x153db20)\n"
+ " (declare (in ) vec2 y@0x153dc30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x153dff0)\n"
+ " (declare (in ) vec3 y@0x153e100)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x153e2e0)\n"
+ " (declare (in ) vec4 y@0x153e3f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x153e5d0)\n"
+ " (declare (in ) ivec2 y@0x153e6e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x153e8c0)\n"
+ " (declare (in ) ivec3 y@0x153e9d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x153ebb0)\n"
+ " (declare (in ) ivec4 y@0x153ecc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x153eea0)\n"
+ " (declare (in ) vec2 y@0x153efb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x153f370)\n"
+ " (declare (in ) vec3 y@0x153f480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x153f660)\n"
+ " (declare (in ) vec4 y@0x153f770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x153f950)\n"
+ " (declare (in ) ivec2 y@0x153fa60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x153fc40)\n"
+ " (declare (in ) ivec3 y@0x153fd50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x153ff30)\n"
+ " (declare (in ) ivec4 y@0x1540040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1540220)\n"
+ " (declare (in ) vec2 y@0x1540330)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15406f0)\n"
+ " (declare (in ) vec3 y@0x1540800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x15409e0)\n"
+ " (declare (in ) vec4 y@0x1540af0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x1540cd0)\n"
+ " (declare (in ) ivec2 y@0x1540de0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x1540fc0)\n"
+ " (declare (in ) ivec3 y@0x15410d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x15412b0)\n"
+ " (declare (in ) ivec4 y@0x15413c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x15415a0)\n"
+ " (declare (in ) vec2 y@0x15416b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1541a70)\n"
+ " (declare (in ) vec3 y@0x1541b80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1541d60)\n"
+ " (declare (in ) vec4 y@0x1541e70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x1542050)\n"
+ " (declare (in ) ivec2 y@0x1542160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x1542340)\n"
+ " (declare (in ) ivec3 y@0x1542450)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x1542630)\n"
+ " (declare (in ) ivec4 y@0x1542740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function equal\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1542920)\n"
+ " (declare (in ) vec2 y@0x1542a30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1542de0)\n"
+ " (declare (in ) vec3 y@0x1542ef0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x15430d0)\n"
+ " (declare (in ) vec4 y@0x15431e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x15433c0)\n"
+ " (declare (in ) ivec2 y@0x15434d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x15436b0)\n"
+ " (declare (in ) ivec3 y@0x15437c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x15439a0)\n"
+ " (declare (in ) ivec4 y@0x1543ab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x1543c90)\n"
+ " (declare (in ) bvec2 y@0x1543da0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x1543f80)\n"
+ " (declare (in ) bvec3 y@0x1544090)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x1544270)\n"
+ " (declare (in ) bvec4 y@0x1544380)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function notEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1544560)\n"
+ " (declare (in ) vec2 y@0x1544670)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1544a30)\n"
+ " (declare (in ) vec3 y@0x1544b40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1544d20)\n"
+ " (declare (in ) vec4 y@0x1544e30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x1545010)\n"
+ " (declare (in ) ivec2 y@0x1545120)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x1545300)\n"
+ " (declare (in ) ivec3 y@0x1545410)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x15455f0)\n"
+ " (declare (in ) ivec4 y@0x1545700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x15458e0)\n"
+ " (declare (in ) bvec2 y@0x15459f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x1545bd0)\n"
+ " (declare (in ) bvec3 y@0x1545ce0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x1545ec0)\n"
+ " (declare (in ) bvec4 y@0x1545fd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function any\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x15461b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x1546560)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x1546740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function all\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x1546920)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x1546cd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x1546eb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function not\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x1547090)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x1547440)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x1547620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x1547800)\n"
+ " (declare (in ) float coord@0x1547920)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x15484c0)\n"
+ " (declare (in ) float coord@0x15485e0)\n"
+ " (declare (in ) float bias@0x15486f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x1547ce0)\n"
+ " (declare (in ) vec2 coord@0x1547e00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x15481c0)\n"
+ " (declare (in ) vec4 coord@0x15482e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x15488d0)\n"
+ " (declare (in ) vec2 coord@0x15489f0)\n"
+ " (declare (in ) float bias@0x1548b00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x1548ce0)\n"
+ " (declare (in ) vec4 coord@0x1548e00)\n"
+ " (declare (in ) float bias@0x1548f10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x15490f0)\n"
+ " (declare (in ) vec2 coord@0x1549210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x1549db0)\n"
+ " (declare (in ) vec2 coord@0x1549ed0)\n"
+ " (declare (in ) float bias@0x1549fe0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x15495d0)\n"
+ " (declare (in ) vec3 coord@0x15496f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x1549ab0)\n"
+ " (declare (in ) vec4 coord@0x1549bd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x154a1c0)\n"
+ " (declare (in ) vec3 coord@0x154a2e0)\n"
+ " (declare (in ) float bias@0x154a3f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x154a5d0)\n"
+ " (declare (in ) vec4 coord@0x154a6f0)\n"
+ " (declare (in ) float bias@0x154a800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x154a9e0)\n"
+ " (declare (in ) vec3 coord@0x154ab00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x154b3a0)\n"
+ " (declare (in ) vec3 coord@0x154b4c0)\n"
+ " (declare (in ) float bias@0x154b5d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x154aec0)\n"
+ " (declare (in ) vec4 coord@0x154afe0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x154b7b0)\n"
+ " (declare (in ) vec4 coord@0x154b8d0)\n"
+ " (declare (in ) float bias@0x154b9e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCube\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x154bbc0)\n"
+ " (declare (in ) vec3 coord@0x154bce0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x154c0a0)\n"
+ " (declare (in ) vec3 coord@0x154c1c0)\n"
+ " (declare (in ) float bias@0x154c2d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x154c4b0)\n"
+ " (declare (in ) vec3 coord@0x154c5d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x154d830)\n"
+ " (declare (in ) vec3 coord@0x154d950)\n"
+ " (declare (in ) float bias@0x154da60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x154c990)\n"
+ " (declare (in ) vec3 coord@0x154cab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x154dc40)\n"
+ " (declare (in ) vec3 coord@0x154dd60)\n"
+ " (declare (in ) float bias@0x154de70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x154ce70)\n"
+ " (declare (in ) vec4 coord@0x154cf90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x154e050)\n"
+ " (declare (in ) vec4 coord@0x154e170)\n"
+ " (declare (in ) float bias@0x154e280)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x154d350)\n"
+ " (declare (in ) vec4 coord@0x154d470)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x154e460)\n"
+ " (declare (in ) vec4 coord@0x154e580)\n"
+ " (declare (in ) float bias@0x154e690)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dFdx\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x154e870)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x154ec20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x154ee00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x154efe0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dFdy\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x154f1c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x154f570)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x154f750)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x154f930)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fwidth\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x154fb10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x154fec0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x15500a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x1550280)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise1\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1550460)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1550810)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15509f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1550bd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1550db0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1551160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1551340)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1551520)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise3\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1551700)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1551ab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x1551c90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x1551e70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise4\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x1552050)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x1552400)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x15525e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x15527c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_110_frag [] = {
+ builtin_clamp,
+ builtin_matrixCompMult,
+ builtin_noise2,
+ builtin_pow,
+ builtin_texture2DProj,
+ builtin_fwidth,
+ builtin_greaterThanEqual,
+ builtin_sign,
+ builtin_texture3DProj,
+ builtin_texture2D,
+ builtin_equal,
+ builtin_faceforward,
+ builtin_tan,
+ builtin_any,
+ builtin_normalize,
+ builtin_asin,
+ builtin_texture1DProj,
+ builtin_log,
+ builtin_floor,
+ builtin_exp2,
+ builtin_lessThan,
+ builtin_cross,
+ builtin_sqrt,
+ builtin_shadow2DProj,
+ builtin_fract,
+ builtin_abs,
+ builtin_degrees,
+ builtin_dFdx,
+ builtin_sin,
+ builtin_shadow2D,
+ builtin_all,
+ builtin_log2,
+ builtin_atan,
+ builtin_notEqual,
+ builtin_max,
+ builtin_lessThanEqual,
+ builtin_shadow1DProj,
+ builtin_ceil,
+ builtin_reflect,
+ builtin_step,
+ builtin_texture1D,
+ builtin_greaterThan,
+ builtin_texture3D,
+ builtin_not,
+ builtin_inversesqrt,
+ builtin_mod,
+ builtin_noise4,
+ builtin_distance,
+ builtin_cos,
+ builtin_shadow1D,
+ builtin_noise1,
+ builtin_refract,
+ builtin_noise3,
+ builtin_min,
+ builtin_radians,
+ builtin_smoothstep,
+ builtin_textureCube,
+ builtin_length,
+ builtin_dFdy,
+ builtin_exp,
+ builtin_acos,
+ builtin_mix,
+ builtin_dot,
};
-
-/* EXT_texture_array builtins */
-
-static const char *builtins_EXT_texture_array_textures = {
- "((function texture1DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+static const char *prototypes_for_EXT_texture_array_vert =
+ "(\n"
+ "(function texture1DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0x25ee5c0)\n"
+ " (declare (in ) vec2 coord@0x25ee6e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function texture1DArrayLod\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ "(function texture1DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0x25eeaa0)\n"
+ " (declare (in ) vec2 coord@0x25eebc0)\n"
+ " (declare (in ) float lod@0x25eecd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function texture2DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ "\n"
+ "(function texture2DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0x25ef090)\n"
+ " (declare (in ) vec2 coord@0x25ef1b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function texture2DArrayLod\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ "\n"
+ "(function texture2DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArray sampler@0x25ef570)\n"
+ " (declare (in ) vec2 coord@0x25ef690)\n"
+ " (declare (in ) float lod@0x25ef7a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function shadow1DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ "(function shadow1DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArrayShadow sampler@0x25efb60)\n"
+ " (declare (in ) vec3 coord@0x25efc80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function shadow1DArrayLod\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "(function shadow1DArrayLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DArrayShadow sampler@0x25f0040)\n"
+ " (declare (in ) vec3 coord@0x25f0160)\n"
+ " (declare (in ) float lod@0x25f0270)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function shadow2DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArrayShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) 1 (swiz w (var_ref P)) ))))\n"
"\n"
- "))\n"
+ "(function shadow2DArray\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DArrayShadow sampler@0x25f0630)\n"
+ " (declare (in ) vec4 coord@0x25f0750)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_EXT_texture_array_vert [] = {
+ builtin_texture1DArrayLod,
+ builtin_shadow2DArray,
+ builtin_texture2DArrayLod,
+ builtin_shadow1DArrayLod,
+ builtin_shadow1DArray,
+ builtin_texture2DArray,
+ builtin_texture1DArray,
};
-
-static const char *functions_for_EXT_texture_array [] = {
- builtins_EXT_texture_array_textures,
+static const char *prototypes_for_ARB_texture_rectangle_vert =
+ "(\n"
+ "(function texture2DRect\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x1cc28a0)\n"
+ " (declare (in ) vec2 coord@0x1cc29c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DRectProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x1cc2d80)\n"
+ " (declare (in ) vec3 coord@0x1cc2ea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x1cc3260)\n"
+ " (declare (in ) vec4 coord@0x1cc3380)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DRect\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRectShadow sampler@0x1cc3560)\n"
+ " (declare (in ) vec3 coord@0x1cc3680)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DRectProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRectShadow sampler@0x1cc3a40)\n"
+ " (declare (in ) vec4 coord@0x1cc3b60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_ARB_texture_rectangle_vert [] = {
+ builtin_texture2DRect,
+ builtin_shadow2DRectProj,
+ builtin_shadow2DRect,
+ builtin_texture2DRectProj,
};
-
-/* EXT_texture_array_fs builtins */
-
-static const char *builtins_EXT_texture_array_fs_textures = {
- "((function texture1DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+static const char *prototypes_for_ARB_texture_rectangle_frag =
+ "(\n"
+ "(function texture2DRect\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x13d0040)\n"
+ " (declare (in ) vec2 coord@0x13d0160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function texture2DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ "\n"
+ "(function texture2DRectProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x13d0520)\n"
+ " (declare (in ) vec3 coord@0x13d0640)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRect sampler@0x13d0a00)\n"
+ " (declare (in ) vec4 coord@0x13d0b20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
"\n"
")\n"
- " (function shadow1DArray\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
- "))\n"
+ "(function shadow2DRect\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRectShadow sampler@0x13d0d00)\n"
+ " (declare (in ) vec3 coord@0x13d0e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DRectProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DRectShadow sampler@0x13d11e0)\n"
+ " (declare (in ) vec4 coord@0x13d1300)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_ARB_texture_rectangle_frag [] = {
+ builtin_texture2DRect,
+ builtin_shadow2DRectProj,
+ builtin_shadow2DRect,
+ builtin_texture2DRectProj,
};
-
-static const char *functions_for_EXT_texture_array_fs [] = {
- builtins_EXT_texture_array_fs_textures,
+static const char *prototypes_for_120_frag =
+ "(\n"
+ "(function radians\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float degrees@0x8b57e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 degrees@0x8b5bb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 degrees@0x8b5da0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 degrees@0x8b5f90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function degrees\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float radians@0x8b6180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 radians@0x8b6550)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 radians@0x8b6740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 radians@0x8b6930)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x8b6b20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x8b6ed0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x8b70b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x8b7290)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x8b7470)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x8b7820)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x8b7a00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x8b7be0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function tan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x8b7dc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x8b8170)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x8b8350)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x8b8530)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function asin\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x8b8710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x8b8ac0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x8b8ca0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x8b8e80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function acos\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float angle@0x8b9060)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 angle@0x8b9410)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 angle@0x8b95f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 angle@0x8b97d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function atan\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y@0x8b99b0)\n"
+ " (declare (in ) float x@0x8b9ac0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y@0x8b9e70)\n"
+ " (declare (in ) vec2 x@0x8b9f80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y@0x8ba160)\n"
+ " (declare (in ) vec3 x@0x8ba270)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y@0x8ba450)\n"
+ " (declare (in ) vec4 x@0x8ba560)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float y_over_x@0x8ba740)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 y_over_x@0x8ba930)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 y_over_x@0x8bab20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 y_over_x@0x8bad10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function pow\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8baf00)\n"
+ " (declare (in ) float y@0x8bb010)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bb3c0)\n"
+ " (declare (in ) vec2 y@0x8bb4d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bb6b0)\n"
+ " (declare (in ) vec3 y@0x8bb7c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bb9a0)\n"
+ " (declare (in ) vec4 y@0x8bbab0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bbc90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bc040)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bc220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bc400)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bc5e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bc990)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bcb70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bcd50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function exp2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bcf30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bd2e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bd4c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bd6a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function log2\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bd880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bdc30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bde10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bdff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8be1d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8be580)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8be760)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8be940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function inversesqrt\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8beb20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8beee0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bf0c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bf2a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function abs\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bf480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8bf830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8bfa10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8bfbf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function sign\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8bfdd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c0180)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c0360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c0540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function floor\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c0720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c0ad0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c0cb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c0e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function ceil\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c1070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c1420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c1600)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c17e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c19c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c1d70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c1f50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c2130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mod\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c2310)\n"
+ " (declare (in ) float y@0x8c2420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c27d0)\n"
+ " (declare (in ) float y@0x8c28e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c2ac0)\n"
+ " (declare (in ) float y@0x8c2bd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c2db0)\n"
+ " (declare (in ) float y@0x8c2ec0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c30a0)\n"
+ " (declare (in ) vec2 y@0x8c31b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c3390)\n"
+ " (declare (in ) vec3 y@0x8c34a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c3680)\n"
+ " (declare (in ) vec4 y@0x8c3790)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function min\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c3970)\n"
+ " (declare (in ) float y@0x8c3a80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c3e30)\n"
+ " (declare (in ) vec2 y@0x8c3f40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c4120)\n"
+ " (declare (in ) vec3 y@0x8c4230)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c4410)\n"
+ " (declare (in ) vec4 y@0x8c4520)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c4700)\n"
+ " (declare (in ) float y@0x8c4810)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c49f0)\n"
+ " (declare (in ) float y@0x8c4b00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c4ce0)\n"
+ " (declare (in ) float y@0x8c4df0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function max\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c4fd0)\n"
+ " (declare (in ) float y@0x8c50e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c5490)\n"
+ " (declare (in ) vec2 y@0x8c55a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c5780)\n"
+ " (declare (in ) vec3 y@0x8c5890)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c5a70)\n"
+ " (declare (in ) vec4 y@0x8c5b80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c5d60)\n"
+ " (declare (in ) float y@0x8c5e70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c6050)\n"
+ " (declare (in ) float y@0x8c6160)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c6340)\n"
+ " (declare (in ) float y@0x8c6450)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function clamp\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c6630)\n"
+ " (declare (in ) float minVal@0x8c6740)\n"
+ " (declare (in ) float maxVal@0x8c6850)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c6c00)\n"
+ " (declare (in ) vec2 minVal@0x8c6d10)\n"
+ " (declare (in ) vec2 maxVal@0x8c6e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c7000)\n"
+ " (declare (in ) vec3 minVal@0x8c7110)\n"
+ " (declare (in ) vec3 maxVal@0x8c7220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c7400)\n"
+ " (declare (in ) vec4 minVal@0x8c7510)\n"
+ " (declare (in ) vec4 maxVal@0x8c7620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c7800)\n"
+ " (declare (in ) float minVal@0x8c7910)\n"
+ " (declare (in ) float maxVal@0x8c7a20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c7c00)\n"
+ " (declare (in ) float minVal@0x8c7d10)\n"
+ " (declare (in ) float maxVal@0x8c7e20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c8000)\n"
+ " (declare (in ) float minVal@0x8c8110)\n"
+ " (declare (in ) float maxVal@0x8c8220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8c8400)\n"
+ " (declare (in ) float y@0x8c8510)\n"
+ " (declare (in ) float a@0x8c8620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c89d0)\n"
+ " (declare (in ) vec2 y@0x8c8ae0)\n"
+ " (declare (in ) vec2 a@0x8c8bf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c8dd0)\n"
+ " (declare (in ) vec3 y@0x8c8ee0)\n"
+ " (declare (in ) vec3 a@0x8c8ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c91d0)\n"
+ " (declare (in ) vec4 y@0x8c92e0)\n"
+ " (declare (in ) vec4 a@0x8c93f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8c95d0)\n"
+ " (declare (in ) vec2 y@0x8c96e0)\n"
+ " (declare (in ) float a@0x8c97f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8c99d0)\n"
+ " (declare (in ) vec3 y@0x8c9ae0)\n"
+ " (declare (in ) float a@0x8c9bf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8c9dd0)\n"
+ " (declare (in ) vec4 y@0x8c9ee0)\n"
+ " (declare (in ) float a@0x8c9ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function step\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x8ca1d0)\n"
+ " (declare (in ) float x@0x8ca2e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge@0x8ca690)\n"
+ " (declare (in ) vec2 x@0x8ca7a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge@0x8ca980)\n"
+ " (declare (in ) vec3 x@0x8caa90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge@0x8cac70)\n"
+ " (declare (in ) vec4 x@0x8cad80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x8caf60)\n"
+ " (declare (in ) vec2 x@0x8cb070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x8cb250)\n"
+ " (declare (in ) vec3 x@0x8cb360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge@0x8cb540)\n"
+ " (declare (in ) vec4 x@0x8cb650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function smoothstep\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x8cb830)\n"
+ " (declare (in ) float edge1@0x8cb940)\n"
+ " (declare (in ) float x@0x8cba50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 edge0@0x8cbe10)\n"
+ " (declare (in ) vec2 edge1@0x8cbf20)\n"
+ " (declare (in ) vec2 x@0x8cc030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 edge0@0x8cc210)\n"
+ " (declare (in ) vec3 edge1@0x8cc320)\n"
+ " (declare (in ) vec3 x@0x8cc430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 edge0@0x8cc610)\n"
+ " (declare (in ) vec4 edge1@0x8cc720)\n"
+ " (declare (in ) vec4 x@0x8cc830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x8cca10)\n"
+ " (declare (in ) float edge1@0x8ccb20)\n"
+ " (declare (in ) vec2 x@0x8ccc30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x8cce10)\n"
+ " (declare (in ) float edge1@0x8ccf20)\n"
+ " (declare (in ) vec3 x@0x8cd030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float edge0@0x8cd210)\n"
+ " (declare (in ) float edge1@0x8cd320)\n"
+ " (declare (in ) vec4 x@0x8cd430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function length\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8cd610)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8cd9c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8cdba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8cdd80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function distance\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p0@0x8cdf60)\n"
+ " (declare (in ) float p1@0x8ce070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p0@0x8ce430)\n"
+ " (declare (in ) vec2 p1@0x8ce540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p0@0x8ce720)\n"
+ " (declare (in ) vec3 p1@0x8ce830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p0@0x8cea10)\n"
+ " (declare (in ) vec4 p1@0x8ceb20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dot\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8ced00)\n"
+ " (declare (in ) float y@0x8cee10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8cf1c0)\n"
+ " (declare (in ) vec2 y@0x8cf2d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8cf4b0)\n"
+ " (declare (in ) vec3 y@0x8cf5c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8cf7a0)\n"
+ " (declare (in ) vec4 y@0x8cf8b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function cross\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8cfa90)\n"
+ " (declare (in ) vec3 y@0x8cfba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function normalize\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8cff50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8d0310)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8d04f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8d06d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function faceforward\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float N@0x8d08b0)\n"
+ " (declare (in ) float I@0x8d09c0)\n"
+ " (declare (in ) float Nref@0x8d0ad0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 N@0x8d0e90)\n"
+ " (declare (in ) vec2 I@0x8d0fa0)\n"
+ " (declare (in ) vec2 Nref@0x8d10b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 N@0x8d1290)\n"
+ " (declare (in ) vec3 I@0x8d13a0)\n"
+ " (declare (in ) vec3 Nref@0x8d14b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 N@0x8d1690)\n"
+ " (declare (in ) vec4 I@0x8d17a0)\n"
+ " (declare (in ) vec4 Nref@0x8d18b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function reflect\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x8d1a90)\n"
+ " (declare (in ) float N@0x8d1ba0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x8d1f60)\n"
+ " (declare (in ) vec2 N@0x8d2070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x8d2250)\n"
+ " (declare (in ) vec3 N@0x8d2360)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x8d2540)\n"
+ " (declare (in ) vec4 N@0x8d2650)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function refract\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float I@0x8d2830)\n"
+ " (declare (in ) float N@0x8d2940)\n"
+ " (declare (in ) float eta@0x8d2a50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 I@0x8d2e10)\n"
+ " (declare (in ) vec2 N@0x8d2f20)\n"
+ " (declare (in ) float eta@0x8d3030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 I@0x8d3210)\n"
+ " (declare (in ) vec3 N@0x8d3320)\n"
+ " (declare (in ) float eta@0x8d3430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 I@0x8d3610)\n"
+ " (declare (in ) vec4 N@0x8d3720)\n"
+ " (declare (in ) float eta@0x8d3830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function matrixCompMult\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 x@0x8d3a10)\n"
+ " (declare (in ) mat2 y@0x8d3b20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 x@0x8d3ee0)\n"
+ " (declare (in ) mat3 y@0x8d3ff0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 x@0x8d41d0)\n"
+ " (declare (in ) mat4 y@0x8d42e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) mat2x3 x@0x8d44c0)\n"
+ " (declare (in ) mat2x3 y@0x8d45d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) mat2x4 x@0x8d47b0)\n"
+ " (declare (in ) mat2x4 y@0x8d48c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) mat3x2 x@0x8d4aa0)\n"
+ " (declare (in ) mat3x2 y@0x8d4bb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) mat3x4 x@0x8d4d90)\n"
+ " (declare (in ) mat3x4 y@0x8d4ea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) mat4x2 x@0x8d5080)\n"
+ " (declare (in ) mat4x2 y@0x8d5190)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) mat4x3 x@0x8d5370)\n"
+ " (declare (in ) mat4x3 y@0x8d5480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function outerProduct\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x8d5660)\n"
+ " (declare (in ) vec2 r@0x8d5770)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x8d5b30)\n"
+ " (declare (in ) vec3 r@0x8d5c40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x8d5e20)\n"
+ " (declare (in ) vec4 r@0x8d5f30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x8d6110)\n"
+ " (declare (in ) vec2 r@0x8d6220)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x8d6400)\n"
+ " (declare (in ) vec3 r@0x8d6510)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x8d66f0)\n"
+ " (declare (in ) vec2 r@0x8d6800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 c@0x8d69e0)\n"
+ " (declare (in ) vec4 r@0x8d6af0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 c@0x8d6cd0)\n"
+ " (declare (in ) vec3 r@0x8d6de0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 c@0x8d6fc0)\n"
+ " (declare (in ) vec4 r@0x8d70d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function transpose\n"
+ " (signature mat2\n"
+ " (parameters\n"
+ " (declare (in ) mat2 m@0x8d72b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3\n"
+ " (parameters\n"
+ " (declare (in ) mat3 m@0x8d7670)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4\n"
+ " (parameters\n"
+ " (declare (in ) mat4 m@0x8d7850)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x3\n"
+ " (parameters\n"
+ " (declare (in ) mat3x2 m@0x8d7a30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x2\n"
+ " (parameters\n"
+ " (declare (in ) mat2x3 m@0x8d7c10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat2x4\n"
+ " (parameters\n"
+ " (declare (in ) mat4x2 m@0x8d7df0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x2\n"
+ " (parameters\n"
+ " (declare (in ) mat2x4 m@0x8d7fd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat3x4\n"
+ " (parameters\n"
+ " (declare (in ) mat4x3 m@0x8d81b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature mat4x3\n"
+ " (parameters\n"
+ " (declare (in ) mat3x4 m@0x8d8390)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8d8570)\n"
+ " (declare (in ) vec2 y@0x8d8680)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8d8a40)\n"
+ " (declare (in ) vec3 y@0x8d8b50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8d8d30)\n"
+ " (declare (in ) vec4 y@0x8d8e40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8d9020)\n"
+ " (declare (in ) ivec2 y@0x8d9130)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8d9310)\n"
+ " (declare (in ) ivec3 y@0x8d9420)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8d9600)\n"
+ " (declare (in ) ivec4 y@0x8d9710)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function lessThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8d98f0)\n"
+ " (declare (in ) vec2 y@0x8d9a00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8d9dc0)\n"
+ " (declare (in ) vec3 y@0x8d9ed0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8da0b0)\n"
+ " (declare (in ) vec4 y@0x8da1c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8da3a0)\n"
+ " (declare (in ) ivec2 y@0x8da4b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8da690)\n"
+ " (declare (in ) ivec3 y@0x8da7a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8da980)\n"
+ " (declare (in ) ivec4 y@0x8daa90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThan\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8dac70)\n"
+ " (declare (in ) vec2 y@0x8dad80)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8db140)\n"
+ " (declare (in ) vec3 y@0x8db250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8db430)\n"
+ " (declare (in ) vec4 y@0x8db540)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8db720)\n"
+ " (declare (in ) ivec2 y@0x8db830)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8dba10)\n"
+ " (declare (in ) ivec3 y@0x8dbb20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8dbd00)\n"
+ " (declare (in ) ivec4 y@0x8dbe10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function greaterThanEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8dbff0)\n"
+ " (declare (in ) vec2 y@0x8dc100)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8dc4c0)\n"
+ " (declare (in ) vec3 y@0x8dc5d0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8dc7b0)\n"
+ " (declare (in ) vec4 y@0x8dc8c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8dcaa0)\n"
+ " (declare (in ) ivec2 y@0x8dcbb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8dcd90)\n"
+ " (declare (in ) ivec3 y@0x8dcea0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8dd080)\n"
+ " (declare (in ) ivec4 y@0x8dd190)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function equal\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8dd370)\n"
+ " (declare (in ) vec2 y@0x8dd480)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8dd830)\n"
+ " (declare (in ) vec3 y@0x8dd940)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8ddb20)\n"
+ " (declare (in ) vec4 y@0x8ddc30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8dde10)\n"
+ " (declare (in ) ivec2 y@0x8ddf20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8de100)\n"
+ " (declare (in ) ivec3 y@0x8de210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8de3f0)\n"
+ " (declare (in ) ivec4 y@0x8de500)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x8de6e0)\n"
+ " (declare (in ) bvec2 y@0x8de7f0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x8de9d0)\n"
+ " (declare (in ) bvec3 y@0x8deae0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x8decc0)\n"
+ " (declare (in ) bvec4 y@0x8dedd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function notEqual\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8defb0)\n"
+ " (declare (in ) vec2 y@0x8df0c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8df480)\n"
+ " (declare (in ) vec3 y@0x8df590)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8df770)\n"
+ " (declare (in ) vec4 y@0x8df880)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) ivec2 x@0x8dfa60)\n"
+ " (declare (in ) ivec2 y@0x8dfb70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) ivec3 x@0x8dfd50)\n"
+ " (declare (in ) ivec3 y@0x8dfe60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) ivec4 x@0x8e0040)\n"
+ " (declare (in ) ivec4 y@0x8e0150)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x8e0330)\n"
+ " (declare (in ) bvec2 y@0x8e0440)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x8e0620)\n"
+ " (declare (in ) bvec3 y@0x8e0730)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x8e0910)\n"
+ " (declare (in ) bvec4 y@0x8e0a20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function any\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x8e0c00)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x8e0fb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x8e1190)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function all\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x8e1370)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x8e1720)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bool\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x8e1900)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function not\n"
+ " (signature bvec2\n"
+ " (parameters\n"
+ " (declare (in ) bvec2 x@0x8e1ae0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec3\n"
+ " (parameters\n"
+ " (declare (in ) bvec3 x@0x8e1e90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature bvec4\n"
+ " (parameters\n"
+ " (declare (in ) bvec4 x@0x8e2070)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e2250)\n"
+ " (declare (in ) float coord@0x8e2370)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e2f10)\n"
+ " (declare (in ) float coord@0x8e3030)\n"
+ " (declare (in ) float bias@0x8e3140)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e2730)\n"
+ " (declare (in ) vec2 coord@0x8e2850)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e2c10)\n"
+ " (declare (in ) vec4 coord@0x8e2d30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e3320)\n"
+ " (declare (in ) vec2 coord@0x8e3440)\n"
+ " (declare (in ) float bias@0x8e3550)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1D sampler@0x8e3730)\n"
+ " (declare (in ) vec4 coord@0x8e3850)\n"
+ " (declare (in ) float bias@0x8e3960)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e3b40)\n"
+ " (declare (in ) vec2 coord@0x8e3c60)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e4800)\n"
+ " (declare (in ) vec2 coord@0x8e4920)\n"
+ " (declare (in ) float bias@0x8e4a30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e4020)\n"
+ " (declare (in ) vec3 coord@0x8e4140)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e4500)\n"
+ " (declare (in ) vec4 coord@0x8e4620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e4c10)\n"
+ " (declare (in ) vec3 coord@0x8e4d30)\n"
+ " (declare (in ) float bias@0x8e4e40)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2D sampler@0x8e5020)\n"
+ " (declare (in ) vec4 coord@0x8e5140)\n"
+ " (declare (in ) float bias@0x8e5250)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x8e5430)\n"
+ " (declare (in ) vec3 coord@0x8e5550)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x8e5df0)\n"
+ " (declare (in ) vec3 coord@0x8e5f10)\n"
+ " (declare (in ) float bias@0x8e6020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x8e5910)\n"
+ " (declare (in ) vec4 coord@0x8e5a30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler3D sampler@0x8e6200)\n"
+ " (declare (in ) vec4 coord@0x8e6320)\n"
+ " (declare (in ) float bias@0x8e6430)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function textureCube\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x8e6610)\n"
+ " (declare (in ) vec3 coord@0x8e6730)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) samplerCube sampler@0x8e6af0)\n"
+ " (declare (in ) vec3 coord@0x8e6c10)\n"
+ " (declare (in ) float bias@0x8e6d20)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x8e6f00)\n"
+ " (declare (in ) vec3 coord@0x8e7020)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x8e8280)\n"
+ " (declare (in ) vec3 coord@0x8e83a0)\n"
+ " (declare (in ) float bias@0x8e84b0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x8e73e0)\n"
+ " (declare (in ) vec3 coord@0x8e7500)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x8e8690)\n"
+ " (declare (in ) vec3 coord@0x8e87b0)\n"
+ " (declare (in ) float bias@0x8e88c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow1DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x8e78c0)\n"
+ " (declare (in ) vec4 coord@0x8e79e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler1DShadow sampler@0x8e8aa0)\n"
+ " (declare (in ) vec4 coord@0x8e8bc0)\n"
+ " (declare (in ) float bias@0x8e8cd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function shadow2DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x8e7da0)\n"
+ " (declare (in ) vec4 coord@0x8e7ec0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) sampler2DShadow sampler@0x8e8eb0)\n"
+ " (declare (in ) vec4 coord@0x8e8fd0)\n"
+ " (declare (in ) float bias@0x8e90e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dFdx\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x8e92c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x8e9670)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x8e9850)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x8e9a30)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function dFdy\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x8e9c10)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x8e9fc0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x8ea1a0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x8ea380)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function fwidth\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float p@0x8ea560)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 p@0x8ea910)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 p@0x8eaaf0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 p@0x8eacd0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise1\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8eaeb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8eb260)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8eb440)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8eb620)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8eb800)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8ebbb0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8ebd90)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8ebf70)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise3\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8ec150)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8ec500)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8ec6e0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8ec8c0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "(function noise4\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) float x@0x8ecaa0)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec2 x@0x8ece50)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec3 x@0x8ed030)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in ) vec4 x@0x8ed210)\n"
+ " )\n"
+ " (\n"
+ " ))\n"
+ "\n"
+ ")\n"
+ "\n"
+ "\n"
+ ")"
+;
+static const char *functions_for_120_frag [] = {
+ builtin_clamp,
+ builtin_matrixCompMult,
+ builtin_noise2,
+ builtin_pow,
+ builtin_texture2DProj,
+ builtin_fwidth,
+ builtin_greaterThanEqual,
+ builtin_sign,
+ builtin_texture3DProj,
+ builtin_texture2D,
+ builtin_equal,
+ builtin_faceforward,
+ builtin_tan,
+ builtin_any,
+ builtin_shadow1DProj,
+ builtin_normalize,
+ builtin_asin,
+ builtin_texture1DProj,
+ builtin_log,
+ builtin_floor,
+ builtin_exp2,
+ builtin_lessThan,
+ builtin_cross,
+ builtin_sqrt,
+ builtin_shadow2DProj,
+ builtin_fract,
+ builtin_abs,
+ builtin_degrees,
+ builtin_dFdx,
+ builtin_sin,
+ builtin_shadow2D,
+ builtin_all,
+ builtin_log2,
+ builtin_atan,
+ builtin_notEqual,
+ builtin_max,
+ builtin_lessThanEqual,
+ builtin_transpose,
+ builtin_outerProduct,
+ builtin_ceil,
+ builtin_reflect,
+ builtin_step,
+ builtin_texture1D,
+ builtin_greaterThan,
+ builtin_texture3D,
+ builtin_not,
+ builtin_inversesqrt,
+ builtin_mod,
+ builtin_noise4,
+ builtin_distance,
+ builtin_cos,
+ builtin_shadow1D,
+ builtin_noise1,
+ builtin_refract,
+ builtin_noise3,
+ builtin_min,
+ builtin_radians,
+ builtin_smoothstep,
+ builtin_textureCube,
+ builtin_length,
+ builtin_dFdy,
+ builtin_exp,
+ builtin_acos,
+ builtin_mix,
+ builtin_dot,
};
void *builtin_mem_ctx = NULL;
@@ -4810,134 +14684,137 @@ _mesa_glsl_release_functions(void)
void
_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+ struct _mesa_glsl_parse_state *state)
{
if (builtin_mem_ctx == NULL)
builtin_mem_ctx = talloc_init("GLSL built-in functions");
state->num_builtins_to_link = 0;
- if (state->language_version >= 110) {
- static gl_shader *sh = NULL;
-
- if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_110,
- Elements(functions_for_110));
- talloc_steal(builtin_mem_ctx, sh);
- }
-
- import_prototypes(sh->ir, instructions, state->symbols, state);
- state->builtins_to_link[state->num_builtins_to_link] = sh;
- state->num_builtins_to_link++;
- }
- if (state->target == fragment_shader && state->language_version >= 110) {
+ if (state->target == vertex_shader && state->language_version == 120) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_110_fs,
- Elements(functions_for_110_fs));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_120_vert,
+ functions_for_120_vert,
+ Elements(functions_for_120_vert ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->target == vertex_shader && state->language_version >= 110) {
+ if (state->target == fragment_shader && state->EXT_texture_array_enable) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_110_vs,
- Elements(functions_for_110_vs));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_EXT_texture_array_frag,
+ functions_for_EXT_texture_array_frag,
+ Elements(functions_for_EXT_texture_array_frag ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->language_version >= 120) {
+ if (state->target == vertex_shader && state->language_version == 110) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_120,
- Elements(functions_for_120));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_110_vert,
+ functions_for_110_vert,
+ Elements(functions_for_110_vert ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->language_version >= 130) {
+ if (state->target == fragment_shader && state->language_version == 110) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_130,
- Elements(functions_for_130));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_110_frag,
+ functions_for_110_frag,
+ Elements(functions_for_110_frag ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->target == fragment_shader && state->language_version >= 130) {
+ if (state->target == vertex_shader && state->EXT_texture_array_enable) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_130_fs,
- Elements(functions_for_130_fs));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_EXT_texture_array_vert,
+ functions_for_EXT_texture_array_vert,
+ Elements(functions_for_EXT_texture_array_vert ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->ARB_texture_rectangle_enable) {
+ if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_ARB_texture_rectangle,
- Elements(functions_for_ARB_texture_rectangle));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_ARB_texture_rectangle_vert,
+ functions_for_ARB_texture_rectangle_vert,
+ Elements(functions_for_ARB_texture_rectangle_vert ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->EXT_texture_array_enable) {
+ if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_EXT_texture_array,
- Elements(functions_for_EXT_texture_array));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_ARB_texture_rectangle_frag,
+ functions_for_ARB_texture_rectangle_frag,
+ Elements(functions_for_ARB_texture_rectangle_frag ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
- if (state->target == fragment_shader && state->EXT_texture_array_enable) {
+ if (state->target == fragment_shader && state->language_version == 120) {
static gl_shader *sh = NULL;
-
if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, functions_for_EXT_texture_array_fs,
- Elements(functions_for_EXT_texture_array_fs));
- talloc_steal(builtin_mem_ctx, sh);
+ sh = read_builtins(GL_VERTEX_SHADER,
+ prototypes_for_120_frag,
+ functions_for_120_frag,
+ Elements(functions_for_120_frag ));
+ talloc_steal(builtin_mem_ctx, sh);
}
- import_prototypes(sh->ir, instructions, state->symbols, state);
+ import_prototypes(sh->ir, instructions, state->symbols,
+ state);
state->builtins_to_link[state->num_builtins_to_link] = sh;
state->num_builtins_to_link++;
}
diff --git a/src/glsl/builtins/110/clamp b/src/glsl/builtins/110/clamp
deleted file mode 100644
index d05cc76dc2..0000000000
--- a/src/glsl/builtins/110/clamp
+++ /dev/null
@@ -1,50 +0,0 @@
-((function clamp
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1)
- (declare (in) vec2 arg2))
- ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1)
- (declare (in) vec3 arg2))
- ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1)
- (declare (in) vec4 arg2))
- ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/110/matrixCompMult b/src/glsl/builtins/110/matrixCompMult
deleted file mode 100644
index cb5a2cb1f7..0000000000
--- a/src/glsl/builtins/110/matrixCompMult
+++ /dev/null
@@ -1,32 +0,0 @@
-((function matrixCompMult
- (signature mat2
- (parameters
- (declare (in) mat2 x)
- (declare (in) mat2 y))
- ((declare () mat2 z)
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
- (signature mat3
- (parameters
- (declare (in) mat3 x)
- (declare (in) mat3 y))
- ((declare () mat3 z)
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
- (signature mat4
- (parameters
- (declare (in) mat4 x)
- (declare (in) mat4 y))
- ((declare () mat4 z)
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-))
-
diff --git a/src/glsl/builtins/110/max b/src/glsl/builtins/110/max
deleted file mode 100644
index f91ae417e4..0000000000
--- a/src/glsl/builtins/110/max
+++ /dev/null
@@ -1,43 +0,0 @@
-((function max
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1))
- ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1))
- ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1))
- ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/110/min b/src/glsl/builtins/110/min
deleted file mode 100644
index 78fc44120a..0000000000
--- a/src/glsl/builtins/110/min
+++ /dev/null
@@ -1,43 +0,0 @@
-((function min
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1))
- ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1))
- ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1))
- ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/110/noise_fake b/src/glsl/builtins/110/noise_fake
deleted file mode 100644
index bcfb17b04b..0000000000
--- a/src/glsl/builtins/110/noise_fake
+++ /dev/null
@@ -1,76 +0,0 @@
-((function noise1
- (signature float
- (parameters
- (declare (in) float x))
- ((return (constant float (0)))))
- (signature float
- (parameters
- (declare (in) vec2 x))
- ((return (constant float (0)))))
- (signature float
- (parameters
- (declare (in) vec3 x))
- ((return (constant float (0)))))
- (signature float
- (parameters
- (declare (in) vec4 x))
- ((return (constant float (0)))))
- )
-
- (function noise2
- (signature vec2
- (parameters
- (declare (in) float x))
- ((return (constant vec2 (0 0)))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (constant vec2 (0 0)))))
- (signature vec2
- (parameters
- (declare (in) vec3 x))
- ((return (constant vec2 (0 0)))))
- (signature vec2
- (parameters
- (declare (in) vec4 x))
- ((return (constant vec2 (0 0)))))
- )
-
- (function noise3
- (signature vec3
- (parameters
- (declare (in) float x))
- ((return (constant vec3 (0 0 0)))))
- (signature vec3
- (parameters
- (declare (in) vec2 x))
- ((return (constant vec3 (0 0 0)))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (constant vec3 (0 0 0)))))
- (signature vec3
- (parameters
- (declare (in) vec4 x))
- ((return (constant vec3 (0 0 0)))))
- )
-
- (function noise4
- (signature vec4
- (parameters
- (declare (in) float x))
- ((return (constant vec4 (0 0 0 0)))))
- (signature vec4
- (parameters
- (declare (in) vec2 x))
- ((return (constant vec4 (0 0 0 0)))))
- (signature vec4
- (parameters
- (declare (in) vec3 x))
- ((return (constant vec4 (0 0 0 0)))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (constant vec4 (0 0 0 0)))))
- )
-)
diff --git a/src/glsl/builtins/110/sign b/src/glsl/builtins/110/sign
deleted file mode 100644
index fa475197cf..0000000000
--- a/src/glsl/builtins/110/sign
+++ /dev/null
@@ -1,21 +0,0 @@
-((function sign
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float sign (var_ref x)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 sign (var_ref x)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 sign (var_ref x)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 sign (var_ref x)))))
-))
diff --git a/src/glsl/builtins/110/textures b/src/glsl/builtins/110/textures
deleted file mode 100644
index c81b7e8ad4..0000000000
--- a/src/glsl/builtins/110/textures
+++ /dev/null
@@ -1,213 +0,0 @@
-((function texture1D
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function texture1DLod
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function texture1DProj
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
-)
- (function texture1DProjLod
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
-)
- (function texture2D
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
-(function texture2DLod
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function texture2DProj
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
-)
- (function texture2DProjLod
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
-)
- (function texture3D
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function texture3DLod
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function texture3DProj
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
-)
- (function texture3DProjLod
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
-)
- (function textureCube
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function textureCubeLod
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function shadow1D
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))
-
-)
- (function shadow1DLod
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))
-
-)
- (function shadow1DProj
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))
-
-)
- (function shadow1DProjLod
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))
-
-)
- (function shadow2D
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))
-
-)
- (function shadow2DLod
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))
-
-)
- (function shadow2DProj
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))
-
-)
- (function shadow2DProjLod
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))
-
-))
diff --git a/src/glsl/builtins/110_fs/derivatives b/src/glsl/builtins/110_fs/derivatives
deleted file mode 100644
index b79852ee1f..0000000000
--- a/src/glsl/builtins/110_fs/derivatives
+++ /dev/null
@@ -1,73 +0,0 @@
-((function dFdx
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float dFdx (var_ref p)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 dFdx (var_ref p)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 dFdx (var_ref p)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 dFdx (var_ref p)))))
- )
-
- (function dFdy
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float dFdy (var_ref p)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 dFdy (var_ref p)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 dFdy (var_ref p)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 dFdy (var_ref p)))))
- )
-
- (function fwidth
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float +
- (expression float abs (expression float dFdx (var_ref p)))
- (expression float abs (expression float dFdy (var_ref p)))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 +
- (expression vec2 abs (expression vec2 dFdx (var_ref p)))
- (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 +
- (expression vec3 abs (expression vec3 dFdx (var_ref p)))
- (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 +
- (expression vec4 abs (expression vec4 dFdx (var_ref p)))
- (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))
-))
diff --git a/src/glsl/builtins/110_fs/textures b/src/glsl/builtins/110_fs/textures
deleted file mode 100644
index 38f3787e9e..0000000000
--- a/src/glsl/builtins/110_fs/textures
+++ /dev/null
@@ -1,113 +0,0 @@
-((function texture1D
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function texture1DProj
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
-)
- (function texture2D
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function texture2DProj
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
-)
- (function texture3D
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function texture3DProj
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
-)
- (function textureCube
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function shadow1D
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))
-
-)
- (function shadow1DProj
- (signature vec4
- (parameters
- (declare (in) sampler1DShadow sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))
-
-)
- (function shadow2D
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))
-
-)
- (function shadow2DProj
- (signature vec4
- (parameters
- (declare (in) sampler2DShadow sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))
-
-))
diff --git a/src/glsl/builtins/130/equal b/src/glsl/builtins/130/equal
deleted file mode 100644
index 079c3e97fb..0000000000
--- a/src/glsl/builtins/130/equal
+++ /dev/null
@@ -1,31 +0,0 @@
-((function equal
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/greaterThan b/src/glsl/builtins/130/greaterThan
deleted file mode 100644
index a9fb7b3a43..0000000000
--- a/src/glsl/builtins/130/greaterThan
+++ /dev/null
@@ -1,31 +0,0 @@
-((function greaterThan
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/greaterThanEqual b/src/glsl/builtins/130/greaterThanEqual
deleted file mode 100644
index 293c93c7cc..0000000000
--- a/src/glsl/builtins/130/greaterThanEqual
+++ /dev/null
@@ -1,31 +0,0 @@
-((function greaterThanEqual
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/lessThan b/src/glsl/builtins/130/lessThan
deleted file mode 100644
index d9f693fd63..0000000000
--- a/src/glsl/builtins/130/lessThan
+++ /dev/null
@@ -1,31 +0,0 @@
-((function lessThan
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/lessThanEqual b/src/glsl/builtins/130/lessThanEqual
deleted file mode 100644
index 494411b869..0000000000
--- a/src/glsl/builtins/130/lessThanEqual
+++ /dev/null
@@ -1,31 +0,0 @@
-((function lessThanEqual
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/mix b/src/glsl/builtins/130/mix
deleted file mode 100644
index 9a1fcd70ff..0000000000
--- a/src/glsl/builtins/130/mix
+++ /dev/null
@@ -1,39 +0,0 @@
-((function mix
- (signature float
- (parameters
- (declare (in) float v1)
- (declare (in) float v2)
- (declare (in) bool a))
- ((assign (var_ref a) (var_ref v1) (var_ref v2))
- (return (var_ref v1))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 v1)
- (declare (in) vec2 v2)
- (declare (in) bvec2 a))
- ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
- (return (var_ref v1))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 v1)
- (declare (in) vec3 v2)
- (declare (in) bvec3 a))
- ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
- (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
- (return (var_ref v1))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 v1)
- (declare (in) vec4 v2)
- (declare (in) bvec4 a))
- ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
- (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
- (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))
- (return (var_ref v1))))
-))
diff --git a/src/glsl/builtins/130/notEqual b/src/glsl/builtins/130/notEqual
deleted file mode 100644
index 81e6376bd9..0000000000
--- a/src/glsl/builtins/130/notEqual
+++ /dev/null
@@ -1,31 +0,0 @@
-((function notEqual
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((declare () bvec2 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((declare () bvec3 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (return (var_ref temp))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((declare () bvec4 temp)
- (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
- (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
- (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
- (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
- (return (var_ref temp))))
-))
diff --git a/src/glsl/builtins/130/texelFetch b/src/glsl/builtins/130/texelFetch
deleted file mode 100644
index d51ce65a89..0000000000
--- a/src/glsl/builtins/130/texelFetch
+++ /dev/null
@@ -1,107 +0,0 @@
-((function texelFetch
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) int P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) int P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) int P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1DArray sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1DArray sampler)
- (declare (in) ivec2 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2DArray sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2DArray sampler)
- (declare (in) ivec3 P)
- (declare (in) int lod) )
- ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))
-
-))
diff --git a/src/glsl/builtins/130/texture b/src/glsl/builtins/130/texture
deleted file mode 100644
index b170b58309..0000000000
--- a/src/glsl/builtins/130/texture
+++ /dev/null
@@ -1,110 +0,0 @@
-((function texture
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) float P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) float P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isamplerCube sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usamplerCube sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1DArray sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1DArray sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2DArray sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2DArray sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-))
diff --git a/src/glsl/builtins/130/textureGrad b/src/glsl/builtins/130/textureGrad
deleted file mode 100644
index 0ef428c224..0000000000
--- a/src/glsl/builtins/130/textureGrad
+++ /dev/null
@@ -1,147 +0,0 @@
-((function textureGrad
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) float P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) float P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))
-
-)
-)
diff --git a/src/glsl/builtins/130/textureLod b/src/glsl/builtins/130/textureLod
deleted file mode 100644
index 7d7059d848..0000000000
--- a/src/glsl/builtins/130/textureLod
+++ /dev/null
@@ -1,128 +0,0 @@
-((function textureLod
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) float P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) float P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-))
diff --git a/src/glsl/builtins/130/textureProj b/src/glsl/builtins/130/textureProj
deleted file mode 100644
index 40ea1c2af6..0000000000
--- a/src/glsl/builtins/130/textureProj
+++ /dev/null
@@ -1,92 +0,0 @@
-((function textureProj
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))
-
-))
diff --git a/src/glsl/builtins/130/textureProjGrad b/src/glsl/builtins/130/textureProjGrad
deleted file mode 100644
index b4bfa58c12..0000000000
--- a/src/glsl/builtins/130/textureProjGrad
+++ /dev/null
@@ -1,122 +0,0 @@
-((function textureProjGrad
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float dPdx)
- (declare (in) float dPdy) )
- ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) vec2 dPdx)
- (declare (in) vec2 dPdy) )
- ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) vec3 dPdx)
- (declare (in) vec3 dPdy) )
- ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))
-
-))
diff --git a/src/glsl/builtins/130/textureProjLod b/src/glsl/builtins/130/textureProjLod
deleted file mode 100644
index d242f7e40f..0000000000
--- a/src/glsl/builtins/130/textureProjLod
+++ /dev/null
@@ -1,107 +0,0 @@
-((function textureProjLod
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))
-
-))
diff --git a/src/glsl/builtins/130_fs/texture b/src/glsl/builtins/130_fs/texture
deleted file mode 100644
index 0de981397f..0000000000
--- a/src/glsl/builtins/130_fs/texture
+++ /dev/null
@@ -1,128 +0,0 @@
-((function texture
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) float P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) float P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) float P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) samplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usamplerCube sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-))
diff --git a/src/glsl/builtins/130_fs/textureProj b/src/glsl/builtins/130_fs/textureProj
deleted file mode 100644
index b1d8f0a2f3..0000000000
--- a/src/glsl/builtins/130_fs/textureProj
+++ /dev/null
@@ -1,107 +0,0 @@
-((function textureProj
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler1D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler2D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature vec4
- (parameters
- (declare (in) sampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature ivec4
- (parameters
- (declare (in) isampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
- (signature uvec4
- (parameters
- (declare (in) usampler3D sampler)
- (declare (in) vec4 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))
-
-))
diff --git a/src/glsl/builtins/ARB_texture_rectangle/textures b/src/glsl/builtins/ARB_texture_rectangle/textures
deleted file mode 100644
index 161d8c4a54..0000000000
--- a/src/glsl/builtins/ARB_texture_rectangle/textures
+++ /dev/null
@@ -1,16 +0,0 @@
-((function texture2DRect
- (signature vec4
- (parameters
- (declare (in) sampler2DRect sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function shadow2DRect
- (signature vec4
- (parameters
- (declare (in) sampler2DRectShadow sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))
-
-))
diff --git a/src/glsl/builtins/EXT_texture_array/textures b/src/glsl/builtins/EXT_texture_array/textures
deleted file mode 100644
index 8a91f90140..0000000000
--- a/src/glsl/builtins/EXT_texture_array/textures
+++ /dev/null
@@ -1,59 +0,0 @@
-((function texture1DArray
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function texture1DArrayLod
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function texture2DArray
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))
-
-)
- (function texture2DArrayLod
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))
-
-)
- (function shadow1DArray
- (signature vec4
- (parameters
- (declare (in) sampler1DArrayShadow sampler)
- (declare (in) vec3 P) )
- ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))
-
-)
- (function shadow1DArrayLod
- (signature vec4
- (parameters
- (declare (in) sampler1DArrayShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float lod) )
- ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))
-
-)
- (function shadow2DArray
- (signature vec4
- (parameters
- (declare (in) sampler2DArrayShadow sampler)
- (declare (in) vec4 P) )
- ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) 1 (swiz w (var_ref P)) ))))
-
-))
diff --git a/src/glsl/builtins/EXT_texture_array_fs/textures b/src/glsl/builtins/EXT_texture_array_fs/textures
deleted file mode 100644
index 74e184387a..0000000000
--- a/src/glsl/builtins/EXT_texture_array_fs/textures
+++ /dev/null
@@ -1,27 +0,0 @@
-((function texture1DArray
- (signature vec4
- (parameters
- (declare (in) sampler1DArray sampler)
- (declare (in) vec2 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function texture2DArray
- (signature vec4
- (parameters
- (declare (in) sampler2DArray sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))
-
-)
- (function shadow1DArray
- (signature vec4
- (parameters
- (declare (in) sampler1DArrayShadow sampler)
- (declare (in) vec3 P)
- (declare (in) float bias) )
- ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))
-
-))
diff --git a/src/glsl/builtins/110/abs b/src/glsl/builtins/ir/abs
index 904845307c..904845307c 100644
--- a/src/glsl/builtins/110/abs
+++ b/src/glsl/builtins/ir/abs
diff --git a/src/glsl/builtins/ir/acos b/src/glsl/builtins/ir/acos
new file mode 100644
index 0000000000..d1cfebeff8
--- /dev/null
+++ b/src/glsl/builtins/ir/acos
@@ -0,0 +1,22 @@
+((function acos
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+))
diff --git a/src/glsl/builtins/110/all b/src/glsl/builtins/ir/all
index 2cac0dfb68..2cac0dfb68 100644
--- a/src/glsl/builtins/110/all
+++ b/src/glsl/builtins/ir/all
diff --git a/src/glsl/builtins/110/any b/src/glsl/builtins/ir/any
index f10e8a7b47..f10e8a7b47 100644
--- a/src/glsl/builtins/110/any
+++ b/src/glsl/builtins/ir/any
diff --git a/src/glsl/builtins/110/asin b/src/glsl/builtins/ir/asin
index d26bde364b..e230ad614e 100644
--- a/src/glsl/builtins/110/asin
+++ b/src/glsl/builtins/ir/asin
@@ -93,28 +93,5 @@
(constant float (-0.2121144))
(expression vec4 *
(constant float (0.0742610))
- (expression vec4 abs (var_ref x)))))))))))
-))
-
- (function acos
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
+ (expression vec4 abs (var_ref x))))))))))))
))
diff --git a/src/glsl/builtins/110/atan b/src/glsl/builtins/ir/atan
index 8404829387..8404829387 100644
--- a/src/glsl/builtins/110/atan
+++ b/src/glsl/builtins/ir/atan
diff --git a/src/glsl/builtins/110/ceil b/src/glsl/builtins/ir/ceil
index a26a775049..a26a775049 100644
--- a/src/glsl/builtins/110/ceil
+++ b/src/glsl/builtins/ir/ceil
diff --git a/src/glsl/builtins/130/clamp b/src/glsl/builtins/ir/clamp
index e1aad5c8d9..2bdc466b26 100644
--- a/src/glsl/builtins/130/clamp
+++ b/src/glsl/builtins/ir/clamp
@@ -1,4 +1,53 @@
((function clamp
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1)
+ (declare (in) vec2 arg2))
+ ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1)
+ (declare (in) vec3 arg2))
+ ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1)
+ (declare (in) vec4 arg2))
+ ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
(signature int
(parameters
(declare (in) int arg0)
diff --git a/src/glsl/builtins/110/cos b/src/glsl/builtins/ir/cos
index 88f266eccb..88f266eccb 100644
--- a/src/glsl/builtins/110/cos
+++ b/src/glsl/builtins/ir/cos
diff --git a/src/glsl/builtins/130/cosh b/src/glsl/builtins/ir/cosh
index 45e0ae427d..45e0ae427d 100644
--- a/src/glsl/builtins/130/cosh
+++ b/src/glsl/builtins/ir/cosh
diff --git a/src/glsl/builtins/110/cross b/src/glsl/builtins/ir/cross
index 24717a2183..24717a2183 100644
--- a/src/glsl/builtins/110/cross
+++ b/src/glsl/builtins/ir/cross
diff --git a/src/glsl/builtins/ir/dFdx b/src/glsl/builtins/ir/dFdx
new file mode 100644
index 0000000000..30594d33c7
--- /dev/null
+++ b/src/glsl/builtins/ir/dFdx
@@ -0,0 +1,21 @@
+((function dFdx
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float dFdx (var_ref p)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 dFdx (var_ref p)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 dFdx (var_ref p)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 dFdx (var_ref p)))))
+))
diff --git a/src/glsl/builtins/ir/dFdy b/src/glsl/builtins/ir/dFdy
new file mode 100644
index 0000000000..fb5798d3cb
--- /dev/null
+++ b/src/glsl/builtins/ir/dFdy
@@ -0,0 +1,21 @@
+((function dFdy
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float dFdy (var_ref p)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 dFdy (var_ref p)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 dFdy (var_ref p)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 dFdy (var_ref p)))))
+))
diff --git a/src/glsl/builtins/110/degrees b/src/glsl/builtins/ir/degrees
index dc0d7b9e20..dc0d7b9e20 100644
--- a/src/glsl/builtins/110/degrees
+++ b/src/glsl/builtins/ir/degrees
diff --git a/src/glsl/builtins/110/distance b/src/glsl/builtins/ir/distance
index a2309c484f..a2309c484f 100644
--- a/src/glsl/builtins/110/distance
+++ b/src/glsl/builtins/ir/distance
diff --git a/src/glsl/builtins/110/dot b/src/glsl/builtins/ir/dot
index a91a6d2c56..a91a6d2c56 100644
--- a/src/glsl/builtins/110/dot
+++ b/src/glsl/builtins/ir/dot
diff --git a/src/glsl/builtins/110/equal b/src/glsl/builtins/ir/equal
index ae7ddc53bd..d7a4bc6063 100644
--- a/src/glsl/builtins/110/equal
+++ b/src/glsl/builtins/ir/equal
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/110/exp b/src/glsl/builtins/ir/exp
index a73bd6a7f8..a73bd6a7f8 100644
--- a/src/glsl/builtins/110/exp
+++ b/src/glsl/builtins/ir/exp
diff --git a/src/glsl/builtins/110/exp2 b/src/glsl/builtins/ir/exp2
index a842d3fe65..a842d3fe65 100644
--- a/src/glsl/builtins/110/exp2
+++ b/src/glsl/builtins/ir/exp2
diff --git a/src/glsl/builtins/110/faceforward b/src/glsl/builtins/ir/faceforward
index d170397238..d170397238 100644
--- a/src/glsl/builtins/110/faceforward
+++ b/src/glsl/builtins/ir/faceforward
diff --git a/src/glsl/builtins/110/floor b/src/glsl/builtins/ir/floor
index 8dd8052799..8dd8052799 100644
--- a/src/glsl/builtins/110/floor
+++ b/src/glsl/builtins/ir/floor
diff --git a/src/glsl/builtins/110/fract b/src/glsl/builtins/ir/fract
index 3f0763d1b3..3f0763d1b3 100644
--- a/src/glsl/builtins/110/fract
+++ b/src/glsl/builtins/ir/fract
diff --git a/src/glsl/builtins/110_vs/ftransform b/src/glsl/builtins/ir/ftransform
index 9ca63dc1e3..9ca63dc1e3 100644
--- a/src/glsl/builtins/110_vs/ftransform
+++ b/src/glsl/builtins/ir/ftransform
diff --git a/src/glsl/builtins/ir/fwidth b/src/glsl/builtins/ir/fwidth
new file mode 100644
index 0000000000..385e05d6a1
--- /dev/null
+++ b/src/glsl/builtins/ir/fwidth
@@ -0,0 +1,29 @@
+((function fwidth
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float +
+ (expression float abs (expression float dFdx (var_ref p)))
+ (expression float abs (expression float dFdy (var_ref p)))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 +
+ (expression vec2 abs (expression vec2 dFdx (var_ref p)))
+ (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 +
+ (expression vec3 abs (expression vec3 dFdx (var_ref p)))
+ (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 +
+ (expression vec4 abs (expression vec4 dFdx (var_ref p)))
+ (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))
+))
diff --git a/src/glsl/builtins/110/greaterThan b/src/glsl/builtins/ir/greaterThan
index ae03030e49..ce7bd29bed 100644
--- a/src/glsl/builtins/110/greaterThan
+++ b/src/glsl/builtins/ir/greaterThan
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/110/greaterThanEqual b/src/glsl/builtins/ir/greaterThanEqual
index 204d5fd143..de1a9f9516 100644
--- a/src/glsl/builtins/110/greaterThanEqual
+++ b/src/glsl/builtins/ir/greaterThanEqual
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/110/inversesqrt b/src/glsl/builtins/ir/inversesqrt
index 5b66d2b369..5b66d2b369 100644
--- a/src/glsl/builtins/110/inversesqrt
+++ b/src/glsl/builtins/ir/inversesqrt
diff --git a/src/glsl/builtins/110/length b/src/glsl/builtins/ir/length
index 89ff7f3ef1..89ff7f3ef1 100644
--- a/src/glsl/builtins/110/length
+++ b/src/glsl/builtins/ir/length
diff --git a/src/glsl/builtins/110/lessThan b/src/glsl/builtins/ir/lessThan
index 5c4254165c..52113b7046 100644
--- a/src/glsl/builtins/110/lessThan
+++ b/src/glsl/builtins/ir/lessThan
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/110/lessThanEqual b/src/glsl/builtins/ir/lessThanEqual
index ccb955b8a7..4b240be5d1 100644
--- a/src/glsl/builtins/110/lessThanEqual
+++ b/src/glsl/builtins/ir/lessThanEqual
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/110/log b/src/glsl/builtins/ir/log
index d168abb5a7..d168abb5a7 100644
--- a/src/glsl/builtins/110/log
+++ b/src/glsl/builtins/ir/log
diff --git a/src/glsl/builtins/110/log2 b/src/glsl/builtins/ir/log2
index b96c6276f0..b96c6276f0 100644
--- a/src/glsl/builtins/110/log2
+++ b/src/glsl/builtins/ir/log2
diff --git a/src/glsl/builtins/120/matrixCompMult b/src/glsl/builtins/ir/matrixCompMult
index 69331e2652..538da18a79 100644
--- a/src/glsl/builtins/120/matrixCompMult
+++ b/src/glsl/builtins/ir/matrixCompMult
@@ -1,4 +1,34 @@
((function matrixCompMult
+ (signature mat2
+ (parameters
+ (declare (in) mat2 x)
+ (declare (in) mat2 y))
+ ((declare () mat2 z)
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+(return (var_ref z))))
+
+ (signature mat3
+ (parameters
+ (declare (in) mat3 x)
+ (declare (in) mat3 y))
+ ((declare () mat3 z)
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+(return (var_ref z))))
+
+ (signature mat4
+ (parameters
+ (declare (in) mat4 x)
+ (declare (in) mat4 y))
+ ((declare () mat4 z)
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (constant bool (1)) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+(return (var_ref z))))
+
(signature mat2x3
(parameters
(declare (in) mat2x3 x)
diff --git a/src/glsl/builtins/130/max b/src/glsl/builtins/ir/max
index 0863e411a3..2b5a02868c 100644
--- a/src/glsl/builtins/130/max
+++ b/src/glsl/builtins/ir/max
@@ -1,4 +1,46 @@
((function max
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
+
(signature int
(parameters
(declare (in) int arg0)
diff --git a/src/glsl/builtins/130/min b/src/glsl/builtins/ir/min
index 576546f6f2..2deef1118a 100644
--- a/src/glsl/builtins/130/min
+++ b/src/glsl/builtins/ir/min
@@ -1,4 +1,46 @@
((function min
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
+
(signature int
(parameters
(declare (in) int arg0)
diff --git a/src/glsl/builtins/110/mix b/src/glsl/builtins/ir/mix
index 8638d06887..6bc6f0a43e 100644
--- a/src/glsl/builtins/110/mix
+++ b/src/glsl/builtins/ir/mix
@@ -47,4 +47,42 @@
(declare (in) vec4 arg1)
(declare (in) float arg2))
((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature float
+ (parameters
+ (declare (in) float v1)
+ (declare (in) float v2)
+ (declare (in) bool a))
+ ((assign (var_ref a) (var_ref v1) (var_ref v2))
+ (return (var_ref v1))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 v1)
+ (declare (in) vec2 v2)
+ (declare (in) bvec2 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 v1)
+ (declare (in) vec3 v2)
+ (declare (in) bvec3 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 v1)
+ (declare (in) vec4 v2)
+ (declare (in) bvec4 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
+ (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))
+ (return (var_ref v1))))
))
diff --git a/src/glsl/builtins/110/mod b/src/glsl/builtins/ir/mod
index aeaea240e2..aeaea240e2 100644
--- a/src/glsl/builtins/110/mod
+++ b/src/glsl/builtins/ir/mod
diff --git a/src/glsl/builtins/ir/noise1 b/src/glsl/builtins/ir/noise1
new file mode 100644
index 0000000000..eb7be35857
--- /dev/null
+++ b/src/glsl/builtins/ir/noise1
@@ -0,0 +1,18 @@
+((function noise1
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant float (0)))))
+))
diff --git a/src/glsl/builtins/ir/noise2 b/src/glsl/builtins/ir/noise2
new file mode 100644
index 0000000000..ae4443a704
--- /dev/null
+++ b/src/glsl/builtins/ir/noise2
@@ -0,0 +1,18 @@
+((function noise2
+ (signature vec2
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec2 (0 0)))))
+))
diff --git a/src/glsl/builtins/ir/noise3 b/src/glsl/builtins/ir/noise3
new file mode 100644
index 0000000000..30d9681890
--- /dev/null
+++ b/src/glsl/builtins/ir/noise3
@@ -0,0 +1,18 @@
+((function noise3
+ (signature vec3
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec3 (0 0 0)))))
+))
diff --git a/src/glsl/builtins/ir/noise4 b/src/glsl/builtins/ir/noise4
new file mode 100644
index 0000000000..913bef2aa1
--- /dev/null
+++ b/src/glsl/builtins/ir/noise4
@@ -0,0 +1,18 @@
+((function noise4
+ (signature vec4
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec4 (0 0 0 0)))))
+))
diff --git a/src/glsl/builtins/110/normalize b/src/glsl/builtins/ir/normalize
index be88a9830d..be88a9830d 100644
--- a/src/glsl/builtins/110/normalize
+++ b/src/glsl/builtins/ir/normalize
diff --git a/src/glsl/builtins/110/not b/src/glsl/builtins/ir/not
index b696b06557..b696b06557 100644
--- a/src/glsl/builtins/110/not
+++ b/src/glsl/builtins/ir/not
diff --git a/src/glsl/builtins/110/notEqual b/src/glsl/builtins/ir/notEqual
index ccdcaa3aaf..bcc7339bb6 100644
--- a/src/glsl/builtins/110/notEqual
+++ b/src/glsl/builtins/ir/notEqual
@@ -58,4 +58,34 @@
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((declare () bvec2 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((declare () bvec3 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (return (var_ref temp))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((declare () bvec4 temp)
+ (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
+ (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
+ (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
+ (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
+ (return (var_ref temp))))
))
diff --git a/src/glsl/builtins/120/outerProduct b/src/glsl/builtins/ir/outerProduct
index 69ae741e17..69ae741e17 100644
--- a/src/glsl/builtins/120/outerProduct
+++ b/src/glsl/builtins/ir/outerProduct
diff --git a/src/glsl/builtins/110/pow b/src/glsl/builtins/ir/pow
index a61bc4418e..a61bc4418e 100644
--- a/src/glsl/builtins/110/pow
+++ b/src/glsl/builtins/ir/pow
diff --git a/src/glsl/builtins/110/radians b/src/glsl/builtins/ir/radians
index 6a0f5d2e21..6a0f5d2e21 100644
--- a/src/glsl/builtins/110/radians
+++ b/src/glsl/builtins/ir/radians
diff --git a/src/glsl/builtins/110/reflect b/src/glsl/builtins/ir/reflect
index 8238fdc93f..8238fdc93f 100644
--- a/src/glsl/builtins/110/reflect
+++ b/src/glsl/builtins/ir/reflect
diff --git a/src/glsl/builtins/110/refract b/src/glsl/builtins/ir/refract
index 522ab41173..522ab41173 100644
--- a/src/glsl/builtins/110/refract
+++ b/src/glsl/builtins/ir/refract
diff --git a/src/glsl/builtins/130/sign b/src/glsl/builtins/ir/sign
index f86062a244..1f51718dab 100644
--- a/src/glsl/builtins/130/sign
+++ b/src/glsl/builtins/ir/sign
@@ -1,4 +1,24 @@
((function sign
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float sign (var_ref x)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 sign (var_ref x)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 sign (var_ref x)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 sign (var_ref x)))))
+
(signature int
(parameters
(declare (in) int x))
diff --git a/src/glsl/builtins/110/sin b/src/glsl/builtins/ir/sin
index e6009d8ef1..e6009d8ef1 100644
--- a/src/glsl/builtins/110/sin
+++ b/src/glsl/builtins/ir/sin
diff --git a/src/glsl/builtins/130/sinh b/src/glsl/builtins/ir/sinh
index 7ad4f58e20..7ad4f58e20 100644
--- a/src/glsl/builtins/130/sinh
+++ b/src/glsl/builtins/ir/sinh
diff --git a/src/glsl/builtins/110/smoothstep b/src/glsl/builtins/ir/smoothstep
index 663eec6341..663eec6341 100644
--- a/src/glsl/builtins/110/smoothstep
+++ b/src/glsl/builtins/ir/smoothstep
diff --git a/src/glsl/builtins/110/sqrt b/src/glsl/builtins/ir/sqrt
index 0302d164ae..0302d164ae 100644
--- a/src/glsl/builtins/110/sqrt
+++ b/src/glsl/builtins/ir/sqrt
diff --git a/src/glsl/builtins/110/step b/src/glsl/builtins/ir/step
index ce6f435422..ce6f435422 100644
--- a/src/glsl/builtins/110/step
+++ b/src/glsl/builtins/ir/step
diff --git a/src/glsl/builtins/110/tan b/src/glsl/builtins/ir/tan
index 9979863185..9979863185 100644
--- a/src/glsl/builtins/110/tan
+++ b/src/glsl/builtins/ir/tan
diff --git a/src/glsl/builtins/130/tanh b/src/glsl/builtins/ir/tanh
index 3b7271bf77..3b7271bf77 100644
--- a/src/glsl/builtins/130/tanh
+++ b/src/glsl/builtins/ir/tanh
diff --git a/src/glsl/builtins/120/transpose b/src/glsl/builtins/ir/transpose
index 416a0ee467..416a0ee467 100644
--- a/src/glsl/builtins/120/transpose
+++ b/src/glsl/builtins/ir/transpose
diff --git a/src/glsl/builtins/profiles/110.frag b/src/glsl/builtins/profiles/110.frag
new file mode 100644
index 0000000000..25bc62c093
--- /dev/null
+++ b/src/glsl/builtins/profiles/110.frag
@@ -0,0 +1,364 @@
+#version 110
+/*
+ * 8.1 - Angle and Trigonometry Functions
+ */
+float radians(float degrees);
+vec2 radians(vec2 degrees);
+vec3 radians(vec3 degrees);
+vec4 radians(vec4 degrees);
+
+float degrees(float radians);
+vec2 degrees(vec2 radians);
+vec3 degrees(vec3 radians);
+vec4 degrees(vec4 radians);
+
+float sin(float angle);
+vec2 sin(vec2 angle);
+vec3 sin(vec3 angle);
+vec4 sin(vec4 angle);
+
+float cos(float angle);
+vec2 cos(vec2 angle);
+vec3 cos(vec3 angle);
+vec4 cos(vec4 angle);
+
+float tan(float angle);
+vec2 tan(vec2 angle);
+vec3 tan(vec3 angle);
+vec4 tan(vec4 angle);
+
+float asin(float angle);
+vec2 asin(vec2 angle);
+vec3 asin(vec3 angle);
+vec4 asin(vec4 angle);
+
+float acos(float angle);
+vec2 acos(vec2 angle);
+vec3 acos(vec3 angle);
+vec4 acos(vec4 angle);
+
+float atan(float y, float x);
+vec2 atan(vec2 y, vec2 x);
+vec3 atan(vec3 y, vec3 x);
+vec4 atan(vec4 y, vec4 x);
+
+float atan(float y_over_x);
+vec2 atan(vec2 y_over_x);
+vec3 atan(vec3 y_over_x);
+vec4 atan(vec4 y_over_x);
+
+/*
+ * 8.2 - Exponential Functions
+ */
+float pow(float x, float y);
+vec2 pow(vec2 x, vec2 y);
+vec3 pow(vec3 x, vec3 y);
+vec4 pow(vec4 x, vec4 y);
+
+float exp(float x);
+vec2 exp(vec2 x);
+vec3 exp(vec3 x);
+vec4 exp(vec4 x);
+
+float log(float x);
+vec2 log(vec2 x);
+vec3 log(vec3 x);
+vec4 log(vec4 x);
+
+float exp2(float x);
+vec2 exp2(vec2 x);
+vec3 exp2(vec3 x);
+vec4 exp2(vec4 x);
+
+float log2(float x);
+vec2 log2(vec2 x);
+vec3 log2(vec3 x);
+vec4 log2(vec4 x);
+
+float sqrt(float x);
+vec2 sqrt(vec2 x);
+vec3 sqrt(vec3 x);
+vec4 sqrt(vec4 x);
+
+float inversesqrt(float x);
+vec2 inversesqrt(vec2 x);
+vec3 inversesqrt(vec3 x);
+vec4 inversesqrt(vec4 x);
+
+/*
+ * 8.3 - Common Functions
+ */
+float abs(float x);
+vec2 abs(vec2 x);
+vec3 abs(vec3 x);
+vec4 abs(vec4 x);
+
+float sign(float x);
+vec2 sign(vec2 x);
+vec3 sign(vec3 x);
+vec4 sign(vec4 x);
+
+float floor(float x);
+vec2 floor(vec2 x);
+vec3 floor(vec3 x);
+vec4 floor(vec4 x);
+
+float ceil(float x);
+vec2 ceil(vec2 x);
+vec3 ceil(vec3 x);
+vec4 ceil(vec4 x);
+
+float fract(float x);
+vec2 fract(vec2 x);
+vec3 fract(vec3 x);
+vec4 fract(vec4 x);
+
+float mod(float x, float y);
+vec2 mod(vec2 x, float y);
+vec3 mod(vec3 x, float y);
+vec4 mod(vec4 x, float y);
+
+vec2 mod(vec2 x, vec2 y);
+vec3 mod(vec3 x, vec3 y);
+vec4 mod(vec4 x, vec4 y);
+
+float min(float x, float y);
+vec2 min(vec2 x, vec2 y);
+vec3 min(vec3 x, vec3 y);
+vec4 min(vec4 x, vec4 y);
+
+vec2 min(vec2 x, float y);
+vec3 min(vec3 x, float y);
+vec4 min(vec4 x, float y);
+
+float max(float x, float y);
+vec2 max(vec2 x, vec2 y);
+vec3 max(vec3 x, vec3 y);
+vec4 max(vec4 x, vec4 y);
+
+vec2 max(vec2 x, float y);
+vec3 max(vec3 x, float y);
+vec4 max(vec4 x, float y);
+
+float clamp(float x, float minVal, float maxVal);
+vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
+vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
+vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
+
+vec2 clamp(vec2 x, float minVal, float maxVal);
+vec3 clamp(vec3 x, float minVal, float maxVal);
+vec4 clamp(vec4 x, float minVal, float maxVal);
+
+float mix(float x, float y, float a);
+vec2 mix(vec2 x, vec2 y, vec2 a);
+vec3 mix(vec3 x, vec3 y, vec3 a);
+vec4 mix(vec4 x, vec4 y, vec4 a);
+
+vec2 mix(vec2 x, vec2 y, float a);
+vec3 mix(vec3 x, vec3 y, float a);
+vec4 mix(vec4 x, vec4 y, float a);
+
+float step(float edge, float x);
+vec2 step(vec2 edge, vec2 x);
+vec3 step(vec3 edge, vec3 x);
+vec4 step(vec4 edge, vec4 x);
+
+vec2 step(float edge, vec2 x);
+vec3 step(float edge, vec3 x);
+vec4 step(float edge, vec4 x);
+
+float smoothstep(float edge0, float edge1, float x);
+vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
+vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
+vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
+
+vec2 smoothstep(float edge0, float edge1, vec2 x);
+vec3 smoothstep(float edge0, float edge1, vec3 x);
+vec4 smoothstep(float edge0, float edge1, vec4 x);
+
+/*
+ * 8.4 - Geometric Functions
+ */
+float length(float x);
+float length(vec2 x);
+float length(vec3 x);
+float length(vec4 x);
+
+float distance(float p0, float p1);
+float distance(vec2 p0, vec2 p1);
+float distance(vec3 p0, vec3 p1);
+float distance(vec4 p0, vec4 p1);
+
+float dot(float x, float y);
+float dot(vec2 x, vec2 y);
+float dot(vec3 x, vec3 y);
+float dot(vec4 x, vec4 y);
+
+vec3 cross(vec3 x, vec3 y);
+
+float normalize(float x);
+vec2 normalize(vec2 x);
+vec3 normalize(vec3 x);
+vec4 normalize(vec4 x);
+
+float faceforward(float N, float I, float Nref);
+vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
+vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
+vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
+
+float reflect(float I, float N);
+vec2 reflect(vec2 I, vec2 N);
+vec3 reflect(vec3 I, vec3 N);
+vec4 reflect(vec4 I, vec4 N);
+
+float refract(float I, float N, float eta);
+vec2 refract(vec2 I, vec2 N, float eta);
+vec3 refract(vec3 I, vec3 N, float eta);
+vec4 refract(vec4 I, vec4 N, float eta);
+
+
+/*
+ * 8.5 - Matrix Functions
+ */
+mat2 matrixCompMult(mat2 x, mat2 y);
+mat3 matrixCompMult(mat3 x, mat3 y);
+mat4 matrixCompMult(mat4 x, mat4 y);
+
+/*
+ * 8.6 - Vector Relational Functions
+ */
+bvec2 lessThan( vec2 x, vec2 y);
+bvec3 lessThan( vec3 x, vec3 y);
+bvec4 lessThan( vec4 x, vec4 y);
+bvec2 lessThan(ivec2 x, ivec2 y);
+bvec3 lessThan(ivec3 x, ivec3 y);
+bvec4 lessThan(ivec4 x, ivec4 y);
+
+bvec2 lessThanEqual( vec2 x, vec2 y);
+bvec3 lessThanEqual( vec3 x, vec3 y);
+bvec4 lessThanEqual( vec4 x, vec4 y);
+bvec2 lessThanEqual(ivec2 x, ivec2 y);
+bvec3 lessThanEqual(ivec3 x, ivec3 y);
+bvec4 lessThanEqual(ivec4 x, ivec4 y);
+
+bvec2 greaterThan( vec2 x, vec2 y);
+bvec3 greaterThan( vec3 x, vec3 y);
+bvec4 greaterThan( vec4 x, vec4 y);
+bvec2 greaterThan(ivec2 x, ivec2 y);
+bvec3 greaterThan(ivec3 x, ivec3 y);
+bvec4 greaterThan(ivec4 x, ivec4 y);
+
+bvec2 greaterThanEqual( vec2 x, vec2 y);
+bvec3 greaterThanEqual( vec3 x, vec3 y);
+bvec4 greaterThanEqual( vec4 x, vec4 y);
+bvec2 greaterThanEqual(ivec2 x, ivec2 y);
+bvec3 greaterThanEqual(ivec3 x, ivec3 y);
+bvec4 greaterThanEqual(ivec4 x, ivec4 y);
+
+bvec2 equal( vec2 x, vec2 y);
+bvec3 equal( vec3 x, vec3 y);
+bvec4 equal( vec4 x, vec4 y);
+bvec2 equal(ivec2 x, ivec2 y);
+bvec3 equal(ivec3 x, ivec3 y);
+bvec4 equal(ivec4 x, ivec4 y);
+bvec2 equal(bvec2 x, bvec2 y);
+bvec3 equal(bvec3 x, bvec3 y);
+bvec4 equal(bvec4 x, bvec4 y);
+
+bvec2 notEqual( vec2 x, vec2 y);
+bvec3 notEqual( vec3 x, vec3 y);
+bvec4 notEqual( vec4 x, vec4 y);
+bvec2 notEqual(ivec2 x, ivec2 y);
+bvec3 notEqual(ivec3 x, ivec3 y);
+bvec4 notEqual(ivec4 x, ivec4 y);
+bvec2 notEqual(bvec2 x, bvec2 y);
+bvec3 notEqual(bvec3 x, bvec3 y);
+bvec4 notEqual(bvec4 x, bvec4 y);
+
+bool any(bvec2 x);
+bool any(bvec3 x);
+bool any(bvec4 x);
+
+bool all(bvec2 x);
+bool all(bvec3 x);
+bool all(bvec4 x);
+
+bvec2 not(bvec2 x);
+bvec3 not(bvec3 x);
+bvec4 not(bvec4 x);
+
+/*
+ * 8.7 - Texture Lookup Functions
+ */
+vec4 texture1D (sampler1D sampler, float coord);
+vec4 texture1DProj (sampler1D sampler, vec2 coord);
+vec4 texture1DProj (sampler1D sampler, vec4 coord);
+vec4 texture1D (sampler1D sampler, float coord, float bias);
+vec4 texture1DProj (sampler1D sampler, vec2 coord, float bias);
+vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias);
+
+vec4 texture2D (sampler2D sampler, vec2 coord);
+vec4 texture2DProj (sampler2D sampler, vec3 coord);
+vec4 texture2DProj (sampler2D sampler, vec4 coord);
+vec4 texture2D (sampler2D sampler, vec2 coord, float bias);
+vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias);
+vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias);
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3D (sampler3D sampler, vec3 coord, float bias);
+vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias);
+
+vec4 textureCube (samplerCube sampler, vec3 coord);
+vec4 textureCube (samplerCube sampler, vec3 coord, float bias);
+
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord);
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias);
+
+
+/*
+ * 8.8 - Fragment Processing Functions
+ */
+float dFdx(float p);
+vec2 dFdx(vec2 p);
+vec3 dFdx(vec3 p);
+vec4 dFdx(vec4 p);
+
+float dFdy(float p);
+vec2 dFdy(vec2 p);
+vec3 dFdy(vec3 p);
+vec4 dFdy(vec4 p);
+
+float fwidth(float p);
+vec2 fwidth(vec2 p);
+vec3 fwidth(vec3 p);
+vec4 fwidth(vec4 p);
+
+/*
+ * 8.9 - Noise Functions
+ */
+float noise1(float x);
+float noise1(vec2 x);
+float noise1(vec3 x);
+float noise1(vec4 x);
+
+vec2 noise2(float x);
+vec2 noise2(vec2 x);
+vec2 noise2(vec3 x);
+vec2 noise2(vec4 x);
+
+vec3 noise3(float x);
+vec3 noise3(vec2 x);
+vec3 noise3(vec3 x);
+vec3 noise3(vec4 x);
+
+vec4 noise4(float x);
+vec4 noise4(vec2 x);
+vec4 noise4(vec3 x);
+vec4 noise4(vec4 x);
diff --git a/src/glsl/builtins/profiles/110.vert b/src/glsl/builtins/profiles/110.vert
new file mode 100644
index 0000000000..545e59c539
--- /dev/null
+++ b/src/glsl/builtins/profiles/110.vert
@@ -0,0 +1,351 @@
+#version 110
+/*
+ * 8.1 - Angle and Trigonometry Functions
+ */
+float radians(float degrees);
+vec2 radians(vec2 degrees);
+vec3 radians(vec3 degrees);
+vec4 radians(vec4 degrees);
+
+float degrees(float radians);
+vec2 degrees(vec2 radians);
+vec3 degrees(vec3 radians);
+vec4 degrees(vec4 radians);
+
+float sin(float angle);
+vec2 sin(vec2 angle);
+vec3 sin(vec3 angle);
+vec4 sin(vec4 angle);
+
+float cos(float angle);
+vec2 cos(vec2 angle);
+vec3 cos(vec3 angle);
+vec4 cos(vec4 angle);
+
+float tan(float angle);
+vec2 tan(vec2 angle);
+vec3 tan(vec3 angle);
+vec4 tan(vec4 angle);
+
+float asin(float angle);
+vec2 asin(vec2 angle);
+vec3 asin(vec3 angle);
+vec4 asin(vec4 angle);
+
+float acos(float angle);
+vec2 acos(vec2 angle);
+vec3 acos(vec3 angle);
+vec4 acos(vec4 angle);
+
+float atan(float y, float x);
+vec2 atan(vec2 y, vec2 x);
+vec3 atan(vec3 y, vec3 x);
+vec4 atan(vec4 y, vec4 x);
+
+float atan(float y_over_x);
+vec2 atan(vec2 y_over_x);
+vec3 atan(vec3 y_over_x);
+vec4 atan(vec4 y_over_x);
+
+/*
+ * 8.2 - Exponential Functions
+ */
+float pow(float x, float y);
+vec2 pow(vec2 x, vec2 y);
+vec3 pow(vec3 x, vec3 y);
+vec4 pow(vec4 x, vec4 y);
+
+float exp(float x);
+vec2 exp(vec2 x);
+vec3 exp(vec3 x);
+vec4 exp(vec4 x);
+
+float log(float x);
+vec2 log(vec2 x);
+vec3 log(vec3 x);
+vec4 log(vec4 x);
+
+float exp2(float x);
+vec2 exp2(vec2 x);
+vec3 exp2(vec3 x);
+vec4 exp2(vec4 x);
+
+float log2(float x);
+vec2 log2(vec2 x);
+vec3 log2(vec3 x);
+vec4 log2(vec4 x);
+
+float sqrt(float x);
+vec2 sqrt(vec2 x);
+vec3 sqrt(vec3 x);
+vec4 sqrt(vec4 x);
+
+float inversesqrt(float x);
+vec2 inversesqrt(vec2 x);
+vec3 inversesqrt(vec3 x);
+vec4 inversesqrt(vec4 x);
+
+/*
+ * 8.3 - Common Functions
+ */
+float abs(float x);
+vec2 abs(vec2 x);
+vec3 abs(vec3 x);
+vec4 abs(vec4 x);
+
+float sign(float x);
+vec2 sign(vec2 x);
+vec3 sign(vec3 x);
+vec4 sign(vec4 x);
+
+float floor(float x);
+vec2 floor(vec2 x);
+vec3 floor(vec3 x);
+vec4 floor(vec4 x);
+
+float ceil(float x);
+vec2 ceil(vec2 x);
+vec3 ceil(vec3 x);
+vec4 ceil(vec4 x);
+
+float fract(float x);
+vec2 fract(vec2 x);
+vec3 fract(vec3 x);
+vec4 fract(vec4 x);
+
+float mod(float x, float y);
+vec2 mod(vec2 x, float y);
+vec3 mod(vec3 x, float y);
+vec4 mod(vec4 x, float y);
+
+vec2 mod(vec2 x, vec2 y);
+vec3 mod(vec3 x, vec3 y);
+vec4 mod(vec4 x, vec4 y);
+
+float min(float x, float y);
+vec2 min(vec2 x, vec2 y);
+vec3 min(vec3 x, vec3 y);
+vec4 min(vec4 x, vec4 y);
+
+vec2 min(vec2 x, float y);
+vec3 min(vec3 x, float y);
+vec4 min(vec4 x, float y);
+
+float max(float x, float y);
+vec2 max(vec2 x, vec2 y);
+vec3 max(vec3 x, vec3 y);
+vec4 max(vec4 x, vec4 y);
+
+vec2 max(vec2 x, float y);
+vec3 max(vec3 x, float y);
+vec4 max(vec4 x, float y);
+
+float clamp(float x, float minVal, float maxVal);
+vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
+vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
+vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
+
+vec2 clamp(vec2 x, float minVal, float maxVal);
+vec3 clamp(vec3 x, float minVal, float maxVal);
+vec4 clamp(vec4 x, float minVal, float maxVal);
+
+float mix(float x, float y, float a);
+vec2 mix(vec2 x, vec2 y, vec2 a);
+vec3 mix(vec3 x, vec3 y, vec3 a);
+vec4 mix(vec4 x, vec4 y, vec4 a);
+
+vec2 mix(vec2 x, vec2 y, float a);
+vec3 mix(vec3 x, vec3 y, float a);
+vec4 mix(vec4 x, vec4 y, float a);
+
+float step(float edge, float x);
+vec2 step(vec2 edge, vec2 x);
+vec3 step(vec3 edge, vec3 x);
+vec4 step(vec4 edge, vec4 x);
+
+vec2 step(float edge, vec2 x);
+vec3 step(float edge, vec3 x);
+vec4 step(float edge, vec4 x);
+
+float smoothstep(float edge0, float edge1, float x);
+vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
+vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
+vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
+
+vec2 smoothstep(float edge0, float edge1, vec2 x);
+vec3 smoothstep(float edge0, float edge1, vec3 x);
+vec4 smoothstep(float edge0, float edge1, vec4 x);
+
+/*
+ * 8.4 - Geometric Functions
+ */
+float length(float x);
+float length(vec2 x);
+float length(vec3 x);
+float length(vec4 x);
+
+float distance(float p0, float p1);
+float distance(vec2 p0, vec2 p1);
+float distance(vec3 p0, vec3 p1);
+float distance(vec4 p0, vec4 p1);
+
+float dot(float x, float y);
+float dot(vec2 x, vec2 y);
+float dot(vec3 x, vec3 y);
+float dot(vec4 x, vec4 y);
+
+vec3 cross(vec3 x, vec3 y);
+
+float normalize(float x);
+vec2 normalize(vec2 x);
+vec3 normalize(vec3 x);
+vec4 normalize(vec4 x);
+
+vec4 ftransform();
+
+float faceforward(float N, float I, float Nref);
+vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
+vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
+vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
+
+float reflect(float I, float N);
+vec2 reflect(vec2 I, vec2 N);
+vec3 reflect(vec3 I, vec3 N);
+vec4 reflect(vec4 I, vec4 N);
+
+float refract(float I, float N, float eta);
+vec2 refract(vec2 I, vec2 N, float eta);
+vec3 refract(vec3 I, vec3 N, float eta);
+vec4 refract(vec4 I, vec4 N, float eta);
+
+
+/*
+ * 8.5 - Matrix Functions
+ */
+mat2 matrixCompMult(mat2 x, mat2 y);
+mat3 matrixCompMult(mat3 x, mat3 y);
+mat4 matrixCompMult(mat4 x, mat4 y);
+
+/*
+ * 8.6 - Vector Relational Functions
+ */
+bvec2 lessThan( vec2 x, vec2 y);
+bvec3 lessThan( vec3 x, vec3 y);
+bvec4 lessThan( vec4 x, vec4 y);
+bvec2 lessThan(ivec2 x, ivec2 y);
+bvec3 lessThan(ivec3 x, ivec3 y);
+bvec4 lessThan(ivec4 x, ivec4 y);
+
+bvec2 lessThanEqual( vec2 x, vec2 y);
+bvec3 lessThanEqual( vec3 x, vec3 y);
+bvec4 lessThanEqual( vec4 x, vec4 y);
+bvec2 lessThanEqual(ivec2 x, ivec2 y);
+bvec3 lessThanEqual(ivec3 x, ivec3 y);
+bvec4 lessThanEqual(ivec4 x, ivec4 y);
+
+bvec2 greaterThan( vec2 x, vec2 y);
+bvec3 greaterThan( vec3 x, vec3 y);
+bvec4 greaterThan( vec4 x, vec4 y);
+bvec2 greaterThan(ivec2 x, ivec2 y);
+bvec3 greaterThan(ivec3 x, ivec3 y);
+bvec4 greaterThan(ivec4 x, ivec4 y);
+
+bvec2 greaterThanEqual( vec2 x, vec2 y);
+bvec3 greaterThanEqual( vec3 x, vec3 y);
+bvec4 greaterThanEqual( vec4 x, vec4 y);
+bvec2 greaterThanEqual(ivec2 x, ivec2 y);
+bvec3 greaterThanEqual(ivec3 x, ivec3 y);
+bvec4 greaterThanEqual(ivec4 x, ivec4 y);
+
+bvec2 equal( vec2 x, vec2 y);
+bvec3 equal( vec3 x, vec3 y);
+bvec4 equal( vec4 x, vec4 y);
+bvec2 equal(ivec2 x, ivec2 y);
+bvec3 equal(ivec3 x, ivec3 y);
+bvec4 equal(ivec4 x, ivec4 y);
+bvec2 equal(bvec2 x, bvec2 y);
+bvec3 equal(bvec3 x, bvec3 y);
+bvec4 equal(bvec4 x, bvec4 y);
+
+bvec2 notEqual( vec2 x, vec2 y);
+bvec3 notEqual( vec3 x, vec3 y);
+bvec4 notEqual( vec4 x, vec4 y);
+bvec2 notEqual(ivec2 x, ivec2 y);
+bvec3 notEqual(ivec3 x, ivec3 y);
+bvec4 notEqual(ivec4 x, ivec4 y);
+bvec2 notEqual(bvec2 x, bvec2 y);
+bvec3 notEqual(bvec3 x, bvec3 y);
+bvec4 notEqual(bvec4 x, bvec4 y);
+
+bool any(bvec2 x);
+bool any(bvec3 x);
+bool any(bvec4 x);
+
+bool all(bvec2 x);
+bool all(bvec3 x);
+bool all(bvec4 x);
+
+bvec2 not(bvec2 x);
+bvec3 not(bvec3 x);
+bvec4 not(bvec4 x);
+
+/*
+ * 8.7 - Texture Lookup Functions
+ */
+vec4 texture1D (sampler1D sampler, float coord);
+vec4 texture1DProj (sampler1D sampler, vec2 coord);
+vec4 texture1DProj (sampler1D sampler, vec4 coord);
+vec4 texture1DLod (sampler1D sampler, float coord, float lod);
+vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod);
+vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod);
+
+vec4 texture2D (sampler2D sampler, vec2 coord);
+vec4 texture2DProj (sampler2D sampler, vec3 coord);
+vec4 texture2DProj (sampler2D sampler, vec4 coord);
+vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod);
+vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
+vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod);
+vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
+
+vec4 textureCube (samplerCube sampler, vec3 coord);
+vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod);
+
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord);
+vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod);
+vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod);
+vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
+vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
+
+/*
+ * 8.8 - Fragment Processing Functions (none in vertex shader)
+ */
+
+/*
+ * 8.9 - Noise Functions
+ */
+float noise1(float x);
+float noise1(vec2 x);
+float noise1(vec3 x);
+float noise1(vec4 x);
+
+vec2 noise2(float x);
+vec2 noise2(vec2 x);
+vec2 noise2(vec3 x);
+vec2 noise2(vec4 x);
+
+vec3 noise3(float x);
+vec3 noise3(vec2 x);
+vec3 noise3(vec3 x);
+vec3 noise3(vec4 x);
+
+vec4 noise4(float x);
+vec4 noise4(vec2 x);
+vec4 noise4(vec3 x);
+vec4 noise4(vec4 x);
diff --git a/src/glsl/builtins/profiles/120.frag b/src/glsl/builtins/profiles/120.frag
new file mode 100644
index 0000000000..a207435f33
--- /dev/null
+++ b/src/glsl/builtins/profiles/120.frag
@@ -0,0 +1,396 @@
+#version 120
+/*
+ * 8.1 - Angle and Trigonometry Functions
+ */
+float radians(float degrees);
+vec2 radians(vec2 degrees);
+vec3 radians(vec3 degrees);
+vec4 radians(vec4 degrees);
+
+float degrees(float radians);
+vec2 degrees(vec2 radians);
+vec3 degrees(vec3 radians);
+vec4 degrees(vec4 radians);
+
+float sin(float angle);
+vec2 sin(vec2 angle);
+vec3 sin(vec3 angle);
+vec4 sin(vec4 angle);
+
+float cos(float angle);
+vec2 cos(vec2 angle);
+vec3 cos(vec3 angle);
+vec4 cos(vec4 angle);
+
+float tan(float angle);
+vec2 tan(vec2 angle);
+vec3 tan(vec3 angle);
+vec4 tan(vec4 angle);
+
+float asin(float angle);
+vec2 asin(vec2 angle);
+vec3 asin(vec3 angle);
+vec4 asin(vec4 angle);
+
+float acos(float angle);
+vec2 acos(vec2 angle);
+vec3 acos(vec3 angle);
+vec4 acos(vec4 angle);
+
+float atan(float y, float x);
+vec2 atan(vec2 y, vec2 x);
+vec3 atan(vec3 y, vec3 x);
+vec4 atan(vec4 y, vec4 x);
+
+float atan(float y_over_x);
+vec2 atan(vec2 y_over_x);
+vec3 atan(vec3 y_over_x);
+vec4 atan(vec4 y_over_x);
+
+/*
+ * 8.2 - Exponential Functions
+ */
+float pow(float x, float y);
+vec2 pow(vec2 x, vec2 y);
+vec3 pow(vec3 x, vec3 y);
+vec4 pow(vec4 x, vec4 y);
+
+float exp(float x);
+vec2 exp(vec2 x);
+vec3 exp(vec3 x);
+vec4 exp(vec4 x);
+
+float log(float x);
+vec2 log(vec2 x);
+vec3 log(vec3 x);
+vec4 log(vec4 x);
+
+float exp2(float x);
+vec2 exp2(vec2 x);
+vec3 exp2(vec3 x);
+vec4 exp2(vec4 x);
+
+float log2(float x);
+vec2 log2(vec2 x);
+vec3 log2(vec3 x);
+vec4 log2(vec4 x);
+
+float sqrt(float x);
+vec2 sqrt(vec2 x);
+vec3 sqrt(vec3 x);
+vec4 sqrt(vec4 x);
+
+float inversesqrt(float x);
+vec2 inversesqrt(vec2 x);
+vec3 inversesqrt(vec3 x);
+vec4 inversesqrt(vec4 x);
+
+/*
+ * 8.3 - Common Functions
+ */
+float abs(float x);
+vec2 abs(vec2 x);
+vec3 abs(vec3 x);
+vec4 abs(vec4 x);
+
+float sign(float x);
+vec2 sign(vec2 x);
+vec3 sign(vec3 x);
+vec4 sign(vec4 x);
+
+float floor(float x);
+vec2 floor(vec2 x);
+vec3 floor(vec3 x);
+vec4 floor(vec4 x);
+
+float ceil(float x);
+vec2 ceil(vec2 x);
+vec3 ceil(vec3 x);
+vec4 ceil(vec4 x);
+
+float fract(float x);
+vec2 fract(vec2 x);
+vec3 fract(vec3 x);
+vec4 fract(vec4 x);
+
+float mod(float x, float y);
+vec2 mod(vec2 x, float y);
+vec3 mod(vec3 x, float y);
+vec4 mod(vec4 x, float y);
+
+vec2 mod(vec2 x, vec2 y);
+vec3 mod(vec3 x, vec3 y);
+vec4 mod(vec4 x, vec4 y);
+
+float min(float x, float y);
+vec2 min(vec2 x, vec2 y);
+vec3 min(vec3 x, vec3 y);
+vec4 min(vec4 x, vec4 y);
+
+vec2 min(vec2 x, float y);
+vec3 min(vec3 x, float y);
+vec4 min(vec4 x, float y);
+
+float max(float x, float y);
+vec2 max(vec2 x, vec2 y);
+vec3 max(vec3 x, vec3 y);
+vec4 max(vec4 x, vec4 y);
+
+vec2 max(vec2 x, float y);
+vec3 max(vec3 x, float y);
+vec4 max(vec4 x, float y);
+
+float clamp(float x, float minVal, float maxVal);
+vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
+vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
+vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
+
+vec2 clamp(vec2 x, float minVal, float maxVal);
+vec3 clamp(vec3 x, float minVal, float maxVal);
+vec4 clamp(vec4 x, float minVal, float maxVal);
+
+float mix(float x, float y, float a);
+vec2 mix(vec2 x, vec2 y, vec2 a);
+vec3 mix(vec3 x, vec3 y, vec3 a);
+vec4 mix(vec4 x, vec4 y, vec4 a);
+
+vec2 mix(vec2 x, vec2 y, float a);
+vec3 mix(vec3 x, vec3 y, float a);
+vec4 mix(vec4 x, vec4 y, float a);
+
+float step(float edge, float x);
+vec2 step(vec2 edge, vec2 x);
+vec3 step(vec3 edge, vec3 x);
+vec4 step(vec4 edge, vec4 x);
+
+vec2 step(float edge, vec2 x);
+vec3 step(float edge, vec3 x);
+vec4 step(float edge, vec4 x);
+
+float smoothstep(float edge0, float edge1, float x);
+vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
+vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
+vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
+
+vec2 smoothstep(float edge0, float edge1, vec2 x);
+vec3 smoothstep(float edge0, float edge1, vec3 x);
+vec4 smoothstep(float edge0, float edge1, vec4 x);
+
+/*
+ * 8.4 - Geometric Functions
+ */
+float length(float x);
+float length(vec2 x);
+float length(vec3 x);
+float length(vec4 x);
+
+float distance(float p0, float p1);
+float distance(vec2 p0, vec2 p1);
+float distance(vec3 p0, vec3 p1);
+float distance(vec4 p0, vec4 p1);
+
+float dot(float x, float y);
+float dot(vec2 x, vec2 y);
+float dot(vec3 x, vec3 y);
+float dot(vec4 x, vec4 y);
+
+vec3 cross(vec3 x, vec3 y);
+
+float normalize(float x);
+vec2 normalize(vec2 x);
+vec3 normalize(vec3 x);
+vec4 normalize(vec4 x);
+
+float faceforward(float N, float I, float Nref);
+vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
+vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
+vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
+
+float reflect(float I, float N);
+vec2 reflect(vec2 I, vec2 N);
+vec3 reflect(vec3 I, vec3 N);
+vec4 reflect(vec4 I, vec4 N);
+
+float refract(float I, float N, float eta);
+vec2 refract(vec2 I, vec2 N, float eta);
+vec3 refract(vec3 I, vec3 N, float eta);
+vec4 refract(vec4 I, vec4 N, float eta);
+
+
+/*
+ * 8.5 - Matrix Functions
+ */
+mat2 matrixCompMult(mat2 x, mat2 y);
+mat3 matrixCompMult(mat3 x, mat3 y);
+mat4 matrixCompMult(mat4 x, mat4 y);
+mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
+mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
+mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
+mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
+mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
+mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
+
+mat2 outerProduct(vec2 c, vec2 r);
+mat3 outerProduct(vec3 c, vec3 r);
+mat4 outerProduct(vec4 c, vec4 r);
+
+mat2x3 outerProduct(vec3 c, vec2 r);
+mat3x2 outerProduct(vec2 c, vec3 r);
+
+mat2x4 outerProduct(vec4 c, vec2 r);
+mat4x2 outerProduct(vec2 c, vec4 r);
+
+mat3x4 outerProduct(vec4 c, vec3 r);
+mat4x3 outerProduct(vec3 c, vec4 r);
+
+mat2 transpose(mat2 m);
+mat3 transpose(mat3 m);
+mat4 transpose(mat4 m);
+
+mat2x3 transpose(mat3x2 m);
+mat3x2 transpose(mat2x3 m);
+
+mat2x4 transpose(mat4x2 m);
+mat4x2 transpose(mat2x4 m);
+
+mat3x4 transpose(mat4x3 m);
+mat4x3 transpose(mat3x4 m);
+
+/*
+ * 8.6 - Vector Relational Functions
+ */
+bvec2 lessThan( vec2 x, vec2 y);
+bvec3 lessThan( vec3 x, vec3 y);
+bvec4 lessThan( vec4 x, vec4 y);
+bvec2 lessThan(ivec2 x, ivec2 y);
+bvec3 lessThan(ivec3 x, ivec3 y);
+bvec4 lessThan(ivec4 x, ivec4 y);
+
+bvec2 lessThanEqual( vec2 x, vec2 y);
+bvec3 lessThanEqual( vec3 x, vec3 y);
+bvec4 lessThanEqual( vec4 x, vec4 y);
+bvec2 lessThanEqual(ivec2 x, ivec2 y);
+bvec3 lessThanEqual(ivec3 x, ivec3 y);
+bvec4 lessThanEqual(ivec4 x, ivec4 y);
+
+bvec2 greaterThan( vec2 x, vec2 y);
+bvec3 greaterThan( vec3 x, vec3 y);
+bvec4 greaterThan( vec4 x, vec4 y);
+bvec2 greaterThan(ivec2 x, ivec2 y);
+bvec3 greaterThan(ivec3 x, ivec3 y);
+bvec4 greaterThan(ivec4 x, ivec4 y);
+
+bvec2 greaterThanEqual( vec2 x, vec2 y);
+bvec3 greaterThanEqual( vec3 x, vec3 y);
+bvec4 greaterThanEqual( vec4 x, vec4 y);
+bvec2 greaterThanEqual(ivec2 x, ivec2 y);
+bvec3 greaterThanEqual(ivec3 x, ivec3 y);
+bvec4 greaterThanEqual(ivec4 x, ivec4 y);
+
+bvec2 equal( vec2 x, vec2 y);
+bvec3 equal( vec3 x, vec3 y);
+bvec4 equal( vec4 x, vec4 y);
+bvec2 equal(ivec2 x, ivec2 y);
+bvec3 equal(ivec3 x, ivec3 y);
+bvec4 equal(ivec4 x, ivec4 y);
+bvec2 equal(bvec2 x, bvec2 y);
+bvec3 equal(bvec3 x, bvec3 y);
+bvec4 equal(bvec4 x, bvec4 y);
+
+bvec2 notEqual( vec2 x, vec2 y);
+bvec3 notEqual( vec3 x, vec3 y);
+bvec4 notEqual( vec4 x, vec4 y);
+bvec2 notEqual(ivec2 x, ivec2 y);
+bvec3 notEqual(ivec3 x, ivec3 y);
+bvec4 notEqual(ivec4 x, ivec4 y);
+bvec2 notEqual(bvec2 x, bvec2 y);
+bvec3 notEqual(bvec3 x, bvec3 y);
+bvec4 notEqual(bvec4 x, bvec4 y);
+
+bool any(bvec2 x);
+bool any(bvec3 x);
+bool any(bvec4 x);
+
+bool all(bvec2 x);
+bool all(bvec3 x);
+bool all(bvec4 x);
+
+bvec2 not(bvec2 x);
+bvec3 not(bvec3 x);
+bvec4 not(bvec4 x);
+
+/*
+ * 8.7 - Texture Lookup Functions
+ */
+vec4 texture1D (sampler1D sampler, float coord);
+vec4 texture1DProj (sampler1D sampler, vec2 coord);
+vec4 texture1DProj (sampler1D sampler, vec4 coord);
+vec4 texture1D (sampler1D sampler, float coord, float bias);
+vec4 texture1DProj (sampler1D sampler, vec2 coord, float bias);
+vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias);
+
+vec4 texture2D (sampler2D sampler, vec2 coord);
+vec4 texture2DProj (sampler2D sampler, vec3 coord);
+vec4 texture2DProj (sampler2D sampler, vec4 coord);
+vec4 texture2D (sampler2D sampler, vec2 coord, float bias);
+vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias);
+vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias);
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3D (sampler3D sampler, vec3 coord, float bias);
+vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias);
+
+vec4 textureCube (samplerCube sampler, vec3 coord);
+vec4 textureCube (samplerCube sampler, vec3 coord, float bias);
+
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord);
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias);
+
+
+/*
+ * 8.8 - Fragment Processing Functions
+ */
+float dFdx(float p);
+vec2 dFdx(vec2 p);
+vec3 dFdx(vec3 p);
+vec4 dFdx(vec4 p);
+
+float dFdy(float p);
+vec2 dFdy(vec2 p);
+vec3 dFdy(vec3 p);
+vec4 dFdy(vec4 p);
+
+float fwidth(float p);
+vec2 fwidth(vec2 p);
+vec3 fwidth(vec3 p);
+vec4 fwidth(vec4 p);
+
+/*
+ * 8.9 - Noise Functions
+ */
+float noise1(float x);
+float noise1(vec2 x);
+float noise1(vec3 x);
+float noise1(vec4 x);
+
+vec2 noise2(float x);
+vec2 noise2(vec2 x);
+vec2 noise2(vec3 x);
+vec2 noise2(vec4 x);
+
+vec3 noise3(float x);
+vec3 noise3(vec2 x);
+vec3 noise3(vec3 x);
+vec3 noise3(vec4 x);
+
+vec4 noise4(float x);
+vec4 noise4(vec2 x);
+vec4 noise4(vec3 x);
+vec4 noise4(vec4 x);
diff --git a/src/glsl/builtins/profiles/120.vert b/src/glsl/builtins/profiles/120.vert
new file mode 100644
index 0000000000..e14c931647
--- /dev/null
+++ b/src/glsl/builtins/profiles/120.vert
@@ -0,0 +1,383 @@
+#version 120
+/*
+ * 8.1 - Angle and Trigonometry Functions
+ */
+float radians(float degrees);
+vec2 radians(vec2 degrees);
+vec3 radians(vec3 degrees);
+vec4 radians(vec4 degrees);
+
+float degrees(float radians);
+vec2 degrees(vec2 radians);
+vec3 degrees(vec3 radians);
+vec4 degrees(vec4 radians);
+
+float sin(float angle);
+vec2 sin(vec2 angle);
+vec3 sin(vec3 angle);
+vec4 sin(vec4 angle);
+
+float cos(float angle);
+vec2 cos(vec2 angle);
+vec3 cos(vec3 angle);
+vec4 cos(vec4 angle);
+
+float tan(float angle);
+vec2 tan(vec2 angle);
+vec3 tan(vec3 angle);
+vec4 tan(vec4 angle);
+
+float asin(float angle);
+vec2 asin(vec2 angle);
+vec3 asin(vec3 angle);
+vec4 asin(vec4 angle);
+
+float acos(float angle);
+vec2 acos(vec2 angle);
+vec3 acos(vec3 angle);
+vec4 acos(vec4 angle);
+
+float atan(float y, float x);
+vec2 atan(vec2 y, vec2 x);
+vec3 atan(vec3 y, vec3 x);
+vec4 atan(vec4 y, vec4 x);
+
+float atan(float y_over_x);
+vec2 atan(vec2 y_over_x);
+vec3 atan(vec3 y_over_x);
+vec4 atan(vec4 y_over_x);
+
+/*
+ * 8.2 - Exponential Functions
+ */
+float pow(float x, float y);
+vec2 pow(vec2 x, vec2 y);
+vec3 pow(vec3 x, vec3 y);
+vec4 pow(vec4 x, vec4 y);
+
+float exp(float x);
+vec2 exp(vec2 x);
+vec3 exp(vec3 x);
+vec4 exp(vec4 x);
+
+float log(float x);
+vec2 log(vec2 x);
+vec3 log(vec3 x);
+vec4 log(vec4 x);
+
+float exp2(float x);
+vec2 exp2(vec2 x);
+vec3 exp2(vec3 x);
+vec4 exp2(vec4 x);
+
+float log2(float x);
+vec2 log2(vec2 x);
+vec3 log2(vec3 x);
+vec4 log2(vec4 x);
+
+float sqrt(float x);
+vec2 sqrt(vec2 x);
+vec3 sqrt(vec3 x);
+vec4 sqrt(vec4 x);
+
+float inversesqrt(float x);
+vec2 inversesqrt(vec2 x);
+vec3 inversesqrt(vec3 x);
+vec4 inversesqrt(vec4 x);
+
+/*
+ * 8.3 - Common Functions
+ */
+float abs(float x);
+vec2 abs(vec2 x);
+vec3 abs(vec3 x);
+vec4 abs(vec4 x);
+
+float sign(float x);
+vec2 sign(vec2 x);
+vec3 sign(vec3 x);
+vec4 sign(vec4 x);
+
+float floor(float x);
+vec2 floor(vec2 x);
+vec3 floor(vec3 x);
+vec4 floor(vec4 x);
+
+float ceil(float x);
+vec2 ceil(vec2 x);
+vec3 ceil(vec3 x);
+vec4 ceil(vec4 x);
+
+float fract(float x);
+vec2 fract(vec2 x);
+vec3 fract(vec3 x);
+vec4 fract(vec4 x);
+
+float mod(float x, float y);
+vec2 mod(vec2 x, float y);
+vec3 mod(vec3 x, float y);
+vec4 mod(vec4 x, float y);
+
+vec2 mod(vec2 x, vec2 y);
+vec3 mod(vec3 x, vec3 y);
+vec4 mod(vec4 x, vec4 y);
+
+float min(float x, float y);
+vec2 min(vec2 x, vec2 y);
+vec3 min(vec3 x, vec3 y);
+vec4 min(vec4 x, vec4 y);
+
+vec2 min(vec2 x, float y);
+vec3 min(vec3 x, float y);
+vec4 min(vec4 x, float y);
+
+float max(float x, float y);
+vec2 max(vec2 x, vec2 y);
+vec3 max(vec3 x, vec3 y);
+vec4 max(vec4 x, vec4 y);
+
+vec2 max(vec2 x, float y);
+vec3 max(vec3 x, float y);
+vec4 max(vec4 x, float y);
+
+float clamp(float x, float minVal, float maxVal);
+vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
+vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
+vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
+
+vec2 clamp(vec2 x, float minVal, float maxVal);
+vec3 clamp(vec3 x, float minVal, float maxVal);
+vec4 clamp(vec4 x, float minVal, float maxVal);
+
+float mix(float x, float y, float a);
+vec2 mix(vec2 x, vec2 y, vec2 a);
+vec3 mix(vec3 x, vec3 y, vec3 a);
+vec4 mix(vec4 x, vec4 y, vec4 a);
+
+vec2 mix(vec2 x, vec2 y, float a);
+vec3 mix(vec3 x, vec3 y, float a);
+vec4 mix(vec4 x, vec4 y, float a);
+
+float step(float edge, float x);
+vec2 step(vec2 edge, vec2 x);
+vec3 step(vec3 edge, vec3 x);
+vec4 step(vec4 edge, vec4 x);
+
+vec2 step(float edge, vec2 x);
+vec3 step(float edge, vec3 x);
+vec4 step(float edge, vec4 x);
+
+float smoothstep(float edge0, float edge1, float x);
+vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
+vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
+vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
+
+vec2 smoothstep(float edge0, float edge1, vec2 x);
+vec3 smoothstep(float edge0, float edge1, vec3 x);
+vec4 smoothstep(float edge0, float edge1, vec4 x);
+
+/*
+ * 8.4 - Geometric Functions
+ */
+float length(float x);
+float length(vec2 x);
+float length(vec3 x);
+float length(vec4 x);
+
+float distance(float p0, float p1);
+float distance(vec2 p0, vec2 p1);
+float distance(vec3 p0, vec3 p1);
+float distance(vec4 p0, vec4 p1);
+
+float dot(float x, float y);
+float dot(vec2 x, vec2 y);
+float dot(vec3 x, vec3 y);
+float dot(vec4 x, vec4 y);
+
+vec3 cross(vec3 x, vec3 y);
+
+float normalize(float x);
+vec2 normalize(vec2 x);
+vec3 normalize(vec3 x);
+vec4 normalize(vec4 x);
+
+vec4 ftransform();
+
+float faceforward(float N, float I, float Nref);
+vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
+vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
+vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
+
+float reflect(float I, float N);
+vec2 reflect(vec2 I, vec2 N);
+vec3 reflect(vec3 I, vec3 N);
+vec4 reflect(vec4 I, vec4 N);
+
+float refract(float I, float N, float eta);
+vec2 refract(vec2 I, vec2 N, float eta);
+vec3 refract(vec3 I, vec3 N, float eta);
+vec4 refract(vec4 I, vec4 N, float eta);
+
+
+/*
+ * 8.5 - Matrix Functions
+ */
+mat2 matrixCompMult(mat2 x, mat2 y);
+mat3 matrixCompMult(mat3 x, mat3 y);
+mat4 matrixCompMult(mat4 x, mat4 y);
+mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
+mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
+mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
+mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
+mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
+mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
+
+mat2 outerProduct(vec2 c, vec2 r);
+mat3 outerProduct(vec3 c, vec3 r);
+mat4 outerProduct(vec4 c, vec4 r);
+
+mat2x3 outerProduct(vec3 c, vec2 r);
+mat3x2 outerProduct(vec2 c, vec3 r);
+
+mat2x4 outerProduct(vec4 c, vec2 r);
+mat4x2 outerProduct(vec2 c, vec4 r);
+
+mat3x4 outerProduct(vec4 c, vec3 r);
+mat4x3 outerProduct(vec3 c, vec4 r);
+
+mat2 transpose(mat2 m);
+mat3 transpose(mat3 m);
+mat4 transpose(mat4 m);
+
+mat2x3 transpose(mat3x2 m);
+mat3x2 transpose(mat2x3 m);
+
+mat2x4 transpose(mat4x2 m);
+mat4x2 transpose(mat2x4 m);
+
+mat3x4 transpose(mat4x3 m);
+mat4x3 transpose(mat3x4 m);
+
+/*
+ * 8.6 - Vector Relational Functions
+ */
+bvec2 lessThan( vec2 x, vec2 y);
+bvec3 lessThan( vec3 x, vec3 y);
+bvec4 lessThan( vec4 x, vec4 y);
+bvec2 lessThan(ivec2 x, ivec2 y);
+bvec3 lessThan(ivec3 x, ivec3 y);
+bvec4 lessThan(ivec4 x, ivec4 y);
+
+bvec2 lessThanEqual( vec2 x, vec2 y);
+bvec3 lessThanEqual( vec3 x, vec3 y);
+bvec4 lessThanEqual( vec4 x, vec4 y);
+bvec2 lessThanEqual(ivec2 x, ivec2 y);
+bvec3 lessThanEqual(ivec3 x, ivec3 y);
+bvec4 lessThanEqual(ivec4 x, ivec4 y);
+
+bvec2 greaterThan( vec2 x, vec2 y);
+bvec3 greaterThan( vec3 x, vec3 y);
+bvec4 greaterThan( vec4 x, vec4 y);
+bvec2 greaterThan(ivec2 x, ivec2 y);
+bvec3 greaterThan(ivec3 x, ivec3 y);
+bvec4 greaterThan(ivec4 x, ivec4 y);
+
+bvec2 greaterThanEqual( vec2 x, vec2 y);
+bvec3 greaterThanEqual( vec3 x, vec3 y);
+bvec4 greaterThanEqual( vec4 x, vec4 y);
+bvec2 greaterThanEqual(ivec2 x, ivec2 y);
+bvec3 greaterThanEqual(ivec3 x, ivec3 y);
+bvec4 greaterThanEqual(ivec4 x, ivec4 y);
+
+bvec2 equal( vec2 x, vec2 y);
+bvec3 equal( vec3 x, vec3 y);
+bvec4 equal( vec4 x, vec4 y);
+bvec2 equal(ivec2 x, ivec2 y);
+bvec3 equal(ivec3 x, ivec3 y);
+bvec4 equal(ivec4 x, ivec4 y);
+bvec2 equal(bvec2 x, bvec2 y);
+bvec3 equal(bvec3 x, bvec3 y);
+bvec4 equal(bvec4 x, bvec4 y);
+
+bvec2 notEqual( vec2 x, vec2 y);
+bvec3 notEqual( vec3 x, vec3 y);
+bvec4 notEqual( vec4 x, vec4 y);
+bvec2 notEqual(ivec2 x, ivec2 y);
+bvec3 notEqual(ivec3 x, ivec3 y);
+bvec4 notEqual(ivec4 x, ivec4 y);
+bvec2 notEqual(bvec2 x, bvec2 y);
+bvec3 notEqual(bvec3 x, bvec3 y);
+bvec4 notEqual(bvec4 x, bvec4 y);
+
+bool any(bvec2 x);
+bool any(bvec3 x);
+bool any(bvec4 x);
+
+bool all(bvec2 x);
+bool all(bvec3 x);
+bool all(bvec4 x);
+
+bvec2 not(bvec2 x);
+bvec3 not(bvec3 x);
+bvec4 not(bvec4 x);
+
+/*
+ * 8.7 - Texture Lookup Functions
+ */
+vec4 texture1D (sampler1D sampler, float coord);
+vec4 texture1DProj (sampler1D sampler, vec2 coord);
+vec4 texture1DProj (sampler1D sampler, vec4 coord);
+vec4 texture1DLod (sampler1D sampler, float coord, float lod);
+vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod);
+vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod);
+
+vec4 texture2D (sampler2D sampler, vec2 coord);
+vec4 texture2DProj (sampler2D sampler, vec3 coord);
+vec4 texture2DProj (sampler2D sampler, vec4 coord);
+vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod);
+vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
+vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod);
+vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
+
+vec4 textureCube (samplerCube sampler, vec3 coord);
+vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod);
+
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord);
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord);
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord);
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord);
+vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod);
+vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod);
+vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
+vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
+
+/*
+ * 8.8 - Fragment Processing Functions (none in vertex shader)
+ */
+
+/*
+ * 8.9 - Noise Functions
+ */
+float noise1(float x);
+float noise1(vec2 x);
+float noise1(vec3 x);
+float noise1(vec4 x);
+
+vec2 noise2(float x);
+vec2 noise2(vec2 x);
+vec2 noise2(vec3 x);
+vec2 noise2(vec4 x);
+
+vec3 noise3(float x);
+vec3 noise3(vec2 x);
+vec3 noise3(vec3 x);
+vec3 noise3(vec4 x);
+
+vec4 noise4(float x);
+vec4 noise4(vec2 x);
+vec4 noise4(vec3 x);
+vec4 noise4(vec4 x);
diff --git a/src/glsl/builtins/profiles/ARB_texture_rectangle.frag b/src/glsl/builtins/profiles/ARB_texture_rectangle.frag
new file mode 100644
index 0000000000..8938aa3e97
--- /dev/null
+++ b/src/glsl/builtins/profiles/ARB_texture_rectangle.frag
@@ -0,0 +1,7 @@
+#extension GL_ARB_texture_rectangle : enable
+vec4 texture2DRect(sampler2DRect sampler, vec2 coord);
+vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);
+vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);
+
+vec4 shadow2DRect(sampler2DRectShadow sampler, vec3 coord);
+vec4 shadow2DRectProj(sampler2DRectShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/ARB_texture_rectangle.vert b/src/glsl/builtins/profiles/ARB_texture_rectangle.vert
new file mode 100644
index 0000000000..8938aa3e97
--- /dev/null
+++ b/src/glsl/builtins/profiles/ARB_texture_rectangle.vert
@@ -0,0 +1,7 @@
+#extension GL_ARB_texture_rectangle : enable
+vec4 texture2DRect(sampler2DRect sampler, vec2 coord);
+vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);
+vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);
+
+vec4 shadow2DRect(sampler2DRectShadow sampler, vec3 coord);
+vec4 shadow2DRectProj(sampler2DRectShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/EXT_texture_array.frag b/src/glsl/builtins/profiles/EXT_texture_array.frag
new file mode 100644
index 0000000000..d133132191
--- /dev/null
+++ b/src/glsl/builtins/profiles/EXT_texture_array.frag
@@ -0,0 +1,11 @@
+#extension GL_EXT_texture_array : enable
+vec4 texture1DArray(sampler1DArray sampler, vec2 coord);
+vec4 texture1DArray(sampler1DArray sampler, vec2 coord, float bias);
+
+vec4 texture2DArray(sampler1DArray sampler, vec2 coord);
+vec4 texture2DArray(sampler1DArray sampler, vec2 coord, float bias);
+
+vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord);
+vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord, float bias);
+
+vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/EXT_texture_array.vert b/src/glsl/builtins/profiles/EXT_texture_array.vert
new file mode 100644
index 0000000000..4f7b2b5f8b
--- /dev/null
+++ b/src/glsl/builtins/profiles/EXT_texture_array.vert
@@ -0,0 +1,11 @@
+#extension GL_EXT_texture_array : enable
+vec4 texture1DArray(sampler1DArray sampler, vec2 coord);
+vec4 texture1DArrayLod(sampler1DArray sampler, vec2 coord, float lod);
+
+vec4 texture2DArray(sampler1DArray sampler, vec2 coord);
+vec4 texture2DArrayLod(sampler1DArray sampler, vec2 coord, float lod);
+
+vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord);
+vec4 shadow1DArrayLod(sampler1DArrayShadow sampler, vec3 coord, float lod);
+
+vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/tools/builtin_function.cpp b/src/glsl/builtins/tools/builtin_function.cpp
new file mode 100644
index 0000000000..c44804f2ef
--- /dev/null
+++ b/src/glsl/builtins/tools/builtin_function.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include "glsl_parser_extras.h"
+
+/* A dummy file. When compiling prototypes, we don't care about builtins.
+ * We really don't want to half-compile builtin_functions.cpp and fail, though.
+ */
+void
+_mesa_glsl_release_functions(void)
+{
+}
+
+void
+_mesa_glsl_initialize_functions(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+}
diff --git a/src/glsl/builtins/tools/generate_builtins.pl b/src/glsl/builtins/tools/generate_builtins.pl
deleted file mode 100755
index 91ef8917b0..0000000000
--- a/src/glsl/builtins/tools/generate_builtins.pl
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env perl
-
-sub process_version {
- my ($version) = @_;
- my @vars;
- print "/* $version builtins */\n\n";
-
- my @files = <builtins/$version/*>;
- foreach $file (@files) {
- push(@vars, process_file($file));
- }
-
- print "static const char *functions_for_$version [] = {\n";
- foreach $var (@vars) {
- print " $var,\n";
- }
- print "};\n\n"
-}
-
-sub process_file {
- my ($file) = @_;
-
- # Change from builtins/110/foo to builtins_110_foo
- my $var = $file; $var =~ s!/!_!g;
-
- print "static const char *$var = {\n";
- open SRC, "<", "$file" or die $!;
- while (<SRC>) {
- s/\\/\\\\/g;
- s/\"/\\\"/g;
- s/\n/\\n/g;
- print " \"$_\"\n";
- }
- print "};\n\n";
- close SRC or die $!;
- return $var;
-}
-
-print << 'EOF';
-/* DO NOT MODIFY - automatically generated by generate_builtins.pl */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-#include "main/compiler.h"
-#include "glsl_parser_extras.h"
-#include "ir_reader.h"
-#include "program.h"
-
-extern "C" struct gl_shader *
-_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
-
-gl_shader *
-read_builtins(GLenum target, const char **functions, unsigned count)
-{
- gl_shader *sh = _mesa_new_shader(NULL, 0, target);
- struct _mesa_glsl_parse_state *st =
- new(sh) _mesa_glsl_parse_state(NULL, target, sh);
-
- st->language_version = 130;
- st->ARB_texture_rectangle_enable = true;
- st->EXT_texture_array_enable = true;
- _mesa_glsl_initialize_types(st);
-
- sh->ir = new(sh) exec_list;
- sh->symbols = st->symbols;
-
- for (unsigned i = 0; i < count; i++) {
- _mesa_glsl_read_ir(st, sh->ir, functions[i]);
-
- if (st->error) {
- printf("error reading builtin: %.35s ...\n", functions[i]);
- delete st;
- talloc_free(sh);
- return NULL;
- }
- }
-
- reparent_ir(sh->ir, sh);
- delete st;
-
- return sh;
-}
-
-EOF
-
-@versions = sort(<builtins/[1-9A-Z]*>);
-foreach $version (@versions) {
- $version =~ s!builtins/!!g;
- process_version($version);
-}
-
-print << 'EOF';
-void *builtin_mem_ctx = NULL;
-
-void
-_mesa_glsl_release_functions(void)
-{
- talloc_free(builtin_mem_ctx);
-}
-
-void
-_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- if (builtin_mem_ctx == NULL)
- builtin_mem_ctx = talloc_init("GLSL built-in functions");
-
- state->num_builtins_to_link = 0;
-EOF
-
-foreach $version_xs (@versions) {
- $check = "";
- if ($version_xs =~ /_vs/) {
- $check = "state->target == vertex_shader && ";
- } elsif ($version_xs =~ /_fs/) {
- $check = "state->target == fragment_shader && ";
- }
- $version = $version_xs;
- $version =~ s/_[vf]s//g;
-
- if ($version =~ /^[1-9][0-9][0-9]/) {
- $check = "${check}state->language_version >= $version";
- } else {
- # Not a version...an extension name
- $check = "${check}state->${version}_enable";
- }
- print " if ($check) {\n";
- print " static gl_shader *sh = NULL;\n";
- print "\n";
- print " if (sh == NULL) {\n";
- print " sh = read_builtins(GL_VERTEX_SHADER, functions_for_$version_xs,\n";
- print " Elements(functions_for_$version_xs));\n";
- print " talloc_steal(builtin_mem_ctx, sh);\n";
- print " }\n";
- print "\n";
- print " import_prototypes(sh->ir, instructions, state->symbols, state);\n";
- print " state->builtins_to_link[state->num_builtins_to_link] = sh;\n";
- print " state->num_builtins_to_link++;\n";
- print " }\n";
- print "\n";
-}
-
-print "}\n";
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
new file mode 100755
index 0000000000..2eb67e398a
--- /dev/null
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -0,0 +1,207 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+
+import re, glob, sys
+from os import path
+from subprocess import Popen, PIPE
+
+# Local module: generator for texture lookup builtins
+from texture_builtins import generate_texture_functions
+
+builtins_dir = path.join(path.dirname(path.abspath(__file__)), "..")
+
+# Read the files in builtins/ir/*...add them to the supplied dictionary.
+def read_ir_files(fs):
+ for filename in glob.glob(path.join(path.join(builtins_dir, 'ir'), '*')):
+ with open(filename) as f:
+ fs[path.basename(filename)] = f.read()
+
+# Return a dictionary containing all builtin definitions (even generated)
+def get_builtin_definitions():
+ fs = {}
+ generate_texture_functions(fs)
+ read_ir_files(fs)
+ return fs
+
+def stringify(s):
+ t = s.replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n"\n "')
+ return ' "' + t + '"\n'
+
+def write_function_definitions():
+ fs = get_builtin_definitions()
+ for k, v in fs.iteritems():
+ print 'static const char *builtin_' + k + ' ='
+ print stringify(v), ';'
+
+def run_compiler(args):
+ compiler_path = path.join(path.join(builtins_dir, '..'), 'glsl_compiler')
+ command = [compiler_path, '--dump-lir'] + args
+ p = Popen(command, 1, stdout=PIPE, shell=False)
+ output = p.communicate()[0]
+ return (output, p.returncode)
+
+def write_profile(filename, profile):
+ (proto_ir, returncode) = run_compiler([filename])
+
+ if returncode != 0:
+ print '#error builtins profile', profile, 'failed to compile'
+ return
+
+ # Kill any global variable declarations. We don't want them.
+ kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE);
+ proto_ir = kill_globals.sub('', proto_ir)
+
+ print 'static const char *prototypes_for_' + profile + ' ='
+ print stringify(proto_ir), ';'
+
+ # Print a table of all the functions (not signatures) referenced.
+ # This is done so we can avoid bothering with a hash table in the C++ code.
+
+ function_names = set()
+ for func in re.finditer(r'\(function (.+)\n', proto_ir):
+ function_names.add(func.group(1))
+
+ print 'static const char *functions_for_' + profile + ' [] = {'
+ for func in function_names:
+ print ' builtin_' + func + ','
+ print '};'
+
+def write_profiles():
+ profiles = get_profile_list()
+ for (filename, profile) in profiles:
+ write_profile(filename, profile)
+
+def get_profile_list():
+ profiles = []
+ for pfile in glob.glob(path.join(path.join(builtins_dir, 'profiles'), '*')):
+ profiles.append((pfile, path.basename(pfile).replace('.', '_')))
+ return profiles
+
+if __name__ == "__main__":
+ print """/* DO NOT MODIFY - automatically generated by generate_builtins.py */
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include "main/compiler.h"
+#include "glsl_parser_extras.h"
+#include "ir_reader.h"
+#include "program.h"
+#include "ast.h"
+
+extern "C" struct gl_shader *
+_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
+
+gl_shader *
+read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
+{
+ gl_shader *sh = _mesa_new_shader(NULL, 0, target);
+ struct _mesa_glsl_parse_state *st =
+ new(sh) _mesa_glsl_parse_state(NULL, target, sh);
+
+ st->language_version = 130;
+ st->ARB_texture_rectangle_enable = true;
+ st->EXT_texture_array_enable = true;
+ _mesa_glsl_initialize_types(st);
+
+ sh->ir = new(sh) exec_list;
+ sh->symbols = st->symbols;
+
+ /* Read the IR containing the prototypes */
+ _mesa_glsl_read_ir(st, sh->ir, protos, true);
+
+ /* Read ALL the function bodies, telling the IR reader not to scan for
+ * prototypes (we've already created them). The IR reader will skip any
+ * signature that does not already exist as a prototype.
+ */
+ for (unsigned i = 0; i < count; i++) {
+ _mesa_glsl_read_ir(st, sh->ir, functions[i], false);
+
+ if (st->error) {
+ printf("error reading builtin: %.35s ...\\n", functions[i]);
+ talloc_free(sh);
+ return NULL;
+ }
+ }
+
+ reparent_ir(sh->ir, sh);
+ delete st;
+
+ return sh;
+}
+"""
+
+ write_function_definitions()
+ write_profiles()
+
+ print """
+void *builtin_mem_ctx = NULL;
+
+void
+_mesa_glsl_release_functions(void)
+{
+ talloc_free(builtin_mem_ctx);
+}
+
+void
+_mesa_glsl_initialize_functions(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ if (builtin_mem_ctx == NULL)
+ builtin_mem_ctx = talloc_init("GLSL built-in functions");
+
+ state->num_builtins_to_link = 0;
+"""
+
+ profiles = get_profile_list()
+ for (filename, profile) in profiles:
+ if profile.endswith('_vert'):
+ check = 'state->target == vertex_shader && '
+ elif profile.endswith('_frag'):
+ check = 'state->target == fragment_shader && '
+
+ version = re.sub(r'_(vert|frag)$', '', profile)
+ if version.isdigit():
+ check += 'state->language_version == ' + version
+ else: # an extension name
+ check += 'state->' + version + '_enable'
+
+ print ' if (' + check + ') {'
+ print ' static gl_shader *sh = NULL;'
+ print ' if (sh == NULL) {'
+ print ' sh = read_builtins(GL_VERTEX_SHADER,'
+ print ' prototypes_for_' + profile + ','
+ print ' functions_for_' + profile + ','
+ print ' Elements(functions_for_' + profile,
+ print '));'
+ print ' talloc_steal(builtin_mem_ctx, sh);'
+ print ' }'
+ print
+ print ' import_prototypes(sh->ir, instructions, state->symbols,'
+ print ' state);'
+ print ' state->builtins_to_link[state->num_builtins_to_link] = sh;'
+ print ' state->num_builtins_to_link++;'
+ print ' }'
+ print
+ print '}'
+
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index 33d9642ef7..8bf708b5aa 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
-from os import path
import sys
+import StringIO
def vec_type(g, size):
if size == 1:
@@ -95,204 +95,255 @@ def generate_fiu_sigs(tex_inst, sampler_type, use_proj = False, unused_fields =
generate_sigs("i", tex_inst, sampler_type, use_proj, unused_fields)
generate_sigs("u", tex_inst, sampler_type, use_proj, unused_fields)
-builtins_dir = path.join(path.dirname(path.abspath(__file__)), "..")
+def start_function(name):
+ sys.stdout = StringIO.StringIO()
+ print "((function " + name
-with open(path.join(builtins_dir, "130", "texture"), 'w') as sys.stdout:
- print "((function texture"
+def end_function(fs, name):
+ print "))"
+ fs[name] = sys.stdout.getvalue();
+ sys.stdout.close()
+
+# Generate all the functions and store them in the supplied dictionary.
+# This is better than writing them to actual files since they should never be
+# edited; it'd also be easy to confuse them with the many hand-generated files.
+#
+# Takes a dictionary as an argument.
+def generate_texture_functions(fs):
+ start_function("texture")
generate_fiu_sigs("tex", "1D")
generate_fiu_sigs("tex", "2D")
generate_fiu_sigs("tex", "3D")
generate_fiu_sigs("tex", "Cube")
generate_fiu_sigs("tex", "1DArray")
generate_fiu_sigs("tex", "2DArray")
- print "))"
-# txb variants are only allowed within a fragment shader (GLSL 1.30 p. 86)
-with open(path.join(builtins_dir, "130_fs", "texture"), 'w') as sys.stdout:
- print "((function texture"
generate_fiu_sigs("txb", "1D")
generate_fiu_sigs("txb", "2D")
generate_fiu_sigs("txb", "3D")
generate_fiu_sigs("txb", "Cube")
generate_fiu_sigs("txb", "1DArray")
generate_fiu_sigs("txb", "2DArray")
- print "))"
+ end_function(fs, "texture")
-with open(path.join(builtins_dir, "130", "textureProj"), 'w') as sys.stdout:
- print "((function textureProj"
+ start_function("textureProj")
generate_fiu_sigs("tex", "1D", True)
generate_fiu_sigs("tex", "1D", True, 2)
generate_fiu_sigs("tex", "2D", True)
generate_fiu_sigs("tex", "2D", True, 1)
generate_fiu_sigs("tex", "3D", True)
- print "))"
-with open(path.join(builtins_dir, "130_fs", "textureProj"), 'w') as sys.stdout:
- print "((function textureProj"
generate_fiu_sigs("txb", "1D", True)
generate_fiu_sigs("txb", "1D", True, 2)
generate_fiu_sigs("txb", "2D", True)
generate_fiu_sigs("txb", "2D", True, 1)
generate_fiu_sigs("txb", "3D", True)
- print "))"
+ end_function(fs, "textureProj")
-with open(path.join(builtins_dir, "130", "textureLod"), 'w') as sys.stdout:
- print "((function textureLod"
+ start_function("textureLod")
generate_fiu_sigs("txl", "1D")
generate_fiu_sigs("txl", "2D")
generate_fiu_sigs("txl", "3D")
generate_fiu_sigs("txl", "Cube")
generate_fiu_sigs("txl", "1DArray")
generate_fiu_sigs("txl", "2DArray")
- print "))"
+ end_function(fs, "textureLod")
-with open(path.join(builtins_dir, "130", "texelFetch"), 'w') as sys.stdout:
- print "((function texelFetch"
+ start_function("texelFetch")
generate_fiu_sigs("txf", "1D")
generate_fiu_sigs("txf", "2D")
generate_fiu_sigs("txf", "3D")
generate_fiu_sigs("txf", "1DArray")
generate_fiu_sigs("txf", "2DArray")
- print "))"
+ end_function(fs, "texelFetch")
-with open(path.join(builtins_dir, "130", "textureProjLod"), 'w') as sys.stdout:
- print "((function textureProjLod"
+ start_function("textureProjLod")
generate_fiu_sigs("txl", "1D", True)
generate_fiu_sigs("txl", "1D", True, 2)
generate_fiu_sigs("txl", "2D", True)
generate_fiu_sigs("txl", "2D", True, 1)
generate_fiu_sigs("txl", "3D", True)
- print "))"
+ end_function(fs, "textureProjLod")
-with open(path.join(builtins_dir, "130", "textureGrad"), 'w') as sys.stdout:
- print "((function textureGrad"
+ start_function("textureGrad")
generate_fiu_sigs("txd", "1D")
generate_fiu_sigs("txd", "2D")
generate_fiu_sigs("txd", "3D")
generate_fiu_sigs("txd", "Cube")
generate_fiu_sigs("txd", "1DArray")
generate_fiu_sigs("txd", "2DArray")
- print ")\n)"
+ end_function(fs, "textureGrad")
-with open(path.join(builtins_dir, "130", "textureProjGrad"), 'w') as sys.stdout:
- print "((function textureProjGrad"
+ start_function("textureProjGrad")
generate_fiu_sigs("txd", "1D", True)
generate_fiu_sigs("txd", "1D", True, 2)
generate_fiu_sigs("txd", "2D", True)
generate_fiu_sigs("txd", "2D", True, 1)
generate_fiu_sigs("txd", "3D", True)
- print "))"
+ end_function(fs, "textureProjGrad")
-# ARB_texture_rectangle extension
-with open(path.join(builtins_dir, "ARB_texture_rectangle", "textures"), 'w') as sys.stdout:
- print "((function texture2DRect"
+ # ARB_texture_rectangle extension
+ start_function("texture2DRect")
generate_sigs("", "tex", "2DRect")
- print ")\n (function shadow2DRect"
+ end_function(fs, "texture2DRect")
+
+ start_function("texture2DRectProj")
+ generate_sigs("", "tex", "2DRect", True)
+ generate_sigs("", "tex", "2DRect", True, 1)
+ end_function(fs, "texture2DRectProj")
+
+ start_function("shadow2DRect")
generate_sigs("", "tex", "2DRectShadow")
- print "))"
+ end_function(fs, "shadow2DRect")
-# EXT_texture_array extension
-with open(path.join(builtins_dir, "EXT_texture_array", "textures"), 'w') as sys.stdout:
- print "((function texture1DArray"
+ start_function("shadow2DRectProj")
+ generate_sigs("", "tex", "2DRectShadow", True)
+ end_function(fs, "shadow2DRectProj")
+
+ # EXT_texture_array extension
+ start_function("texture1DArray")
generate_sigs("", "tex", "1DArray")
- print ")\n (function texture1DArrayLod"
+ generate_sigs("", "txb", "1DArray")
+ end_function(fs, "texture1DArray")
+
+ start_function("texture1DArrayLod")
generate_sigs("", "txl", "1DArray")
- print ")\n (function texture2DArray"
+ end_function(fs, "texture1DArrayLod")
+
+ start_function("texture2DArray")
generate_sigs("", "tex", "2DArray")
- print ")\n (function texture2DArrayLod"
+ generate_sigs("", "txb", "2DArray")
+ end_function(fs, "texture2DArray")
+
+ start_function("texture2DArrayLod")
generate_sigs("", "txl", "2DArray")
- print ")\n (function shadow1DArray"
+ end_function(fs, "texture2DArrayLod")
+
+ start_function("shadow1DArray")
generate_sigs("", "tex", "1DArrayShadow")
- print ")\n (function shadow1DArrayLod"
+ generate_sigs("", "txb", "1DArrayShadow")
+ end_function(fs, "shadow1DArray")
+
+ start_function("shadow1DArrayLod")
generate_sigs("", "txl", "1DArrayShadow")
- print ")\n (function shadow2DArray"
- generate_sigs("", "tex", "2DArrayShadow")
- print "))"
+ end_function(fs, "shadow1DArrayLod")
-with open(path.join(builtins_dir, "EXT_texture_array_fs", "textures"), 'w') as sys.stdout:
- print "((function texture1DArray"
- generate_sigs("", "txb", "1DArray")
- print ")\n (function texture2DArray"
- generate_sigs("", "txb", "2DArray")
- print ")\n (function shadow1DArray"
- generate_sigs("", "txb", "1DArrayShadow")
- print "))"
+ start_function("shadow2DArray")
+ generate_sigs("", "tex", "2DArrayShadow")
+ end_function(fs, "shadow2DArray")
-# Deprecated (110/120 style) functions with silly names:
-with open(path.join(builtins_dir, "110", "textures"), 'w') as sys.stdout:
- print "((function texture1D"
+ # Deprecated (110/120 style) functions with silly names:
+ start_function("texture1D")
generate_sigs("", "tex", "1D")
- print ")\n (function texture1DLod"
+ generate_sigs("", "txb", "1D")
+ end_function(fs, "texture1D")
+
+ start_function("texture1DLod")
generate_sigs("", "txl", "1D")
- print ")\n (function texture1DProj"
+ end_function(fs, "texture1DLod")
+
+ start_function("texture1DProj")
generate_sigs("", "tex", "1D", True)
generate_sigs("", "tex", "1D", True, 2)
- print ")\n (function texture1DProjLod"
+ generate_sigs("", "txb", "1D", True)
+ generate_sigs("", "txb", "1D", True, 2)
+ end_function(fs, "texture1DProj")
+
+ start_function("texture1DProjLod")
generate_sigs("", "txl", "1D", True)
generate_sigs("", "txl", "1D", True, 2)
- print ")\n (function texture2D"
+ end_function(fs, "texture1DProjLod")
+
+ start_function("texture2D")
generate_sigs("", "tex", "2D")
- print ")\n(function texture2DLod"
+ generate_sigs("", "txb", "2D")
+ end_function(fs, "texture2D")
+
+ start_function("texture2DLod")
generate_sigs("", "txl", "2D")
- print ")\n (function texture2DProj"
+ end_function(fs, "texture2DLod")
+
+ start_function("texture2DProj")
generate_sigs("", "tex", "2D", True)
generate_sigs("", "tex", "2D", True, 1)
- print ")\n (function texture2DProjLod"
+ generate_sigs("", "txb", "2D", True)
+ generate_sigs("", "txb", "2D", True, 1)
+ end_function(fs, "texture2DProj")
+
+ start_function("texture2DProjLod")
generate_sigs("", "txl", "2D", True)
generate_sigs("", "txl", "2D", True, 1)
- print ")\n (function texture3D"
+ end_function(fs, "texture2DProjLod")
+
+ start_function("texture3D")
generate_sigs("", "tex", "3D")
- print ")\n (function texture3DLod"
+ generate_sigs("", "txb", "3D")
+ end_function(fs, "texture3D")
+
+ start_function("texture3DLod")
generate_sigs("", "txl", "3D")
- print ")\n (function texture3DProj"
+ end_function(fs, "texture3DLod")
+
+ start_function("texture3DProj")
generate_sigs("", "tex", "3D", True)
- print ")\n (function texture3DProjLod"
+ generate_sigs("", "txb", "3D", True)
+ end_function(fs, "texture3DProj")
+
+ start_function("texture3DProjLod")
generate_sigs("", "txl", "3D", True)
- print ")\n (function textureCube"
+ end_function(fs, "texture3DProjLod")
+
+ start_function("textureCube")
generate_sigs("", "tex", "Cube")
- print ")\n (function textureCubeLod"
+ generate_sigs("", "txb", "Cube")
+ end_function(fs, "textureCube")
+
+ start_function("textureCubeLod")
generate_sigs("", "txl", "Cube")
- print ")\n (function shadow1D"
+ end_function(fs, "textureCubeLod")
+
+ start_function("shadow1D")
generate_sigs("", "tex", "1DShadow", False, 1)
- print ")\n (function shadow1DLod"
+ generate_sigs("", "txb", "1DShadow", False, 1)
+ end_function(fs, "shadow1D")
+
+ start_function("shadow1DLod")
generate_sigs("", "txl", "1DShadow", False, 1)
- print ")\n (function shadow1DProj"
+ end_function(fs, "shadow1DLod")
+
+ start_function("shadow1DProj")
generate_sigs("", "tex", "1DShadow", True, 1)
- print ")\n (function shadow1DProjLod"
+ generate_sigs("", "txb", "1DShadow", True, 1)
+ end_function(fs, "shadow1DProj")
+
+ start_function("shadow1DProjLod")
generate_sigs("", "txl", "1DShadow", True, 1)
- print ")\n (function shadow2D"
+ end_function(fs, "shadow1DProjLod")
+
+ start_function("shadow2D")
generate_sigs("", "tex", "2DShadow")
- print ")\n (function shadow2DLod"
+ generate_sigs("", "txb", "2DShadow")
+ end_function(fs, "shadow2D")
+
+ start_function("shadow2DLod")
generate_sigs("", "txl", "2DShadow")
- print ")\n (function shadow2DProj"
+ end_function(fs, "shadow2DLod")
+
+ start_function("shadow2DProj")
generate_sigs("", "tex", "2DShadow", True)
- print ")\n (function shadow2DProjLod"
+ generate_sigs("", "txb", "2DShadow", True)
+ end_function(fs, "shadow2DProj")
+
+ start_function("shadow2DProjLod")
generate_sigs("", "txl", "2DShadow", True)
- print "))"
+ end_function(fs, "shadow2DProjLod")
-with open(path.join(builtins_dir, "110_fs", "textures"), 'w') as sys.stdout:
- print "((function texture1D"
- generate_sigs("", "txb", "1D")
- print ")\n (function texture1DProj"
- generate_sigs("", "txb", "1D", True)
- generate_sigs("", "txb", "1D", True, 2)
- print ")\n (function texture2D"
- generate_sigs("", "txb", "2D")
- print ")\n (function texture2DProj"
- generate_sigs("", "txb", "2D", True)
- generate_sigs("", "txb", "2D", True, 1)
- print ")\n (function texture3D"
- generate_sigs("", "txb", "3D")
- print ")\n (function texture3DProj"
- generate_sigs("", "txb", "3D", True)
- print ")\n (function textureCube"
- generate_sigs("", "txb", "Cube")
- print ")\n (function shadow1D"
- generate_sigs("", "txb", "1DShadow", False, 1)
- print ")\n (function shadow1DProj"
- generate_sigs("", "txb", "1DShadow", True, 1)
- print ")\n (function shadow2D"
- generate_sigs("", "txb", "2DShadow")
- print ")\n (function shadow2DProj"
- generate_sigs("", "txb", "2DShadow", True)
- print "))"
+ sys.stdout = sys.__stdout__
+ return fs
+
+# If you actually run this script, it'll print out all the functions.
+if __name__ == "__main__":
+ fs = {}
+ generate_texture_functions(fs);
+ for k, v in fs.iteritems():
+ print v
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 2def3efff5..3e221c0e5f 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -68,7 +68,7 @@ static ir_dereference *read_record_ref(_mesa_glsl_parse_state *, s_list *);
void
_mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
- const char *src)
+ const char *src, bool scan_for_protos)
{
s_expression *expr = s_expression::read_expression(state, src);
if (expr == NULL) {
@@ -76,9 +76,11 @@ _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
return;
}
- scan_for_prototypes(state, instructions, expr);
- if (state->error)
- return;
+ if (scan_for_protos) {
+ scan_for_prototypes(state, instructions, expr);
+ if (state->error)
+ return;
+ }
read_instructions(state, instructions, expr, NULL);
talloc_free(expr);
@@ -276,7 +278,12 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
}
ir_function_signature *sig = f->exact_matching_signature(&hir_parameters);
- if (sig != NULL) {
+ if (sig == NULL && skip_body) {
+ /* If scanning for prototypes, generate a new signature. */
+ sig = new(ctx) ir_function_signature(return_type);
+ sig->is_built_in = true;
+ f->add_signature(sig);
+ } else if (sig != NULL) {
const char *badvar = sig->qualifiers_match(&hir_parameters);
if (badvar != NULL) {
ir_read_error(st, list, "function `%s' parameter `%s' qualifiers "
@@ -290,10 +297,11 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
return;
}
} else {
- sig = new(ctx) ir_function_signature(return_type);
- sig->is_built_in = true;
- f->add_signature(sig);
+ /* No prototype for this body exists - skip it. */
+ st->symbols->pop_scope();
+ return;
}
+ assert(sig != NULL);
sig->replace_parameters(&hir_parameters);
diff --git a/src/glsl/ir_reader.h b/src/glsl/ir_reader.h
index b6afdc81ab..aef2ca23bd 100644
--- a/src/glsl/ir_reader.h
+++ b/src/glsl/ir_reader.h
@@ -29,6 +29,6 @@
#include "ir.h"
void _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
- const char *src);
+ const char *src, bool scan_for_prototypes);
#endif /* IR_READER_H */