summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-11 14:08:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-11 14:08:31 +0100
commitb879de6246d3f2e66e9c7e326db93e5ff390159f (patch)
tree2258196dc6965a084c009d0c0be227c726af6e16
parent21c150a873a77f983fad29b4517844a0b92e0609 (diff)
sna: Recheck source bo after migrating dst (in case of src == dst)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_blt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 958d4f97..f3a9cc2c 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -2789,8 +2789,13 @@ fill:
tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable, hint,
&dst_box, &tmp->damage);
- if (tmp->dst.bo && hint & REPLACES)
- kgem_bo_undo(&sna->kgem, tmp->dst.bo);
+ if (tmp->dst.bo && hint & REPLACES) {
+ struct sna_pixmap *priv = sna_pixmap(tmp->dst.pixmap);
+ kgem_bo_pair_undo(&sna->kgem, priv->gpu_bo, priv->cpu_bo);
+ }
+
+ if (tmp->dst.pixmap == src_pixmap)
+ bo = __sna_render_pixmap_bo(sna, src_pixmap, &src_box, true);
ret = false;
if (bo) {