aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/macros.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-27 15:09:52 +0200
committermarha <marha@users.sourceforge.net>2012-09-27 15:09:52 +0200
commit2cf1e3de4759264eac2fa8ac758ea750636542f8 (patch)
tree80298679c1f3134223c592ad3939739aee333eb8 /mesalib/src/mesa/main/macros.h
parent0ebcd32e91486caccc041c8ca23e39e160b24702 (diff)
downloadvcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.tar.gz
vcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.tar.bz2
vcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.zip
mesa xserver pixman xkeyboard-config git update 27 sep 2012
xserver 0b02150c27e98f996e10d7489f9f67a30e4e3497 pixman aff796d6cee4cb81f0352c2f7d0c994229bd5ca1 xkeyboard-config 33ccc8f4b3f1c6ae95242cf9cb19e8df87f6f37e mesa 6d6aef79742ece3bb570ae44e6c13791aae15e01
Diffstat (limited to 'mesalib/src/mesa/main/macros.h')
-rw-r--r--mesalib/src/mesa/main/macros.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h
index 04d59d79c..7b7fd1b6d 100644
--- a/mesalib/src/mesa/main/macros.h
+++ b/mesalib/src/mesa/main/macros.h
@@ -693,31 +693,14 @@ NORMALIZE_3FV(GLfloat v[3])
static inline GLboolean
IS_NEGATIVE(float x)
{
-#if defined(USE_IEEE)
- fi_type fi;
- fi.f = x;
- return fi.i < 0;
-#else
- return x < 0.0F;
-#endif
+ return signbit(x) != 0;
}
-
/** Test two floats have opposite signs */
static inline GLboolean
DIFFERENT_SIGNS(GLfloat x, GLfloat y)
{
-#if defined(USE_IEEE)
- fi_type xfi, yfi;
- xfi.f = x;
- yfi.f = y;
- return !!((xfi.i ^ yfi.i) & (1u << 31));
-#else
- /* Could just use (x*y<0) except for the flatshading requirements.
- * Maybe there's a better way?
- */
- return ((x) * (y) <= 0.0F && (x) - (y) != 0.0F);
-#endif
+ return signbit(x) != signbit(y);
}