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:
parent
2100efa105
commit
7534e96ffb
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue