<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#c74">Comment # 74</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>(In reply to Jiri Slaby from <a href="show_bug.cgi?id=70461#c73">comment #73</a>)
<span class="quote">> That does not seem to help (or I am seeing something different). This is
> with 2.99.916-113-ge46f26b9e267:</span >

line 519: assert(edge->p2.y > edge->p1.y);
line 558: assert((s64)(edge->p2.y - edge->p1.y) * 17 * (2 << 16) > 0);

That has to be less than 63 bits and positive, since the edge height is 32 bits
and the multiplier is 22 bits (i.e. a max of 54 bits).


Could you apply

diff --git a/src/sna/sna_trapezoids_precise.c
b/src/sna/sna_trapezoids_precise.c
index 9925654..d5a32db 100644
--- a/src/sna/sna_trapezoids_precise.c
+++ b/src/sna/sna_trapezoids_precise.c
@@ -555,6 +555,9 @@ polygon_add_edge(struct polygon *polygon,

                Ex = (int64_t)(edge->p2.x - edge->p1.x) * SAMPLES_X;
                Ey = (int64_t)(edge->p2.y - edge->p1.y) * SAMPLES_Y * (2 <<
16);
+               if (Ey <= 0)
+                       ErrorF("bang! Ey=%lld, p1=(%d, %d), p2=(%d, %d)\n",
+                              (long long)Ey, edge->p1.x, edge->p1.y,
edge->p2.x, edge->p2.y);
                assert(Ey > 0);
                e->dxdy.quo = Ex * (2 << 16) / Ey;
                e->dxdy.rem = Ex * (2 << 16) % Ey;

and see what that trawls up?</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>