Mesa (master): llvmpipe: Fix the bottom_edge_rule adjustment for points.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Jan 8 12:21:10 UTC 2014


Module: Mesa
Branch: master
Commit: eda21d2a3010d9fc5a68b55a843c5e44b2abf8dd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eda21d2a3010d9fc5a68b55a843c5e44b2abf8dd

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Jan  7 17:57:59 2014 +0000

llvmpipe: Fix the bottom_edge_rule adjustment for points.

The adjustment needs to be applied to the y coordinates and not the x
coordinates, just like the equivalent code for lines and triangles in
lp_setup_line.c and lp_setup_tri.c.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Zack Rusin <zackr at vmware.com>

---

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

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index 834c47b..988e0c5 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -371,10 +371,10 @@ try_setup_point( struct lp_setup_context *setup,
        */
       int adj = (setup->bottom_edge_rule != 0) ? 1 : 0;
 
-      bbox.x0 = (x0 + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
-      bbox.x1 = (x0 + fixed_width + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
-      bbox.y0 = (y0 + (FIXED_ONE-1)) >> FIXED_ORDER;
-      bbox.y1 = (y0 + fixed_width + (FIXED_ONE-1)) >> FIXED_ORDER;
+      bbox.x0 = (x0 + (FIXED_ONE-1)) >> FIXED_ORDER;
+      bbox.x1 = (x0 + fixed_width + (FIXED_ONE-1)) >> FIXED_ORDER;
+      bbox.y0 = (y0 + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
+      bbox.y1 = (y0 + fixed_width + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
 
       /* Inclusive coordinates:
        */




More information about the mesa-commit mailing list