summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-23 09:03:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-23 09:06:52 +0100
commit71d32739db7c5dd93d71bad9c4de049f82524ceb (patch)
tree9050530d8fbe85aeb1f64deae3598bb21523f4df
parent12c14deb40fb4a9488d11ce53c5ce956c776a742 (diff)
sna/dri3: Flush the DRI3 pixmap bo before reporting the fd to the client
When the client first receives the fd to the pixmap, the presumption is that it is coherent. (Give or take concurrent rendering to the pixmap which will be reported in later Damage events.) We queue all damage to the GPU, but we also need to remember to finally flush the command queue so that the rendering is ordered implicitly with the client. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_dri3.c b/src/sna/sna_dri3.c
index a10c7fb0..ce4970ae 100644
--- a/src/sna/sna_dri3.c
+++ b/src/sna/sna_dri3.c
@@ -60,6 +60,8 @@ static inline void mark_dri3_pixmap(struct sna *sna, struct sna_pixmap *priv, st
priv->shm = true;
sna_watch_flush(sna, 1);
+
+ kgem_bo_submit(&sna->kgem, bo);
kgem_bo_unclean(&sna->kgem, bo);
}