diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-02 09:06:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-02 13:03:26 +0100 |
commit | 1f6dfc9df6780bd3768bf065156b6e8dae05b80c (patch) | |
tree | a8826a476f5a257039059dbf30e9b82f8658a94b /src/sna/sna_render.c | |
parent | 49daf5df124b5ae6c7508e934768c292f4143040 (diff) |
sna: Only flush GPU bo for a damage event
Based on xf86-video-ati
commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Mon Jul 11 12:22:09 2016 +0900
Use EventCallback to avoid flushing every time in the FlushCallback
reports seeing an improvement in reducing flushes at the expense of
checking every event for a DamageNotifyEvent. Since we also mix
rendering with SHM buffers, we have a more diverse set of conditions
under which to flush - but maybe we will see enough of a win for DRI to
merit. So far seeing improvement of ~20% for series of small operations
under the compositor without seeing any regressions, should benefit
composited desktop users. The biggest danger here is missed flushes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r-- | src/sna/sna_render.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index f8281e99..a5b0935c 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -396,6 +396,7 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt) if (priv->shm) { assert(!priv->flush); sna_add_flush_pixmap(sna, priv, priv->cpu_bo); + sna->needs_flush = true; } DBG(("%s for box=(%d, %d), (%d, %d)\n", @@ -617,6 +618,7 @@ sna_render_pixmap_bo(struct sna *sna, if (priv->shm) { assert(!priv->flush); sna_add_flush_pixmap(sna, priv, priv->cpu_bo); + sna->needs_flush = true; } goto done; } |