From e65dfa89eef86be127d788ecd5bd23c35c8fbbe4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 22 Jul 2010 14:25:26 -0700 Subject: 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 --- src/glsl/builtin_function.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/glsl/builtin_function.cpp') 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" }; -- cgit v1.2.3