summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:03:14 -0700
committerMatt Turner <[email protected]>2014-09-25 13:57:29 -0700
commit43267a325f4a0c601a7899a7ea4b1927b4cd1f61 (patch)
tree105f2a42895d6f893c2d77f571972c88c672c9d1 /src/mesa/tnl
parent50e2f700932bb846dc36b193e533593d45beac44 (diff)
mesa: Replace IS_NEGATIVE(x) with x < 0.0f.
I only made IS_NEGATIVE(x) use signbit in commit 0f3ba405 in an attempt to fix 54805, but it didn't help. We didn't use signbit on some platforms and instead defined it to x < 0.0f. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_cliptmp.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h
index 83de16d76fb..7dafb83cf17 100644
--- a/src/mesa/tnl/t_vb_cliptmp.h
+++ b/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 */ \