Mesa (master): llvmpipe: Respect bottom_edge_rule when computing the rasterization bounding boxes.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Jan 8 12:21:10 UTC 2014
Module: Mesa
Branch: master
Commit: 37de6b06821b208920ccf6fb99fbc727d0344004
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37de6b06821b208920ccf6fb99fbc727d0344004
Author: José Fonseca <jfonseca at vmware.com>
Date: Tue Jan 7 17:52:21 2014 +0000
llvmpipe: Respect bottom_edge_rule when computing the rasterization bounding boxes.
This was inadvertently forgotten when replacing gl_rasterization_rules
with lower_left_origin and half_pixel_center (commit
2737abb44efebfa10ac84b183c20fc5818d1514e).
This makes a difference when lower_left_origin != half_pixel_center, e.g,
D3D10.
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Zack Rusin <zackr at vmware.com>
---
src/gallium/drivers/llvmpipe/lp_setup_line.c | 2 +-
src/gallium/drivers/llvmpipe/lp_setup_point.c | 2 +-
src/gallium/drivers/llvmpipe/lp_setup_tri.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index 7e1f6a3..ac182d4 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -553,7 +553,7 @@ try_setup_line( struct lp_setup_context *setup,
* up needing a bottom-left fill convention, which requires
* slightly different rounding.
*/
- int adj = (setup->pixel_offset != 0) ? 1 : 0;
+ int adj = (setup->bottom_edge_rule != 0) ? 1 : 0;
bbox.x0 = (MIN4(x[0], x[1], x[2], x[3]) + (FIXED_ONE-1)) >> FIXED_ORDER;
bbox.x1 = (MAX4(x[0], x[1], x[2], x[3]) + (FIXED_ONE-1)) >> FIXED_ORDER;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index c42646e..834c47b 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -369,7 +369,7 @@ try_setup_point( struct lp_setup_context *setup,
* up needing a bottom-left fill convention, which requires
* slightly different rounding.
*/
- int adj = (setup->pixel_offset != 0) ? 1 : 0;
+ 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;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index ce3a0a7..d9cbc74 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -305,7 +305,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
* up needing a bottom-left fill convention, which requires
* slightly different rounding.
*/
- int adj = (setup->pixel_offset != 0) ? 1 : 0;
+ int adj = (setup->bottom_edge_rule != 0) ? 1 : 0;
/* Inclusive x0, exclusive x1 */
bbox.x0 = MIN3(position->x[0], position->x[1], position->x[2]) >> FIXED_ORDER;
More information about the mesa-commit
mailing list