From a13f806ae28459a5cf671ccbf9cc8725f541a4ba Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Feb 2013 10:50:20 +0000 Subject: [PATCH] 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 --- src/sna/sna_accel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 827dcf4a..d571b915 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -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; }