sna/dri2: Defer the drawable flush

Just flag the DRI2 flush to occur on the next callback flush, as per
normal, instead of manually emitting the batch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2017-06-17 20:42:47 +01:00
parent 2100efa105
commit 7534e96ffb
1 changed files with 2 additions and 6 deletions

View File

@ -615,6 +615,8 @@ sna_dri2_create_buffer(DrawablePtr draw,
size = (uint32_t)draw->height << 16 | draw->width;
switch (attachment) {
case DRI2BufferFrontLeft:
sna->needs_dri_flush = true;
pixmap = get_drawable_pixmap(draw);
buffer = NULL;
if (draw->type != DRAWABLE_PIXMAP)
@ -643,12 +645,6 @@ 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;
}