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 1c12a668d8143e21f6bafcdf527f2d07148cedb0..9e4b1d607d76f86d65d1f3c84b95a02b4a94571e 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 f5c409dbdf2cc8b8c3aee3de658b98d3c254af79..56bd185f52790600596a94bcca38a7ddf3646926 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;
 }