From: Zack Rusin Date: Thu, 7 Oct 2010 20:26:17 +0000 (-0400) Subject: llvmpipe: fix rasterization of vertical lines on pixel boundaries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6316d540564d116460bfd1382e3eee98480e28ff;p=mesa.git llvmpipe: fix rasterization of vertical lines on pixel boundaries --- diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index 4d7d6235b07..693ac281752 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -475,7 +475,7 @@ try_setup_line( struct lp_setup_context *setup, else { /* do intersection test */ float xintersect = fracf(v2[0][0]) + y2diff * dxdy; - draw_end = (xintersect < 1.0 && xintersect > 0.0); + draw_end = (xintersect < 1.0 && xintersect >= 0.0); } /* Are we already drawing start/end? @@ -513,7 +513,7 @@ try_setup_line( struct lp_setup_context *setup, x_offset_end = y_offset_end * dxdy; } } - + /* x/y positions in fixed point */ x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) - fixed_width/2; x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) - fixed_width/2;