summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/builtins/130/mix39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/glsl/builtins/130/mix b/src/glsl/builtins/130/mix
new file mode 100644
index 0000000000..9a1fcd70ff
--- /dev/null
+++ b/src/glsl/builtins/130/mix
@@ -0,0 +1,39 @@
+((function mix
+ (signature float
+ (parameters
+ (declare (in) float v1)
+ (declare (in) float v2)
+ (declare (in) bool a))
+ ((assign (var_ref a) (var_ref v1) (var_ref v2))
+ (return (var_ref v1))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 v1)
+ (declare (in) vec2 v2)
+ (declare (in) bvec2 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 v1)
+ (declare (in) vec3 v2)
+ (declare (in) bvec3 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 v1)
+ (declare (in) vec4 v2)
+ (declare (in) bvec4 a))
+ ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))
+ (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))
+ (return (var_ref v1))))
+))