diff options
author | Daniel Borca <[email protected]> | 2004-01-07 13:57:23 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-01-07 13:57:23 +0000 |
commit | 6471160770601a5f9b71252549002aa439b4091e (patch) | |
tree | 95f661c7259c8ae9462b8461b10e2c60cc2cd423 | |
parent | 4c75d90ad21d40ae9a1965868cc992470421caff (diff) |
temporary workaround for bad primitives in fx_render_vb_quads
-rw-r--r-- | src/mesa/drivers/glide/fxtris.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c index cfd643e8e2f..a5165684a37 100644 --- a/src/mesa/drivers/glide/fxtris.c +++ b/src/mesa/drivers/glide/fxtris.c @@ -400,10 +400,7 @@ static struct { #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) +#define AREA_IS_CCW( a ) (((fi_type *)&(a))->i < 0) #else #define AREA_IS_CCW( a ) (a < 0) #endif @@ -882,6 +879,17 @@ static void fx_render_vb_quads( GLcontext *ctx, INIT(GL_QUADS); +#if 1 + /* [dBorca] Hack alert: + * since VTX-0-2 we get here with start = 0, count = 2, + * causing around 4 billion triangles. Revise this after + * a while + */ + if (count < 3) { + return; + } +#endif + for (i = start ; i < count-3 ; i += 4 ) { #define VERT(x) (fxVB + (x)) GrVertex *_v_[4]; |