From: Eric Anholt Date: Mon, 19 Jul 2010 17:31:03 +0000 (-0700) Subject: glsl2: Fix the expression type for atan's pi * sign(y). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=82d4b9593bd541b20771cddc1365add21dea6ba9;p=mesa.git glsl2: Fix the expression type for atan's pi * sign(y). Fixes CorrectFunction.vert. --- diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index b3a283306df..75e058c41c8 100644 --- a/src/glsl/builtin_function.cpp +++ b/src/glsl/builtin_function.cpp @@ -292,7 +292,7 @@ static const char *builtins_110_atan = { " (expression float +\n" " (var_ref r)\n" " (expression float *\n" - " (expression int sign (var_ref y))\n" + " (expression float sign (var_ref y))\n" " (constant float (3.1415926))))))\n" " ()))\n" " ())\n" @@ -318,7 +318,7 @@ static const char *builtins_110_atan = { " (expression vec2 +\n" " (var_ref r)\n" " (expression vec2 *\n" - " (expression int sign (var_ref y))\n" + " (expression float sign (var_ref y))\n" " (constant float (3.1415926))))))\n" " ()))\n" " ())\n" @@ -344,7 +344,7 @@ static const char *builtins_110_atan = { " (expression vec3 +\n" " (var_ref r)\n" " (expression vec3 *\n" - " (expression int sign (var_ref y))\n" + " (expression float sign (var_ref y))\n" " (constant float (3.1415926))))))\n" " ()))\n" " ())\n" @@ -370,7 +370,7 @@ static const char *builtins_110_atan = { " (expression vec4 +\n" " (var_ref r)\n" " (expression vec4 *\n" - " (expression int sign (var_ref y))\n" + " (expression float sign (var_ref y))\n" " (constant float (3.1415926))))))\n" " ()))\n" " ())\n" diff --git a/src/glsl/builtins/110/atan b/src/glsl/builtins/110/atan index e5542350b51..bcf75718e45 100644 --- a/src/glsl/builtins/110/atan +++ b/src/glsl/builtins/110/atan @@ -67,7 +67,7 @@ (expression float + (var_ref r) (expression float * - (expression int sign (var_ref y)) + (expression float sign (var_ref y)) (constant float (3.1415926)))))) ())) ()) @@ -93,7 +93,7 @@ (expression vec2 + (var_ref r) (expression vec2 * - (expression int sign (var_ref y)) + (expression float sign (var_ref y)) (constant float (3.1415926)))))) ())) ()) @@ -119,7 +119,7 @@ (expression vec3 + (var_ref r) (expression vec3 * - (expression int sign (var_ref y)) + (expression float sign (var_ref y)) (constant float (3.1415926)))))) ())) ()) @@ -145,7 +145,7 @@ (expression vec4 + (var_ref r) (expression vec4 * - (expression int sign (var_ref y)) + (expression float sign (var_ref y)) (constant float (3.1415926)))))) ())) ())