From cdaea049c95031338040b31ff31944c8a001a1dd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 7 Dec 2009 15:31:50 -0700 Subject: llvmpipe: use bin iteration functions when rasterizing bins --- src/gallium/drivers/llvmpipe/lp_rast.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 642f1b90795..a6192e589dc 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -505,8 +505,6 @@ lp_rasterize_bins( struct lp_rasterizer *rast, const struct pipe_framebuffer_state *fb, bool write_depth ) { - unsigned i, j; - LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__); lp_rast_begin( rast, @@ -518,12 +516,28 @@ lp_rasterize_bins( struct lp_rasterizer *rast, fb->height ); /* loop over tile bins, rasterize each */ - for (i = 0; i < bins->tiles_x; i++) { - for (j = 0; j < bins->tiles_y; j++) { - struct cmd_bin *bin = lp_get_bin(bins, i, j); - rasterize_bin( rast, bin, i * TILE_SIZE, j * TILE_SIZE ); +#if 0 + { + unsigned i, j; + for (i = 0; i < bins->tiles_x; i++) { + for (j = 0; j < bins->tiles_y; j++) { + struct cmd_bin *bin = lp_get_bin(bins, i, j); + rasterize_bin( rast, bin, i * TILE_SIZE, j * TILE_SIZE ); + } } } +#else + { + struct cmd_bin *bin; + int x, y; + + lp_bin_iter_begin( bins ); + + while ((bin = lp_bin_iter_next(bins, &x, &y))) { + rasterize_bin( rast, bin, x * TILE_SIZE, y * TILE_SIZE); + } + } +#endif lp_rast_end( rast ); -- cgit v1.2.3