diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-19 10:59:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-19 11:04:46 +0100 |
commit | e9831b50b58c36af3d2dd196b3abbfaa8e9a22c6 (patch) | |
tree | 1d5029dd839d95a4d56602b182ba38af58f26231 /src | |
parent | 6c8b15d321044d4a81cb187cc5e1ac094eb82367 (diff) |
sna/dri: Expose the refcnts in DBG before we hit the assertions
Useful to try and explain some failures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_dri.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index b65ebffe..54ad0fed 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -215,6 +215,11 @@ sna_dri_pixmap_update_bo(struct sna *sna, PixmapPtr pixmap) if (buffer == NULL) return; + DBG(("%s: pixmap=%ld, old handle=%d, new handle=%d\n", __FUNCTION__, + pixmap->drawable.serialNumber, + get_private(buffer)->bo->handle, + sna_pixmap(pixmap)->gpu_bo->handle)); + private = get_private(buffer); assert(private->pixmap == pixmap); @@ -951,11 +956,17 @@ sna_dri_copy_region(DrawablePtr draw, void (*copy)(struct sna *, DrawablePtr, RegionPtr, struct kgem_bo *, struct kgem_bo *, bool) = sna_dri_copy; - DBG(("%s: pixmap=%ld, src=%u, dst=%u\n", + DBG(("%s: pixmap=%ld, src=%u (refs=%d/%d, flush=%d) , dst=%u (refs=%d/%d, flush=%d)\n", __FUNCTION__, pixmap->drawable.serialNumber, get_private(src_buffer)->bo->handle, - get_private(dst_buffer)->bo->handle)); + get_private(src_buffer)->refcnt, + get_private(src_buffer)->bo->refcnt, + get_private(src_buffer)->bo->flush, + get_private(dst_buffer)->bo->handle, + get_private(dst_buffer)->refcnt, + get_private(dst_buffer)->bo->refcnt, + get_private(dst_buffer)->bo->flush)); assert(get_private(src_buffer)->refcnt); assert(get_private(dst_buffer)->refcnt); @@ -2051,6 +2062,18 @@ sna_dri_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, enum frame_event_type swap_type = DRI2_SWAP; CARD64 current_msc; + DBG(("%s: pixmap=%ld, back=%u (refs=%d/%d, flush=%d) , fron=%u (refs=%d/%d, flush=%d)\n", + __FUNCTION__, + get_drawable_pixmap(draw)->drawable.serialNumber, + get_private(back)->bo->handle, + get_private(back)->refcnt, + get_private(back)->bo->refcnt, + get_private(back)->bo->flush, + get_private(front)->bo->handle, + get_private(front)->refcnt, + get_private(front)->bo->refcnt, + get_private(front)->bo->flush)); + DBG(("%s(target_msc=%llu, divisor=%llu, remainder=%llu)\n", __FUNCTION__, (long long)*target_msc, |