diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-17 09:42:18 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-17 09:42:18 +0100 |
commit | 0bbd55fd1d282d5ea9ddfebd28ae5072ac12b484 (patch) | |
tree | 8394edec2309b191f3bcbe8d78af0ea4872ea27a | |
parent | c8fc7f5e4bdd5b1e3212a226a2873393b5745f14 (diff) |
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 <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |