xa: fix compile warning for -Wabsolute-value

fixes a compile warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14302>
This commit is contained in:
Thomas H.P. Andersen 2021-12-25 18:24:05 +01:00 committed by Marge Bot
parent 8092d58e2e
commit 574c4466f8

View file

@ -35,7 +35,7 @@
#include "util/u_draw_quad.h"
#define floatsEqual(x, y) (fabsf(x - y) <= 0.00001f * MIN2(fabsf(x), fabsf(y)))
#define floatIsZero(x) (floatsEqual((x) + 1, 1))
#define floatIsZero(x) (floatsEqual((x) + 1.0f, 1.0f))
#define NUM_COMPONENTS 4
@ -49,7 +49,7 @@ static inline boolean
is_affine(const float *matrix)
{
return floatIsZero(matrix[2]) && floatIsZero(matrix[5])
&& floatsEqual(matrix[8], 1);
&& floatsEqual(matrix[8], 1.0f);
}
static inline void