From 43267a325f4a0c601a7899a7ea4b1927b4cd1f61 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 21 Sep 2014 21:03:14 -0700 Subject: 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 --- src/gallium/auxiliary/draw/draw_pipe_clip.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gallium/auxiliary') 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. */ -- cgit v1.2.3