Mesa (lp-binning): llvmpipe: remove opencoded constant

Keith Whitwell keithw at kemper.freedesktop.org
Mon Jan 11 11:07:01 UTC 2010


Module: Mesa
Branch: lp-binning
Commit: 094525fb23127e7ca253d732207bbbbe00488a6b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=094525fb23127e7ca253d732207bbbbe00488a6b

Author: Keith Whitwell <keithw at vmware.com>
Date:   Fri Jan  8 13:55:32 2010 +0000

llvmpipe: remove opencoded constant

---

 src/gallium/drivers/llvmpipe/lp_setup_tri.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index fe34903..5197dca 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -287,10 +287,10 @@ do_triangle_ccw(struct setup_context *setup,
    }
 
    /* Bounding rectangle (in pixels) */
-   tri->minx = (MIN3(x1, x2, x3) + 0xf) >> FIXED_ORDER;
-   tri->maxx = (MAX3(x1, x2, x3) + 0xf) >> FIXED_ORDER;
-   tri->miny = (MIN3(y1, y2, y3) + 0xf) >> FIXED_ORDER;
-   tri->maxy = (MAX3(y1, y2, y3) + 0xf) >> FIXED_ORDER;
+   tri->minx = (MIN3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+   tri->maxx = (MAX3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+   tri->miny = (MIN3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+   tri->maxy = (MAX3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
    
    if (tri->miny == tri->maxy || 
        tri->minx == tri->maxx) {




More information about the mesa-commit mailing list