sna: Align texture subsurfaces to 2x2 texture samples

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-04-14 12:06:51 +01:00
parent 1d2a46e090
commit 69a7737abe
1 changed files with 8 additions and 1 deletions

View File

@ -839,8 +839,15 @@ sna_render_pixmap_partial(struct sna *sna,
box.x2 = ALIGN(box.x2, tile_width * 8 / pixmap->drawable.bitsPerPixel);
offset = box.x1 * pixmap->drawable.bitsPerPixel / 8 / tile_width * tile_size;
} else
} 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 * pixmap->drawable.bitsPerPixel / 8;
}
if (box.x2 > pixmap->drawable.width)
box.x2 = pixmap->drawable.width;