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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-01 16:03:42 +00:00
parent 1a6c16a24c
commit 777fcc9b11
1 changed files with 2 additions and 1 deletions

View File

@ -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)) {