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/mesa/drivers | |
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/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip_line.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip_tri.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c index 90cd07cd4a3..3b8af58ec76 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_line.c +++ b/src/mesa/drivers/dri/i965/brw_clip_line.c @@ -109,7 +109,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c ) * GLfloat dp0 = DOTPROD( vtx0, plane[p] ); * GLfloat dp1 = DOTPROD( vtx1, plane[p] ); * - * if (IS_NEGATIVE(dp1)) { + * if (dp1 < 0.0f) { * GLfloat t = dp1 / (dp1 - dp0); * if (t > t1) t1 = t; * } else { diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c index 62336fc795b..2227a65ae4c 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_tri.c +++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c @@ -320,7 +320,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_MOV(p, get_addr_reg(vtx), deref_1uw(inlist_ptr, 0)); load_clip_distance(c, vtxPrev, c->reg.dpPrev, hpos_offset, BRW_CONDITIONAL_L); - /* IS_NEGATIVE(prev) */ + /* (prev < 0.0f) */ brw_IF(p, BRW_EXECUTE_1); { load_clip_distance(c, vtx, c->reg.dp, hpos_offset, BRW_CONDITIONAL_GE); @@ -366,7 +366,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_ADD(p, c->reg.nr_verts, c->reg.nr_verts, brw_imm_ud(1)); load_clip_distance(c, vtx, c->reg.dp, hpos_offset, BRW_CONDITIONAL_L); - /* IS_NEGATIVE(next) + /* (next < 0.0f) */ brw_IF(p, BRW_EXECUTE_1); { |