summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-17 11:46:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-17 11:46:21 +0100
commit12c14deb40fb4a9488d11ce53c5ce956c776a742 (patch)
tree21cc5cfa986b0ca7e488b8d8ebe68449e5c7bcba
parent0bbd55fd1d282d5ea9ddfebd28ae5072ac12b484 (diff)
sna/dri2: Ensure the DRI pixmap is flushed before replying
As we only ensure the flush before damage is sent, we also need to flush any CPU shadows before the reply to GetBuffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 081da915..32832dd5 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -647,7 +647,12 @@ sna_dri2_create_buffer(DrawablePtr draw,
assert(private->bo->pitch == buffer->pitch);
assert(private->bo->active_scanout);
+ sna_pixmap_move_to_gpu(pixmap,
+ MOVE_READ |
+ __MOVE_FORCE |
+ __MOVE_DRI);
kgem_bo_submit(&sna->kgem, private->bo);
+
private->refcnt++;
return buffer;
}