From 3a9975729c665cd09a33e33eab608350aaee8160 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 30 May 2013 14:15:23 +0100 Subject: [PATCH] sna: Restore GPU promotion for large fills Fix another regression from commit ef9dc6fae585d5616446eedc1e6e91173f4064c1 [2.21.7] Author: Chris Wilson Date: Mon May 20 11:08:51 2013 +0100 sna: Undo a few more overwritten operations upon a bo The REPLACES predicate was meant to complement the existing tests, not be compulsory. Found whilst investigating why performance seemed to have dropped off in Phoronix's benchmarks. Reported-by: Michael Larabel Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 3e3e75c1..7cdc8fc8 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -12223,8 +12223,7 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect) hint |= REPLACES; if (priv->cpu_damage == NULL) { if (priv->gpu_bo && - hint & REPLACES && - box_inplace(pixmap, ®ion.extents)) { + (hint & REPLACES || box_inplace(pixmap, ®ion.extents))) { DBG(("%s: promoting to full GPU\n", __FUNCTION__)); assert(priv->gpu_bo->proxy == NULL);