summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-07-12 18:01:42 -0700
committerMatt Turner <[email protected]>2015-07-29 09:34:52 -0700
commit29ef7a9f19265308e7852c0f8920e0f520f08df3 (patch)
treee447c6605b01e58725c1d59482a05126b8f7564f /src/gallium
parent4251ccb47b79c719918e7c372aebb6b2d9719922 (diff)
gallium/auxiliary: Avoid double promotion.
Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_format_rgb9e5.h2
-rw-r--r--src/gallium/auxiliary/util/u_math.h2
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;
}