From 777fcc9b11e8cbfe942aa6bf898749f552acb3cf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 1 Jan 2012 16:03:42 +0000 Subject: [PATCH] sna: Prefer not to force the creation of gpu bo for pixmap uploads As this causes a significant regression when benchmarking firefox on SNB with firefox-planet-gnome if we already have CPU buffers. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index d66a67a6..0b9565c2 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1820,7 +1820,8 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region, */ if ((priv->flush || (region_inplace(sna, pixmap, region, priv) && - (priv->gpu_bo == NULL || !kgem_bo_map_will_stall(&sna->kgem, priv->gpu_bo)))) && + ((priv->gpu_bo == NULL && priv->cpu_bo == NULL) || + (priv->gpu_bo != NULL && !kgem_bo_map_will_stall(&sna->kgem, priv->gpu_bo))))) && sna_put_image_upload_blt(drawable, gc, region, x, y, w, h, bits, stride)) { if (region_subsumes_drawable(region, &pixmap->drawable)) {