From 0267f5902ddaceced870dcd8451ef8729e33e5c2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 10 Nov 2014 07:42:42 +0000 Subject: [PATCH] sna: Check after filtering points before submitting boxes to be drawn As we clip the points when converting them into GPU boxes, check that we have something to draw before submitting the commands. Reported-by: Ian Gay References: https://bugs.freedesktop.org/show_bug.cgi?id=86075 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 0ef56fb9..13f52e4a 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -7251,7 +7251,8 @@ sna_poly_point__gpu(DrawablePtr drawable, GCPtr gc, b++; } } while (--nbox); - fill.boxes(data->sna, &fill, box, b - box); + if (b != box) + fill.boxes(data->sna, &fill, box, b - box); } fill.done(data->sna, &fill); }