aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_function.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-22 14:25:26 -0700
committerEric Anholt <[email protected]>2010-07-22 14:25:26 -0700
commite65dfa89eef86be127d788ecd5bd23c35c8fbbe4 (patch)
treedad1148347195064db7fad42fa2ed8befde7928a /src/glsl/builtin_function.cpp
parent8ec0b8187ea695353c75eed7314e86344df60e5a (diff)
glsl2: Fix the type of (1.0 - arg2) for mix(gen, gen, float).
Previously, we'd constant-fold up a value of vec4(1.0 - arg2, 0, 0, 0). Fixes: glsl1-mix(vec4) function
Diffstat (limited to 'src/glsl/builtin_function.cpp')
-rw-r--r--src/glsl/builtin_function.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index 10e59e491e4..ae0eabcf778 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -1320,21 +1320,21 @@ static const char *builtins_110_mix = {
" (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"
+ " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (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"
+ " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (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"
+ " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
"))\n"
};