diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-15 16:53:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-15 16:53:20 +0100 |
commit | 4e604d721be5a1c0f8eaf91e3a5cf8c01a609a69 (patch) | |
tree | bf89d33e0b8cfc6a36bd960d60f591bebe3aec23 | |
parent | 7f5a9e30c953c174a4d6bc83e0b0a5e068cbda52 (diff) | |
download | xorg-driver-xf86-video-intel-4e604d721be5a1c0f8eaf91e3a5cf8c01a609a69.tar.gz |
sna: Flush shm pixmaps after upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 0e99aa60..95d2b1a8 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1264,8 +1264,7 @@ skip_inplace_map: if (kgem_bo_is_busy(priv->cpu_bo)) { DBG(("%s: discarding busy CPU bo\n", __FUNCTION__)); - assert(priv->gpu_bo); - assert(priv->gpu_damage == NULL); + assert(priv->gpu_bo == NULL || priv->gpu_damage == NULL); sna_damage_destroy(&priv->cpu_damage); priv->undamaged = false; @@ -2209,6 +2208,10 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap, priv->cpu_bo, 0, 0, pixmap, priv->gpu_bo, 0, 0, box, n, 0); + if (ok && priv->shm) { + assert(!priv->flush); + add_flush_pixmap(sna, priv); + } } if (!ok) { if (pixmap->devPrivate.ptr == NULL) { @@ -2249,6 +2252,10 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap, priv->cpu_bo, 0, 0, pixmap, priv->gpu_bo, 0, 0, box, 1, 0); + if (ok && priv->shm) { + assert(!priv->flush); + add_flush_pixmap(sna, priv); + } } if (!ok) { if (pixmap->devPrivate.ptr == NULL) { @@ -2280,6 +2287,10 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap, priv->cpu_bo, 0, 0, pixmap, priv->gpu_bo, 0, 0, box, n, 0); + if (ok && priv->shm) { + assert(!priv->flush); + add_flush_pixmap(sna, priv); + } } if (!ok) { if (pixmap->devPrivate.ptr == NULL) { @@ -2776,6 +2787,10 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) pixmap, priv->cpu_bo, 0, 0, pixmap, priv->gpu_bo, 0, 0, box, n, 0); + if (ok && priv->shm) { + assert(!priv->flush); + add_flush_pixmap(sna, priv); + } } if (!ok) { if (pixmap->devPrivate.ptr == NULL) { |