From a00d9999f410b3ad5bb05ed68b7dd4e7166fd868 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Jun 2015 10:33:17 +0100 Subject: sna: Fix tiling trapezoids When the trapezoid is rendering to a surface larger than the 3D pipe can handle, we split it into tiles. However, the code to do so insisted on passing along the wrong pointer and consequently crashed. Based on the patch by Carl Michal. Reported-by: Carl Michal Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90940 Signed-off-by: Chris Wilson --- src/sna/sna_tiling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sna/sna_tiling.c') diff --git a/src/sna/sna_tiling.c b/src/sna/sna_tiling.c index 308efc0a..8e2627f7 100644 --- a/src/sna/sna_tiling.c +++ b/src/sna/sna_tiling.c @@ -369,8 +369,7 @@ sna_tiling_composite_spans_boxes(struct sna *sna, const BoxRec *box, int nbox, float opacity) { while (nbox--) - sna_tiling_composite_spans_box(sna, op->base.priv, box++, opacity); - (void)sna; + sna_tiling_composite_spans_box(sna, op, box++, opacity); } fastcall static void @@ -581,6 +580,7 @@ sna_tiling_composite_spans(uint32_t op, tile->rects = tile->rects_embedded; tile->rect_count = 0; tile->rect_size = ARRAY_SIZE(tile->rects_embedded); + COMPILE_TIME_ASSERT(sizeof(tile->rects_embedded[0]) >= sizeof(struct sna_tile_span)); tmp->box = sna_tiling_composite_spans_box; tmp->boxes = sna_tiling_composite_spans_boxes; -- cgit v1.2.3