diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-27 10:26:11 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-27 10:26:11 +0000 |
commit | 86f1ae9164a94323c08e1dc6cb301e5bc1126b10 (patch) | |
tree | 608bd2372ae8b6709c3f49fc517b839c4d25543d | |
parent | ce1cae7f4715fc8e14327c5b705d9f2cc45a3741 (diff) |
sna/video: Add some more DBG breadcrumbs to the textured PutImage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_video_textured.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index fcef8209..09f1551b 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -229,6 +229,12 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, Bool flush = false; Bool ret; + DBG(("%s: src=(%d, %d),(%d, %d), dst=(%d, %d),(%d, %d), id=%d, sizep=%dx%d, sync?=%d\n", + __FUNCTION__, + src_x, src_y, src_w, src_h, + drw_x, drw_y, drw_w, drw_h, + id, width, height, sync)); + if (buf == 0) return BadAlloc; @@ -245,6 +251,9 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, return Success; if (xvmc_passthrough(id)) { + DBG(("%s: using passthough, name=%d\n", + __FUNCTION__, *(uint32_t *)buf)); + if (sna->kgem.gen < 31) { /* XXX: i915 is not support and needs some * serious care. grep for KMS in i915_hwmc.c */ @@ -254,6 +263,8 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, frame.bo = kgem_create_for_name(&sna->kgem, *(uint32_t*)buf); if (frame.bo == NULL) return BadAlloc; + + assert(frame.bo->size >= frame.size); } else { frame.bo = kgem_create_linear(&sna->kgem, frame.size); if (frame.bo == NULL) @@ -270,16 +281,16 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, &clip->extents); ret = Success; - if (!sna->render.video(sna, video, &frame, clip, - src_w, src_h, - drw_w, drw_h, - pixmap)) + if (sna->render.video(sna, video, &frame, clip, + src_w, src_h, + drw_w, drw_h, + pixmap)) + DamageDamageRegion(drawable, clip); + else ret = BadAlloc; kgem_bo_destroy(&sna->kgem, frame.bo); - DamageDamageRegion(drawable, clip); - /* Push the frame to the GPU as soon as possible so * we can hit the next vsync. */ |