summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-20 18:39:20 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-20 18:46:47 +0000
commitdfafe76a57655784c313bc2078d0b28a7ac2675b (patch)
treeb278530a4aa9ccc04598bbaf4694e8e63832d2c6
parent0cda7b4fa82870d57fcd0036a3b734cc73e2bf28 (diff)
sna: Do not use Y-tiling for composite back pixmaps
These are treated by the core drawing routines as replacements for the front-buffer attached to Windows, and so expect the usual BLT accelerations are available, for example overlapping blits to handle scrolling. If we create these pixmaps with Y-tiling and then they are pinned by the external compositor we are forced to perform a double copy through the 3D pipeline as it does not handle overlapping blits and the BLT does not handle Y-tiling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 60bd39fc..6c655cae 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -291,6 +291,13 @@ static inline uint32_t default_tiling(PixmapPtr pixmap)
if (sna->kgem.gen == 21)
return I915_TILING_X;
+ if (pixmap->usage_hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
+ /* Treat this like a window, and require accelerated
+ * scrolling i.e. overlapped blits.
+ */
+ return I915_TILING_X;
+ }
+
return sna_damage_is_all(&priv->cpu_damage,
pixmap->drawable.width,
pixmap->drawable.height) ? I915_TILING_Y : sna->default_tiling;