summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index ea7dc7a7..dfb160b4 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -13506,8 +13506,16 @@ sna_get_image_blt(DrawablePtr drawable,
if (!sna->kgem.has_userptr)
return false;
- if (!DAMAGE_IS_ALL(priv->gpu_damage) ||
- !__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))
+ if (priv->gpu_damage == NULL)
+ return false;
+
+ assert(priv->gpu_bo);
+ if (!__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))
+ return false;
+
+ if (!DAMAGE_IS_ALL(priv->gpu_damage) &&
+ !sna_damage_contains_box__no_reduce(priv->gpu_damage,
+ &region->extents))
return false;
DBG(("%s: download through a temporary map\n", __FUNCTION__));