From 0bbd55fd1d282d5ea9ddfebd28ae5072ac12b484 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 17 Aug 2016 09:42:18 +0100 Subject: sna: Add CPU damage to DRI flush When we damage the CPU shadow of a DRI exported pixmap, we must remember to add that pixmap of the list to be flushed. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 05007bc7..30252982 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2470,6 +2470,10 @@ done: DBG(("%s: discarding idle GPU bo\n", __FUNCTION__)); sna_pixmap_free_gpu(sna, priv); } + if (priv->flush) { + assert(!priv->shm); + sna_add_flush_pixmap(sna, priv, priv->gpu_bo); + } priv->source_count = SOURCE_BIAS; } @@ -2718,6 +2722,10 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, } } sna_damage_add_to_pixmap(&priv->cpu_damage, region, pixmap); + if (priv->flush) { + assert(!priv->shm); + sna_add_flush_pixmap(sna, priv, priv->gpu_bo); + } if (dx | dy) RegionTranslate(region, -dx, -dy); -- cgit v1.2.3