summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-07 15:31:50 -0700
committerBrian Paul <[email protected]>2009-12-07 18:04:54 -0700
commitcdaea049c95031338040b31ff31944c8a001a1dd (patch)
tree0532f63564f11eae3cc8f75eb4ab90abc3f540e5 /src/gallium
parent270f15486072b0a2fbea2a21b7a4a9d4c76d4bfb (diff)
llvmpipe: use bin iteration functions when rasterizing bins
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c26
1 files changed, 20 insertions, 6 deletions
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 );