sna: Assert that we do not destroy a GPU bo for an active DRI pixmap

This is an extra paranoid check that the bo is still pinned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-02-11 10:50:20 +00:00
parent c2eb2db832
commit a13f806ae2
1 changed files with 1 additions and 0 deletions

View File

@ -404,6 +404,7 @@ static void sna_pixmap_free_gpu(struct sna *sna, struct sna_pixmap *priv)
priv->clear = false;
if (priv->gpu_bo && !priv->pinned) {
assert(!priv->flush);
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
priv->gpu_bo = NULL;
}