From 0b92a5a3062d73666279e17ac2d711314bcd8dfe Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 11 Oct 2012 12:16:03 +0100 Subject: [PATCH] sna: Correct a bogus assertion after inplace PutImage If we are forced to use the GPU bo as the target because the CPU bo is busy, the priv->cpu flag is likely to remain set, so we need to clear it rather than fail the assertion that is false. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 4d6c7988..a8a0c931 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3553,7 +3553,6 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region, if (upload_inplace(sna, pixmap, priv, region) && sna_put_image_upload_blt(drawable, gc, region, x, y, w, h, bits, stride)) { - assert(priv->cpu == false); if (!DAMAGE_IS_ALL(priv->gpu_damage)) { DBG(("%s: marking damage\n", __FUNCTION__)); if (region_subsumes_drawable(region, &pixmap->drawable)) @@ -3582,6 +3581,7 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region, assert_pixmap_damage(pixmap); priv->clear = false; + priv->cpu = false; return true; }