diff options
author | Kenneth Graunke <[email protected]> | 2010-07-22 16:52:32 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-07-22 16:54:19 -0700 |
commit | 0b8e5f384c75b56bf2ee34c317bb9d06095c798b (patch) | |
tree | e54c79dd9268fa9a77b2b21813ba06df5ed429cd /src/glsl/builtins | |
parent | 5304c251fcceca40096d69002efcf1a122df259d (diff) |
glsl2/builtins: Add 1.30 bvec variant of the "mix" builtin.
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r-- | src/glsl/builtins/130/mix | 39 |
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 00000000000..9a1fcd70ffa --- /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)))) +)) |