diff options
author | Matt Turner <[email protected]> | 2014-09-21 21:03:14 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-09-25 13:57:29 -0700 |
commit | 43267a325f4a0c601a7899a7ea4b1927b4cd1f61 (patch) | |
tree | 105f2a42895d6f893c2d77f571972c88c672c9d1 /src/gallium/auxiliary/draw | |
parent | 50e2f700932bb846dc36b193e533593d45beac44 (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/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_clip.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c index d8b56de4d2f..2fbd655e07f 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c @@ -47,10 +47,6 @@ #define DEBUG_CLIP 0 -#ifndef IS_NEGATIVE -#define IS_NEGATIVE(X) ((X) < 0.0) -#endif - #ifndef DIFFERENT_SIGNS #define DIFFERENT_SIGNS(x, y) ((x) * (y) <= 0.0F && (x) - (y) != 0.0F) #endif @@ -437,7 +433,7 @@ do_clip_tri( struct draw_stage *stage, if (util_is_inf_or_nan(dp)) return; //discard nan - if (!IS_NEGATIVE(dp_prev)) { + if (dp_prev >= 0.0f) { assert(outcount < MAX_CLIPPED_VERTICES); if (outcount >= MAX_CLIPPED_VERTICES) return; @@ -461,7 +457,7 @@ do_clip_tri( struct draw_stage *stage, new_edge = &outEdges[outcount]; outlist[outcount++] = new_vert; - if (IS_NEGATIVE(dp)) { + if (dp < 0.0f) { /* Going out of bounds. Avoid division by zero as we * know dp != dp_prev from DIFFERENT_SIGNS, above. */ |