aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins
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/builtins
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/builtins')
-rw-r--r--src/glsl/builtins/110/mix6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/builtins/110/mix b/src/glsl/builtins/110/mix
index 032f29e5fa8..8638d06887c 100644
--- a/src/glsl/builtins/110/mix
+++ b/src/glsl/builtins/110/mix
@@ -32,19 +32,19 @@
(declare (in) vec2 arg0)
(declare (in) vec2 arg1)
(declare (in) float arg2))
- ((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))))))
+ ((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))))))
(signature vec3
(parameters
(declare (in) vec3 arg0)
(declare (in) vec3 arg1)
(declare (in) float arg2))
- ((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))))))
+ ((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))))))
(signature vec4
(parameters
(declare (in) vec4 arg0)
(declare (in) vec4 arg1)
(declare (in) float arg2))
- ((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))))))
+ ((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))))))
))