[Bug 70461] [sna suse] ddx assertion hits
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 25 09:17:38 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=70461
--- Comment #98 from Chris Wilson <chris at chris-wilson.co.uk> ---
Looks like I lost the xTrapezoidValid() checks:
diff --git a/src/sna/sna_trapezoids_imprecise.c
b/src/sna/sna_trapezoids_imprecise.c
index 60c1387..df22add 100644
--- a/src/sna/sna_trapezoids_imprecise.c
+++ b/src/sna/sna_trapezoids_imprecise.c
@@ -962,6 +962,16 @@ tor_add_trapezoid(struct tor *tor,
const xTrapezoid *t,
int dx, int dy)
{
+ if (!xTrapezoidValid(t)) {
+ __DBG(("%s: skipping invalid trapezoid: top=%d, bottom=%d,
left=(%d, %d), (%d, %d), right=(%d, %d), (%d, %d)\n",
+ __FUNCTION__,
+ t->top, t->bottom,
+ t->left.p1.x, t->left.p1.y,
+ t->left.p2.x, t->left.p2.y,
+ t->right.p1.x, t->right.p1.y,
+ t->right.p2.x, t->right.p2.y));
+ return;
+ }
polygon_add_edge(tor->polygon, t, &t->left, 1, dx, dy);
polygon_add_edge(tor->polygon, t, &t->right, -1, dx, dy);
}
diff --git a/src/sna/sna_trapezoids_precise.c
b/src/sna/sna_trapezoids_precise.c
index e7ea433..f1532d3 100644
--- a/src/sna/sna_trapezoids_precise.c
+++ b/src/sna/sna_trapezoids_precise.c
@@ -1023,6 +1023,16 @@ tor_init(struct tor *converter, const BoxRec *box, int
num_edges)
static void
tor_add_trapezoid(struct tor *tor, const xTrapezoid *t, int dx, int dy)
{
+ if (!xTrapezoidValid(t)) {
+ __DBG(("%s: skipping invalid trapezoid: top=%d, bottom=%d,
left=(%d, %d), (%d, %d), right=(%d, %d), (%d, %d)\n",
+ __FUNCTION__,
+ t->top, t->bottom,
+ t->left.p1.x, t->left.p1.y,
+ t->left.p2.x, t->left.p2.y,
+ t->right.p1.x, t->right.p1.y,
+ t->right.p2.x, t->right.p2.y));
+ return;
+ }
polygon_add_edge(tor->polygon, t, &t->left, 1, dx, dy);
polygon_add_edge(tor->polygon, t, &t->right, -1, dx, dy);
}
~
Contemplating doing something slightly different though.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150225/31ad7797/attachment.html>
More information about the intel-gfx-bugs
mailing list