sna: Assert that the bo is marked as 'flush' when exported to DRI clients
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
cf64c8ce75
commit
71ac12e9b6
|
|
@ -4625,8 +4625,9 @@ void kgem_buffer_read_sync(struct kgem *kgem, struct kgem_bo *_bo)
|
|||
struct kgem_buffer *bo;
|
||||
uint32_t offset = _bo->delta, length = _bo->size.bytes;
|
||||
|
||||
/* We expect the caller to have already submitted the batch */
|
||||
assert(_bo->io);
|
||||
assert(_bo->exec == &_kgem_dummy_exec);
|
||||
assert(_bo->exec == NULL);
|
||||
assert(_bo->rq == NULL);
|
||||
assert(_bo->proxy);
|
||||
|
||||
|
|
|
|||
|
|
@ -2022,6 +2022,7 @@ out:
|
|||
if (flags & MOVE_WRITE) {
|
||||
priv->source_count = SOURCE_BIAS;
|
||||
assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL);
|
||||
assert(!priv->flush || !list_is_empty(&priv->list));
|
||||
}
|
||||
if ((flags & MOVE_ASYNC_HINT) == 0 && priv->cpu_bo) {
|
||||
DBG(("%s: syncing cpu bo\n", __FUNCTION__));
|
||||
|
|
@ -3432,6 +3433,7 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
|
|||
sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
|
||||
}
|
||||
}
|
||||
assert(!priv->flush || !list_is_empty(&priv->list));
|
||||
priv->cpu = true;
|
||||
|
||||
blt:
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
assert(priv->cpu_damage == NULL);
|
||||
if (priv->flush++)
|
||||
return priv->gpu_bo;
|
||||
|
||||
|
|
@ -189,13 +190,6 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
|
|||
/* Don't allow this named buffer to be replaced */
|
||||
priv->pinned = 1;
|
||||
|
||||
if (priv->gpu_bo->exec || priv->cpu_damage) {
|
||||
DBG(("%s: marking pixmap=%ld for flushing\n",
|
||||
__FUNCTION__, pixmap->drawable.serialNumber));
|
||||
list_move(&priv->list, &sna->flush_pixmaps);
|
||||
sna->kgem.flush = true;
|
||||
}
|
||||
|
||||
return priv->gpu_bo;
|
||||
}
|
||||
|
||||
|
|
@ -340,6 +334,8 @@ sna_dri_create_buffer(DrawablePtr draw,
|
|||
pixmap->refcnt++;
|
||||
}
|
||||
|
||||
assert(bo->flush == true);
|
||||
|
||||
return buffer;
|
||||
|
||||
err:
|
||||
|
|
|
|||
Loading…
Reference in New Issue