summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-09 07:36:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-09 07:36:40 +0100
commitfaf0bdd477b9ec73f943c3101a3ae30fd6d579ea (patch)
tree5747f27ef969fc6b6f80cc655fa3c405c49ecf7d
parente0f7e9fc2f0b39b9e939ff48edea29950f125420 (diff)
sna: Add some DBG spam for BLT boxes
References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_blt.c48
1 files changed, 36 insertions, 12 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 17ed828f..72f7f672 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1111,7 +1111,9 @@ inline static void _sna_blt_fill_boxes(struct sna *sna,
rem = kgem_batch_space(kgem);
if (3*nbox_this_time > rem)
nbox_this_time = rem / 3;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
kgem->nbatch += 3 * nbox_this_time;
@@ -1208,7 +1210,9 @@ static void blt_composite_fill_boxes_no_offset__thread(struct sna *sna,
rem = kgem_batch_space(kgem);
if (3*nbox_this_time > rem)
nbox_this_time = rem / 3;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
kgem->nbatch += 3 * nbox_this_time;
@@ -1321,7 +1325,9 @@ static void blt_composite_fill_boxes__thread(struct sna *sna,
rem = kgem_batch_space(kgem);
if (3*nbox_this_time > rem)
nbox_this_time = rem / 3;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
kgem->nbatch += 3 * nbox_this_time;
@@ -1617,7 +1623,9 @@ static void blt_composite_copy_boxes__thread(struct sna *sna,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -1671,7 +1679,9 @@ static void blt_composite_copy_boxes__thread(struct sna *sna,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -1749,7 +1759,9 @@ static void blt_composite_copy_boxes__thread64(struct sna *sna,
nbox_this_time = rem / 10;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(kgem->mode == KGEM_BLT);
@@ -1805,7 +1817,9 @@ static void blt_composite_copy_boxes__thread64(struct sna *sna,
nbox_this_time = rem / 10;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(kgem->mode == KGEM_BLT);
@@ -3562,7 +3576,9 @@ bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
rem = kgem_batch_space(kgem);
if (3*nbox_this_time > rem)
nbox_this_time = rem / 3;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -3751,7 +3767,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -3808,7 +3826,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -3865,7 +3885,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);
@@ -3922,7 +3944,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
- assert(nbox_this_time);
+ DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+ __FUNCTION__, nbox_this_time, nbox, rem));
+ assert(nbox_this_time > 0);
nbox -= nbox_this_time;
assert(sna->kgem.mode == KGEM_BLT);