summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_line.c3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c38
2 files changed, 17 insertions, 24 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index c940860850e..693ac281752 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -640,7 +640,8 @@ try_setup_line( struct lp_setup_context *setup,
}
}
- plane->c = (plane->c + (FIXED_ONE-1)) / FIXED_ONE;
+ plane->dcdx *= FIXED_ONE;
+ plane->dcdy *= FIXED_ONE;
/* find trivial reject offsets for each edge for a single-pixel
* sized block. These will be scaled up at each recursive level to
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index dfe1bd11ea0..8fd034666c3 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -343,34 +343,26 @@ do_triangle_ccw(struct lp_setup_context *setup,
* Also, sometimes (in FBO cases) GL will render upside down
* to its usual method, in which case it will probably want
* to use the opposite, top-left convention.
- *
- * XXX: Chances are this will get stripped away. In fact this
- * is only meaningful if:
- *
- * (plane->c & (FIXED_ONE-1)) == 0
- *
*/
- if ((plane->c & (FIXED_ONE-1)) == 0) {
- if (plane->dcdx < 0) {
- /* both fill conventions want this - adjust for left edges */
- plane->c++;
+ if (plane->dcdx < 0) {
+ /* both fill conventions want this - adjust for left edges */
+ plane->c++;
+ }
+ else if (plane->dcdx == 0) {
+ if (setup->pixel_offset == 0) {
+ /* correct for top-left fill convention:
+ */
+ if (plane->dcdy > 0) plane->c++;
}
- else if (plane->dcdx == 0) {
- if (setup->pixel_offset == 0) {
- /* correct for top-left fill convention:
- */
- if (plane->dcdy > 0) plane->c++;
- }
- else {
- /* correct for bottom-left fill convention:
- */
- if (plane->dcdy < 0) plane->c++;
- }
+ else {
+ /* correct for bottom-left fill convention:
+ */
+ if (plane->dcdy < 0) plane->c++;
}
}
- plane->c = (plane->c + (FIXED_ONE-1)) / FIXED_ONE;
-
+ plane->dcdx *= FIXED_ONE;
+ plane->dcdy *= FIXED_ONE;
/* find trivial reject offsets for each edge for a single-pixel
* sized block. These will be scaled up at each recursive level to