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>
This commit is contained in:
Chris Wilson 2016-08-17 11:46:21 +01:00
parent 0bbd55fd1d
commit 12c14deb40
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}