From 4bfdc8313592ec8a8794d6b7bc33a5c44df34ed4 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 4 Jun 2012 10:20:36 -0700 Subject: [PATCH] glsl: Fix pi/2 constant in acos built-in function In single precision, 1.5707963 becomes 1.5707962513 which is too small. However, 1.5707964 becomes 1.5707963705 which is just right. The value 1.5707964 is already used in asin.ir. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick Reviewed-by: Olivier Galibert Reviewed-by: Paul Berry --- src/glsl/builtins/ir/acos.ir | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/glsl/builtins/ir/acos.ir b/src/glsl/builtins/ir/acos.ir index f0078f884e7..8c3797e9677 100644 --- a/src/glsl/builtins/ir/acos.ir +++ b/src/glsl/builtins/ir/acos.ir @@ -4,26 +4,26 @@ (declare (in) float x)) ((declare () float s) (call asin (var_ref s) ((var_ref x))) - (return (expression float - (constant float (1.5707963)) (var_ref s))))) + (return (expression float - (constant float (1.5707964)) (var_ref s))))) (signature vec2 (parameters (declare (in) vec2 x)) ((declare () vec2 s) (call asin (var_ref s) ((var_ref x))) - (return (expression vec2 - (constant float (1.5707963)) (var_ref s))))) + (return (expression vec2 - (constant float (1.5707964)) (var_ref s))))) (signature vec3 (parameters (declare (in) vec3 x)) ((declare () vec3 s) (call asin (var_ref s) ((var_ref x))) - (return (expression vec3 - (constant float (1.5707963)) (var_ref s))))) + (return (expression vec3 - (constant float (1.5707964)) (var_ref s))))) (signature vec4 (parameters (declare (in) vec4 x)) ((declare () vec4 s) (call asin (var_ref s) ((var_ref x))) - (return (expression vec4 - (constant float (1.5707963)) (var_ref s))))) + (return (expression vec4 - (constant float (1.5707964)) (var_ref s))))) )) -- 2.30.2