diff options
author | Keith Whitwell <[email protected]> | 2009-10-09 16:05:26 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-10-09 16:07:58 +0100 |
commit | 82ec7f018d20e46e9c43ea467354dcfe4f03bae3 (patch) | |
tree | 2fbf2f6525e790727fb40ba1cd1e23d1bacd358e /src/gallium/drivers/llvmpipe/lp_setup_tri.c | |
parent | 85999695829823e459e11822b4846ed1db5c055d (diff) |
llvmpipe: correct binning maths for iterating over whole tiles
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 78e53292ece..c4379403817 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -357,13 +357,13 @@ do_triangle_ccw(struct setup_context *setup, c2 = tri->c2 + tri->dx23 * miny - tri->dy23 * minx; c3 = tri->c3 + tri->dx31 * miny - tri->dy31 * minx; - /* Convert to tile coordinates: - */ minx /= TILESIZE; - maxx /= TILESIZE; miny /= TILESIZE; + maxx /= TILESIZE; maxy /= TILESIZE; - + + /* Convert to tile coordinates: + */ if (miny == maxy && minx == maxx) { /* Triangle is contained in a single tile: @@ -399,13 +399,13 @@ do_triangle_ccw(struct setup_context *setup, * Trivially accept or reject blocks, else jump to per-pixel * examination above. */ - for (y = miny; y < maxy; y++) + for (y = miny; y <= maxy; y++) { float cx1 = c1; float cx2 = c2; float cx3 = c3; - for (x = minx; x < maxx; x++) + for (x = minx; x <= maxx; x++) { if (cx1 + eo1 < 0 || cx2 + eo2 < 0 || |