diff options
-rw-r--r-- | src/sna/gen7_render.c | 4 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 31 |
2 files changed, 26 insertions, 9 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index cd36c958..2269b3ac 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2617,8 +2617,8 @@ gen7_render_copy_boxes(struct sna *sna, uint8_t alu, struct sna_composite_op tmp; BoxRec extents; - DBG(("%s (%d, %d)->(%d, %d) x %d, alu=%x, self-copy=%d, overlaps? %d\n", - __FUNCTION__, src_dx, src_dy, dst_dx, dst_dy, n, alu, + DBG(("%s (%d, %d)->(%d, %d) x %d, alu=%x, flags=%x, self-copy=%d, overlaps? %d\n", + __FUNCTION__, src_dx, src_dy, dst_dx, dst_dy, n, alu, flags, src_bo == dst_bo, overlaps(sna, src_bo, src_dx, src_dy, diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2a0955ab..27f2920a 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4134,19 +4134,36 @@ static bool use_shm_bo(struct sna *sna, struct sna_pixmap *priv, int alu) { - if (priv == NULL || priv->cpu_bo == NULL) + if (priv == NULL || priv->cpu_bo == NULL) { + DBG(("%s: no, not attached\n", __FUNCTION__)); return false; + } - if (!priv->shm) + if (!priv->shm) { + DBG(("%s: yes, ordinary CPU bo\n", __FUNCTION__)); return true; + } - if (alu != GXcopy) + if (alu != GXcopy) { + DBG(("%s: yes, complex alu=%d\n", __FUNCTION__, alu)); + return true; + } + if (bo->tiling) { + DBG(("%s:, yes, dst tiled=%d\n", __FUNCTION__, bo->tiling)); return true; + } - if (kgem_bo_is_busy(bo)) + if (__kgem_bo_is_busy(&sna->kgem, bo)) { + DBG(("%s: yes, dst is busy\n", __FUNCTION__)); return true; + } - return bo->tiling || __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo); + if (__kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) { + DBG(("%s: yes, src is busy\n", __FUNCTION__)); + return true; + } + + return false; } static void @@ -4335,8 +4352,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc, if (use_shm_bo(sna, bo, src_priv, alu)) { bool ret; - DBG(("%s: region overlaps CPU damage, copy from CPU bo\n", - __FUNCTION__)); + DBG(("%s: region overlaps CPU damage, copy from CPU bo (shm? %d)\n", + __FUNCTION__, src_priv->shm)); assert(bo != dst_priv->cpu_bo); |