/* 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 #include "glsl_parser_extras.h" #include "ir_reader.h" void read_builtins(_mesa_glsl_parse_state *st, exec_list *instructions, const char **functions, unsigned count) { if (st->error) return; for (unsigned i = 0; i < count; i++) { _mesa_glsl_read_ir(st, instructions, functions[i]); if (st->error) { printf("error reading builtin: %.35s ...\n", functions[i]); return; } } } /* Version 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 = { "((function all\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 bool\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" "\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_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 bool\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" "\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_ceil = { "((function ceil\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float ceil (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 ceil (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\n" " (declare (in) vec3 arg0))\n" " ((return (expression vec3 ceil (var_ref arg0)))))\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" "\n" " (signature vec2\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" "\n" " (signature vec3\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" "\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" "))\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" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 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 * (var_ref arg0) (constant float (57.295780))))))\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_dot = { "((function dot\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" "\n" " (signature float\n" " (parameters\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 *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 float == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float == (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 float == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float == (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 float == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float == (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 int == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int == (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 int == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int == (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 int == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int == (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" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 exp (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\n" " (declare (in) vec3 arg0))\n" " ((return (expression vec3 exp (var_ref arg0)))))\n" "\n" " (signature vec4\n" " (parameters\n" " (declare (in) vec4 arg0))\n" " ((return (expression vec4 exp (var_ref arg0)))))\n" "))\n" }; static const char *builtins_110_exp2 = { "((function exp2\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float exp2 (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 exp2 (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\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_110_floor = { "((function floor\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float floor (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\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) vec4 arg0))\n" " ((return (expression vec4 floor (var_ref arg0)))))\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 float > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float > (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 float > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float > (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 float > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float > (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 int > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int > (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 int > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int > (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 int > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int > (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" " (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 float >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float >= (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 float >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float >= (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 float >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float >= (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 int >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int >= (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 int >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int >= (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 int >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int >= (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" " (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 *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" "\n" " (signature float\n" " (parameters\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_110_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 float < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float < (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 float < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float < (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 float < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float < (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 int < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int < (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 int < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int < (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 int < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int < (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" " (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 float <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float <= (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 float <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float <= (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 float <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float <= (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 int <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int <= (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 int <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int <= (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 int <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int <= (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" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float log (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 log (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\n" " (declare (in) vec3 arg0))\n" " ((return (expression vec3 log (var_ref arg0)))))\n" "\n" " (signature vec4\n" " (parameters\n" " (declare (in) vec4 arg0))\n" " ((return (expression vec4 log (var_ref arg0)))))\n" "))\n" }; static const char *builtins_110_log2 = { "((function log2\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float log2 (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 log2 (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\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_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" }; 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" "\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" }; static const char *builtins_110_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 vec2\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" "\n" " (signature vec3\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" " (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" }; static const char *builtins_110_mod = { "((function mod\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0)\n" " (declare (in) float arg1))\n" " ((return (expression float % (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 % (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 % (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 % (var_ref arg0) (var_ref arg1)))))\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 float != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float != (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 float != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float != (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 float != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression float != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression float != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression float != (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 int != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int != (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 int != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int != (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 int != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression int != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression int != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression int != (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 = { "((function radians\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float * (var_ref arg0) (constant float (0.017453))))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 * (var_ref arg0) (constant float (0.017453))))))\n" "\n" " (signature vec3\n" " (parameters\n" " (declare (in) vec3 arg0))\n" " ((return (expression vec3 * (var_ref arg0) (constant float (0.017453))))))\n" "\n" " (signature vec4\n" " (parameters\n" " (declare (in) vec4 arg0))\n" " ((return (expression vec4 * (var_ref arg0) (constant float (0.017453))))))\n" "))\n" }; static const char *builtins_110_sqrt = { "((function sqrt\n" " (signature float\n" " (parameters\n" " (declare (in) float arg0))\n" " ((return (expression float sqrt (var_ref arg0)))))\n" "\n" " (signature vec2\n" " (parameters\n" " (declare (in) vec2 arg0))\n" " ((return (expression vec2 sqrt (var_ref arg0)))))\n" "\n" " (signature vec3\n" " (parameters\n" " (declare (in) vec3 arg0))\n" " ((return (expression vec3 sqrt (var_ref arg0)))))\n" "\n" " (signature vec4\n" " (parameters\n" " (declare (in) vec4 arg0))\n" " ((return (expression vec4 sqrt (var_ref arg0)))))\n" "))\n" }; static const char *functions_for_110 [] = { builtins_110_abs, builtins_110_all, builtins_110_any, builtins_110_ceil, builtins_110_clamp, builtins_110_degrees, builtins_110_dot, builtins_110_equal, builtins_110_exp, builtins_110_exp2, builtins_110_floor, 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_max, builtins_110_min, builtins_110_mix, builtins_110_mod, builtins_110_normalize, builtins_110_not, builtins_110_notEqual, builtins_110_pow, builtins_110_radians, builtins_110_sqrt, }; /* Version 130 builtins */ static const char *builtins_130_equal = { "((function equal\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 uint == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint == (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 uint == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint == (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 uint == (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint == (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint == (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint == (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" " (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 uint > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint > (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 uint > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint > (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 uint > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint > (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" " (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 uint >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint >= (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 uint >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint >= (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 uint >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint >= (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" " (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 uint < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint < (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 uint < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint < (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 uint < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n" " (return (var_ref temp))))\n" "))\n" }; static const char *builtins_130_lessThanEqual = { "((function lessThanEqual\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 uint <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint <= (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 uint <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint <= (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 uint <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n" " (return (var_ref temp))))\n" "))\n" }; static const char *builtins_130_notEqual = { "((function notEqual\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 uint != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint != (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 uint != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint != (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 uint != (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz y (var_ref temp)) (expression uint != (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz z (var_ref temp)) (expression uint != (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) \n" " (assign (constant bool (1)) (swiz w (var_ref temp)) (expression uint != (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) \n" " (return (var_ref temp))))\n" "))\n" }; static const char *functions_for_130 [] = { builtins_130_equal, builtins_130_greaterThan, builtins_130_greaterThanEqual, builtins_130_lessThan, builtins_130_lessThanEqual, builtins_130_notEqual, }; void _mesa_glsl_initialize_functions(exec_list *instructions, struct _mesa_glsl_parse_state *state) { if (state->language_version >= 110) read_builtins(state, instructions, functions_for_110, sizeof(functions_for_110) / sizeof(const char *)); if (state->language_version >= 130) read_builtins(state, instructions, functions_for_130, sizeof(functions_for_130) / sizeof(const char *)); }