[Mesa-dev] [PATCH 06/13] gallium/auxiliary: Avoid double promotion.
Matt Turner
mattst88 at gmail.com
Mon Jul 13 16:22:08 PDT 2015
---
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 7a01f7f..d1ace3f 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 3b4040f..9c3cb6a 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.3.6
More information about the mesa-dev
mailing list