File U_sna-Check-after-filtering-points-before-submitting-boxes-to-be-drawn.patch of Package xf86-video-intel

From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Nov 10 07:42:42 2014 +0000
Subject: [PATCH]sna: Check after filtering points before submitting boxes to be drawn
Patch-mainline: 2.99.917
Git-commit: 0267f5902ddaceced870dcd8451ef8729e33e5c2
Git-repo: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel
References: boo#931309
Signed-off-by: Egbert Eich <eich@suse.com>

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 <gay@sfu.ca>
References: https://bugs.freedesktop.org/show_bug.cgi?id=86075
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 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 0ef56fb..13f52e4 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);
 }
openSUSE Build Service is sponsored by