summaryrefslogtreecommitdiff
path: root/src/sna/sna_tiling.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-04 12:57:01 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-04 13:56:37 +0000
commit8f6e227ba8127a2ca034271f2a660c24abbe056f (patch)
treea9b769bd36b2eab36d50e445e278ed93656ec4eb /src/sna/sna_tiling.c
parent82b646a42f5a6271c8518ad454f1603714276caf (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_tiling.c')
-rw-r--r--src/sna/sna_tiling.c3
1 files changed, 1 insertions, 2 deletions
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;