llvmpipe: added some debug/info code
authorBrian Paul <brianp@vmware.com>
Wed, 9 Dec 2009 23:32:32 +0000 (16:32 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 9 Dec 2009 23:32:32 +0000 (16:32 -0700)
src/gallium/drivers/llvmpipe/lp_rast.c

index 3165128f8f6ca8d5e24314e105a11e6d16d0a466..5659ae2ca5a3a17a1d0c7cfaa714f556c48b754e 100644 (file)
@@ -40,6 +40,7 @@
 
 
 
+
 /**
  * Begin the rasterization phase.
  * Map the framebuffer surfaces.  Initialize the 'rast' state.
@@ -555,8 +556,22 @@ lp_rasterize_bins( struct lp_rasterizer *rast,
                    const struct pipe_framebuffer_state *fb,
                    bool write_depth )
 {
+   boolean debug = false;
+
    LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
 
+   if (debug) {
+      unsigned x, y;
+      printf("rasterize bins:\n");
+      printf("  data size: %u\n", lp_bin_data_size(bins));
+      for (y = 0; y < bins->tiles_y; y++) {
+         for (x = 0; x < bins->tiles_x; x++) {
+            printf("  bin %u, %u size: %u\n", x, y,
+                   lp_bin_cmd_size(bins, x, y));
+         }
+      }
+   }
+
    lp_rast_begin( rast,
                   fb->cbufs[0], 
                   fb->zsbuf,