summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 13bd978f..794086c6 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2260,8 +2260,8 @@ sna_drawable_use_bo(DrawablePtr drawable,
goto use_cpu_bo;
}
- if (priv->cpu_damage && !box_inplace(pixmap, box)) {
- DBG(("%s: damaged with a small operation, will not force allocation\n",
+ if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) {
+ DBG(("%s: already using CPU bo, will not force allocation\n",
__FUNCTION__));
goto use_cpu_bo;
}
@@ -2271,6 +2271,12 @@ sna_drawable_use_bo(DrawablePtr drawable,
goto use_cpu_bo;
}
+ if (priv->cpu_damage && !box_inplace(pixmap, box)) {
+ DBG(("%s: damaged with a small operation, will not force allocation\n",
+ __FUNCTION__));
+ goto use_cpu_bo;
+ }
+
flags = MOVE_WRITE | MOVE_READ;
if (prefer_gpu & FORCE_GPU)
flags |= __MOVE_FORCE;