summaryrefslogtreecommitdiff
path: root/builtin_function.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-19 13:05:01 -0700
committerEric Anholt <eric@anholt.net>2010-06-01 15:15:04 -0700
commitf03acfc7d7275b60418fec94f4a7044de486a05c (patch)
treec9e28a52180381da6bcc2e88bba8f02a8e0da1d6 /builtin_function.cpp
parent336b4ad8c76a525a0df2f4b0fc1d67e86bc5db3f (diff)
builtins: Add the mix(gentype, gentype, float) variant.
The broken-in-mesa Regnum Online shader now parses, except for its preprocessor usage.
Diffstat (limited to 'builtin_function.cpp')
-rw-r--r--builtin_function.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/builtin_function.cpp b/builtin_function.cpp
index 1d847a6..b7719ab 100644
--- a/builtin_function.cpp
+++ b/builtin_function.cpp
@@ -1118,6 +1118,27 @@ static const char *builtins_110_mix = {
" (declare (in) vec4 arg1)\n"
" (declare (in) vec4 arg2))\n"
" ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 arg0)\n"
+ " (declare (in) vec2 arg1)\n"
+ " (declare (in) float arg2))\n"
+ " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression 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) float 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) float 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"
};