Mesa (lp-binning): llvmpipe: correctly scale top/left fill adjustments

Keith Whitwell keithw at kemper.freedesktop.org
Mon Oct 19 10:29:11 UTC 2009


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Mon Oct 19 11:29:05 2009 +0100

llvmpipe: correctly scale top/left fill adjustments

Was overdoing it previously.

---

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

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 961bd10..89b2b4e 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -328,9 +328,9 @@ do_triangle_ccw(struct setup_context *setup,
 
    /* correct for top-left fill convention:
     */
-   if (tri->dy12 < 0 || (tri->dy12 == 0 && tri->dx12 > 0)) tri->c1++;
-   if (tri->dy23 < 0 || (tri->dy23 == 0 && tri->dx23 > 0)) tri->c2++;
-   if (tri->dy31 < 0 || (tri->dy31 == 0 && tri->dx31 > 0)) tri->c3++;
+   if (tri->dy12 < 0 || (tri->dy12 == 0 && tri->dx12 > 0)) tri->c1 += 1.0/16.0f;
+   if (tri->dy23 < 0 || (tri->dy23 == 0 && tri->dx23 > 0)) tri->c2 += 1.0/16.0f;
+   if (tri->dy31 < 0 || (tri->dy31 == 0 && tri->dx31 > 0)) tri->c3 += 1.0/16.0f;
 
    /* find trivial reject offsets for each edge for a single-pixel
     * sized block.  These will be scaled up at each recursive level to




More information about the mesa-commit mailing list