diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-14 12:04:23 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-14 13:07:06 +0100 |
commit | 1d2a46e0902d82b43a5e12af36521a6a7fd6ba39 (patch) | |
tree | f457b77378e959d9665f6d97ee6e5ede7da3b5a5 | |
parent | 1ce2b65d622797000e0a4db7dc851d5b1da04f85 (diff) |
sna: Align redirect subsurfaces to 2x2 or 4x4 render spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_render.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index 8af80f27..66e078a2 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -1767,8 +1767,23 @@ sna_render_composite_redirect(struct sna *sna, box.x2 = ALIGN(box.x2, tile_width * 8 / op->dst.pixmap->drawable.bitsPerPixel); offset = box.x1 * op->dst.pixmap->drawable.bitsPerPixel / 8 / tile_width * tile_size; - } else + } else { + if (sna->kgem.gen < 40) { + box.y1 = box.y1 & ~3; + box.y2 = ALIGN(box.y2, 4); + + box.x1 = box.x1 & ~3; + box.x2 = ALIGN(box.x2, 4); + } else { + box.y1 = box.y1 & ~1; + box.y2 = ALIGN(box.y2, 2); + + box.x1 = box.x1 & ~1; + box.x2 = ALIGN(box.x2, 2); + } + offset = box.x1 * op->dst.pixmap->drawable.bitsPerPixel / 8; + } if (box.y2 > op->dst.pixmap->drawable.height) box.y2 = op->dst.pixmap->drawable.height; |