diff options
Diffstat (limited to 'src/glsl/builtin_function.cpp')
-rw-r--r-- | src/glsl/builtin_function.cpp | 522 |
1 files changed, 279 insertions, 243 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index 1e633e3f3a8..f65f91f6b79 100644 --- a/src/glsl/builtin_function.cpp +++ b/src/glsl/builtin_function.cpp @@ -30,12 +30,12 @@ #include "ast.h" extern "C" struct gl_shader * -_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); +_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type); gl_shader * read_builtins(GLenum target, const char *protos, const char **functions, unsigned count) { - GLcontext fakeCtx; + struct gl_context fakeCtx; fakeCtx.API = API_OPENGL; gl_shader *sh = _mesa_new_shader(NULL, 0, target); struct _mesa_glsl_parse_state *st = @@ -787,73 +787,73 @@ static const char *builtin_equal = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) vec3 arg0)\n" " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) vec4 arg0)\n" " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) bvec2 arg0)\n" " (declare (in) bvec2 arg1))\n" - " ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) bvec3 arg0)\n" " (declare (in) bvec3 arg1))\n" - " ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) bvec4 arg0)\n" " (declare (in) bvec4 arg1))\n" - " ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) ivec2 arg0)\n" " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) ivec3 arg0)\n" " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) ivec4 arg0)\n" " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) uvec2 arg0)\n" " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) uvec3 arg0)\n" " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) uvec4 arg0)\n" " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -1044,91 +1044,55 @@ static const char *builtin_greaterThan = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((declare () bvec2 temp)\n" - " (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -1138,91 +1102,55 @@ static const char *builtin_greaterThanEqual = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((declare () bvec2 temp)\n" - " (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -1280,91 +1208,55 @@ static const char *builtin_lessThan = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((declare () bvec2 temp)\n" - " (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -1374,91 +1266,55 @@ static const char *builtin_lessThanEqual = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((declare () bvec2 temp)\n" - " (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\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)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n" - " (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n" - " (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n" - " (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n" - " (return (var_ref temp))))\n" + " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -2033,8 +1889,8 @@ static const char *builtin_noise2 = "\n" " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n" " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2047,8 +1903,8 @@ static const char *builtin_noise2 = "\n" " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n" " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2063,8 +1919,8 @@ static const char *builtin_noise2 = "\n" " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n" " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2079,8 +1935,8 @@ static const char *builtin_noise2 = "\n" " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n" " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" " (return (var_ref t))\n" " ))\n" "))\n" @@ -2100,9 +1956,9 @@ static const char *builtin_noise3 = " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b)))\n" - " (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" + " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2118,9 +1974,9 @@ static const char *builtin_noise3 = " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n" " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b)))\n" - " (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" + " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2136,9 +1992,9 @@ static const char *builtin_noise3 = " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n" " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b)))\n" - " (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" + " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n" " (return (var_ref t))\n" " ))\n" "\n" @@ -2154,9 +2010,9 @@ static const char *builtin_noise3 = " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n" " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a)))\n" - " (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b)))\n" - " (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c)))\n" + " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n" + " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n" + " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n" " (return (var_ref t))\n" " ))\n" "))\n" @@ -2181,10 +2037,10 @@ static const char *builtin_noise4 = " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n" " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x)))\n" - " (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y)))\n" - " (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z)))\n" - " (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w)))\n" + " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n" + " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n" + " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n" + " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n" " (return (var_ref _r))\n" " ))\n" "\n" @@ -2205,10 +2061,10 @@ static const char *builtin_noise4 = " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n" " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x)))\n" - " (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y)))\n" - " (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z)))\n" - " (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w)))\n" + " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n" + " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n" + " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n" + " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n" " (return (var_ref _r))\n" " ))\n" "\n" @@ -2229,10 +2085,10 @@ static const char *builtin_noise4 = " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n" " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x)))\n" - " (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y)))\n" - " (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z)))\n" - " (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w)))\n" + " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n" + " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n" + " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n" + " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n" " (return (var_ref _r))\n" " ))\n" "\n" @@ -2246,17 +2102,17 @@ static const char *builtin_noise4 = " (declare () vec4 _r)\n" "\n" " (declare () float _p)\n" - " (assign (constant bool (1)) (xy) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n" + " (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n" "\n" " (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n" " (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))\n" " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n" " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))\n" "\n" - " (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x)))\n" - " (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y)))\n" - " (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z)))\n" - " (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w)))\n" + " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n" + " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n" + " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n" + " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n" " (return (var_ref _r))\n" " ))\n" "))\n" @@ -2311,73 +2167,73 @@ static const char *builtin_notEqual = " (parameters\n" " (declare (in) vec2 arg0)\n" " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) vec3 arg0)\n" " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) vec4 arg0)\n" " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) bvec2 arg0)\n" " (declare (in) bvec2 arg1))\n" - " ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) bvec3 arg0)\n" " (declare (in) bvec3 arg1))\n" - " ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) bvec4 arg0)\n" " (declare (in) bvec4 arg1))\n" - " ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) ivec2 arg0)\n" " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) ivec3 arg0)\n" " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) ivec4 arg0)\n" " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec2\n" " (parameters\n" " (declare (in) uvec2 arg0)\n" " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec3\n" " (parameters\n" " (declare (in) uvec3 arg0)\n" " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" "\n" " (signature bvec4\n" " (parameters\n" " (declare (in) uvec4 arg0)\n" " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1)))))\n" + " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" "))\n" "" ; @@ -2694,6 +2550,54 @@ static const char *builtin_refract = "))\n" "" ; +static const char *builtin_round = + "((function round\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float arg0))\n" + " ((return (expression float round_even (var_ref arg0)))))\n" + "\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 arg0))\n" + " ((return (expression vec2 round_even (var_ref arg0)))))\n" + "\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 arg0))\n" + " ((return (expression vec3 round_even (var_ref arg0)))))\n" + "\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 arg0))\n" + " ((return (expression vec4 round_even (var_ref arg0)))))\n" + "))\n" + "" +; +static const char *builtin_roundEven = + "((function roundEven\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float arg0))\n" + " ((return (expression float round_even (var_ref arg0)))))\n" + "\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 arg0))\n" + " ((return (expression vec2 round_even (var_ref arg0)))))\n" + "\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 arg0))\n" + " ((return (expression vec3 round_even (var_ref arg0)))))\n" + "\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 arg0))\n" + " ((return (expression vec4 round_even (var_ref arg0)))))\n" + "))\n" + "" +; static const char *builtin_shadow1D = "((function shadow1D\n" " (signature vec4\n" @@ -4843,6 +4747,30 @@ static const char *builtin_transpose = "\n" "" ; +static const char *builtin_trunc = + "((function trunc\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float arg0))\n" + " ((return (expression float trunc (var_ref arg0)))))\n" + "\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 arg0))\n" + " ((return (expression vec2 trunc (var_ref arg0)))))\n" + "\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 arg0))\n" + " ((return (expression vec3 trunc (var_ref arg0)))))\n" + "\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 arg0))\n" + " ((return (expression vec4 trunc (var_ref arg0)))))\n" + "))\n" + "" +; static const char *prototypes_for_100_frag = "(\n" "(function radians\n" @@ -13370,6 +13298,57 @@ static const char *prototypes_for_130_frag = " (parameters\n" " (declare (in) vec4 x))\n" " ()))\n" + "(function trunc\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" + "(function round\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" + "(function roundEven\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" "(function ceil\n" " (signature float\n" " (parameters\n" @@ -15979,6 +15958,8 @@ static const char *functions_for_130_frag [] = { builtin_radians, builtin_reflect, builtin_refract, + builtin_round, + builtin_roundEven, builtin_shadow1D, builtin_shadow1DLod, builtin_shadow1DProj, @@ -16017,6 +15998,7 @@ static const char *functions_for_130_frag [] = { builtin_textureProjGrad, builtin_textureProjLod, builtin_transpose, + builtin_trunc, }; static const char *prototypes_for_130_vert = "(\n" @@ -16433,6 +16415,57 @@ static const char *prototypes_for_130_vert = " (parameters\n" " (declare (in) vec4 x))\n" " ()))\n" + "(function trunc\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" + "(function round\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" + "(function roundEven\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ())\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ())\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ())\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ()))\n" "(function ceil\n" " (signature float\n" " (parameters\n" @@ -18993,6 +19026,8 @@ static const char *functions_for_130_vert [] = { builtin_radians, builtin_reflect, builtin_refract, + builtin_round, + builtin_roundEven, builtin_shadow1D, builtin_shadow1DLod, builtin_shadow1DProj, @@ -19031,6 +19066,7 @@ static const char *functions_for_130_vert [] = { builtin_textureProjGrad, builtin_textureProjLod, builtin_transpose, + builtin_trunc, }; static const char *prototypes_for_ARB_texture_rectangle_frag = "(\n" |