From 8f6e227ba8127a2ca034271f2a660c24abbe056f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 Nov 2013 12:57:01 +0000 Subject: sna: Apply the BLT source offset for individual copies Following a complex path through multiple layers of indirections and tiling fallbacks, resulted in hitting a path where the source offset was subsequently ignored. This leads to the operation reading from invalid memory (or hitting the assert warning about the same). References: https://bugs.freedesktop.org/show_bug.cgi?id=70924 Signed-off-by: Chris Wilson --- src/sna/sna_tiling.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sna/sna_tiling.c') diff --git a/src/sna/sna_tiling.c b/src/sna/sna_tiling.c index feb80dcc..3bbcec70 100644 --- a/src/sna/sna_tiling.c +++ b/src/sna/sna_tiling.c @@ -162,14 +162,13 @@ sna_tiling_composite_done(struct sna *sna, int width = step; if (x + width > tile->width) width = tile->width - x; - memset(&tmp, 0, sizeof(tmp)); if (sna->render.composite(sna, tile->op, tile->src, tile->mask, tile->dst, tile->src_x + x, tile->src_y + y, tile->mask_x + x, tile->mask_y + y, tile->dst_x + x, tile->dst_y + y, width, height, - &tmp)) { + memset(&tmp, 0, sizeof(tmp)))) { for (n = 0; n < tile->rect_count; n++) { const struct sna_composite_rectangles *r = &tile->rects[n]; int x1, x2, dx, y1, y2, dy; -- cgit v1.2.3