summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2003-12-12 08:19:20 +0000
committerDaniel Borca <[email protected]>2003-12-12 08:19:20 +0000
commite01d671668a2f618de689e72cce5caf21f57d4a0 (patch)
tree3b147a77954fd5c24d4ef3b28e439bec7cd86652 /src/mesa
parent379641956d134b8dc761b6411d7c4dca8f94a092 (diff)
small bug wrt culling
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/glide/fxtris.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 9be2e1a88f8..56563fc4123 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -389,9 +389,17 @@ static struct {
#define VERT_X(_v) _v->x
#define VERT_Y(_v) _v->y
#define VERT_Z(_v) _v->ooz
-#define AREA_IS_CCW( a ) IS_NEGATIVE(a) /*(a < 0)*/
#define GET_VERTEX(e) (fxMesa->verts + e)
+#ifdef USE_IEEE
+/* type-punning, keep -fstrict-aliasing happy */
+typedef union { GLfloat f; GLuint u; } fu_type;
+/* 0/1 value, to allow XOR'ing with other booleans */
+#define AREA_IS_CCW( a ) (((fu_type *)&(a))->u >> 31)
+#else
+#define AREA_IS_CCW( a ) (a < 0)
+#endif
+
#define VERT_SET_RGBA( dst, f ) \
do { \
UNCLAMPED_FLOAT_TO_UBYTE(dst->pargb[2], f[0]);\