diff options
Diffstat (limited to 'mesalib/src/mesa/tnl')
-rw-r--r-- | mesalib/src/mesa/tnl/t_vb_cliptmp.h | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/tnl/t_vertex.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/mesalib/src/mesa/tnl/t_vb_cliptmp.h b/mesalib/src/mesa/tnl/t_vb_cliptmp.h index 83de16d76..7dafb83cf 100644 --- a/mesalib/src/mesa/tnl/t_vb_cliptmp.h +++ b/mesalib/src/mesa/tnl/t_vb_cliptmp.h @@ -41,12 +41,12 @@ do { \ GLuint idx = inlist[i]; \ GLfloat dp = CLIP_DOTPROD(idx, A, B, C, D ); \ \ - if (!IS_NEGATIVE(dpPrev)) { \ + if (dpPrev >= 0.0f) { \ outlist[outcount++] = idxPrev; \ } \ \ if (DIFFERENT_SIGNS(dp, dpPrev)) { \ - if (IS_NEGATIVE(dp)) { \ + if (dp < 0.0f) { \ /* Going out of bounds. Avoid division by zero as we \ * know dp != dpPrev from DIFFERENT_SIGNS, above. \ */ \ @@ -85,15 +85,15 @@ do { \ if (mask & PLANE_BIT) { \ const GLfloat dp0 = CLIP_DOTPROD( v0, A, B, C, D ); \ const GLfloat dp1 = CLIP_DOTPROD( v1, A, B, C, D ); \ - const GLboolean neg_dp0 = IS_NEGATIVE(dp0); \ - const GLboolean neg_dp1 = IS_NEGATIVE(dp1); \ + const GLboolean neg_dp0 = dp0 < 0.0f; \ + const GLboolean neg_dp1 = dp1 < 0.0f; \ \ /* For regular clipping, we know from the clipmask that one \ * (or both) of these must be negative (otherwise we wouldn't \ * be here). \ * For userclip, there is only a single bit for all active \ * planes, so we can end up here when there is nothing to do, \ - * hence the second IS_NEGATIVE() test: \ + * hence the second < 0.0f test: \ */ \ if (neg_dp0 && neg_dp1) \ return; /* both vertices outside clip plane: discard */ \ diff --git a/mesalib/src/mesa/tnl/t_vertex.c b/mesalib/src/mesa/tnl/t_vertex.c index 421bae2b8..90b97a092 100644 --- a/mesalib/src/mesa/tnl/t_vertex.c +++ b/mesalib/src/mesa/tnl/t_vertex.c @@ -543,7 +543,7 @@ void _tnl_init_vertices( struct gl_context *ctx, vtx->codegen_emit = NULL; #ifdef USE_SSE_ASM - if (!_mesa_getenv("MESA_NO_CODEGEN")) + if (!getenv("MESA_NO_CODEGEN")) vtx->codegen_emit = _tnl_generate_sse_emit; #endif } |