From 29ef7a9f19265308e7852c0f8920e0f520f08df3 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 12 Jul 2015 18:01:42 -0700 Subject: [PATCH] gallium/auxiliary: Avoid double promotion. Reviewed-by: Iago Toral Quiroga Reviewed-by: Eric Anholt --- src/gallium/auxiliary/util/u_format_rgb9e5.h | 2 +- src/gallium/auxiliary/util/u_math.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h index 1c12a668d81..9e4b1d607d7 100644 --- a/src/gallium/auxiliary/util/u_format_rgb9e5.h +++ b/src/gallium/auxiliary/util/u_format_rgb9e5.h @@ -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 { diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index f5c409dbdf2..56bd185f527 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -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; } -- 2.30.2