llvmpipe: added some bin queue debug code
authorBrian Paul <brianp@vmware.com>
Thu, 10 Dec 2009 21:54:32 +0000 (14:54 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 10 Dec 2009 21:54:32 +0000 (14:54 -0700)
src/gallium/drivers/llvmpipe/lp_bin_queue.c

index 19e1a58..0fda0b5 100644 (file)
@@ -122,6 +122,14 @@ lp_bins_enqueue(struct lp_bins_queue *queue, struct lp_bins *bins)
 
    assert(queue->size < MAX_BINS);
 
+   /* debug: check that bins is not already in the queue */
+   if (0) {
+      unsigned i;
+      for (i = 0; i < queue->size; i++) {
+         assert(queue->bins[i] != bins);
+      }
+   }
+
    /* add to end */
    queue->bins[queue->size++] = bins;