diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-05 20:26:30 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-05 20:26:30 +0000 |
commit | f7431726338e72d7a989e838f48aecdab15ab366 (patch) | |
tree | 22ae38f5b6ab2d1c1ea2627187d8c0a0ccfb17df | |
parent | 53c943b551b86402067ea96cd9fcca2848e84387 (diff) |
sna: Add more debugging to use-gpu-bo
To aide debugging in conjunction with compositors and their crazy
offsets.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9bb257f7..75b817fe 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1251,14 +1251,18 @@ _sna_drawable_use_gpu_bo(DrawablePtr drawable, BoxRec extents; int16_t dx, dy; - if (priv == NULL) + if (priv == NULL) { + DBG(("%s: not attached\n", __FUNCTION__)); return FALSE; + } if (priv->gpu_bo == NULL && (sna_pixmap_choose_tiling(pixmap) == I915_TILING_NONE || (priv->cpu_damage && !box_inplace(pixmap, box)) || - !sna_pixmap_move_to_gpu(pixmap, MOVE_WRITE | MOVE_READ))) + !sna_pixmap_move_to_gpu(pixmap, MOVE_WRITE | MOVE_READ))) { + DBG(("%s: no GPU bo allocated\n", __FUNCTION__)); return FALSE; + } get_drawable_deltas(drawable, pixmap, &dx, &dy); @@ -1268,6 +1272,9 @@ _sna_drawable_use_gpu_bo(DrawablePtr drawable, extents.y1 += dy; extents.y2 += dy; + DBG(("%s extents (%d, %d), (%d, %d)\n", __FUNCTION__, + extents.x1, extents.y1, extents.x2, extents.y2)); + if (priv->gpu_damage) { int ret = sna_damage_contains_box(priv->gpu_damage, &extents); if (ret == PIXMAN_REGION_IN) { @@ -1305,8 +1312,10 @@ _sna_drawable_use_gpu_bo(DrawablePtr drawable, } move_to_gpu: - if (!sna_pixmap_move_area_to_gpu(pixmap, &extents)) + if (!sna_pixmap_move_area_to_gpu(pixmap, &extents)) { + DBG(("%s: failed to move-to-gpu, fallback\n", __FUNCTION__)); return FALSE; + } *damage = &priv->gpu_damage; return TRUE; |