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>
This commit is contained in:
Chris Wilson 2011-12-20 18:39:20 +00:00
parent 0cda7b4fa8
commit dfafe76a57
1 changed files with 7 additions and 0 deletions

View File

@ -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;