From: Daniel Borca Date: Fri, 12 Dec 2003 08:19:20 +0000 (+0000) Subject: small bug wrt culling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e01d671668a2f618de689e72cce5caf21f57d4a0;p=mesa.git small bug wrt culling --- 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]);\