<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [sna suse] ddx assertion hits"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=70461#c98">Comment # 98</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [sna suse] ddx assertion hits"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=70461">bug 70461</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>