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
2737abb44e).
This makes a difference when lower_left_origin != half_pixel_center, e.g,
D3D10.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user