<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Calculating the scissors fields when the y is flipped (0 on top) can generate negative numbers that will cause assertion failure later on."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108999">108999</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Calculating the scissors fields when the y is flipped (0 on top) can generate negative numbers that will cause assertion failure later on.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>estea@igalia.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=142768" name="attach_142768" title="piglit test that triggers SCISSOR bbox clamping errors when the y is flipped (0 on top)">attachment 142768</a> <a href="attachment.cgi?id=142768&action=edit" title="piglit test that triggers SCISSOR bbox clamping errors when the y is flipped (0 on top)">[details]</a></span>
piglit test that triggers SCISSOR bbox clamping errors when the y is flipped (0
on top)

In the function set_scissor_bits, when the y is flipped we might generate
negative values. We should clamp them because all the GenX(SCISSOR) struct
fields are unsigned and we will have an assertion failure when
GenX(SCISSOR_RECT_pack) is going to be called.

I am attaching a piglit test that can trigger this problem.

When the window size is 800x600 calling glViewport with the values:

glViewport(2, 602, 262, 296);

before glDrawArrays will cause the assertion failure.
I am about to submit a fix for this bug.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>