diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-05 12:48:33 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-05 13:16:24 +0100 |
commit | a26c05cc8936cab28d83c6beeff906a910353338 (patch) | |
tree | 3e649d3ee92feb2ba338d2a0ec9794dd81159e5e /src/sna/gen6_render.c | |
parent | a21bdbe3e312b40b936c5c68c84f5c1bc0f9fb88 (diff) |
sna/gen2+: Tweak placement of operations for CPU-bound large pixmaps
Try to avoid uncessary migration to the GPU of large pixmaps that are
wholly bound to the CPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 87a2c9c2..d3b3e2a1 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2518,6 +2518,13 @@ gen6_composite_fallback(struct sna *sna, return TRUE; } + if (too_large(dst_pixmap->drawable.width, + dst_pixmap->drawable.height) && + (priv == NULL || DAMAGE_IS_ALL(priv->cpu_damage))) { + DBG(("%s: dst is on the CPU and too large\n", __FUNCTION__)); + return TRUE; + } + DBG(("%s: dst is not on the GPU and the operation should not fallback\n", __FUNCTION__)); return FALSE; |