gallium/auxiliary: Avoid double promotion.
authorMatt Turner <mattst88@gmail.com>
Mon, 13 Jul 2015 01:01:42 +0000 (18:01 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 29 Jul 2015 16:34:52 +0000 (09:34 -0700)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_format_rgb9e5.h
src/gallium/auxiliary/util/u_math.h

index 1c12a66..9e4b1d6 100644 (file)
@@ -75,7 +75,7 @@ typedef union {
 
 static inline float rgb9e5_ClampRange(float x)
 {
-   if (x > 0.0) {
+   if (x > 0.0f) {
       if (x >= MAX_RGB9E5) {
          return MAX_RGB9E5;
       } else {
index f5c409d..56bd185 100644 (file)
@@ -240,7 +240,7 @@ util_iround(float f)
 static inline boolean
 util_is_approx(float a, float b, float tol)
 {
-   return fabs(b - a) <= tol;
+   return fabsf(b - a) <= tol;
 }