<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 - glDrawPixels with GL_COLOR_INDEX never returns."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90213">90213</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glDrawPixels with GL_COLOR_INDEX never returns.
          </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>Mesa core
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>juhapekka.heikkila@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When I run glDrawPixels(width, height, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, data)
code execution never return.

Commit 84eb402c01962e3ff4b70c9948c85a61ed81678f changed the path so we end up
in _mesa_format_from_format_and_type at src/mesa/main/glformats.c:2682 which
does not seem to know anything about GL_COLOR_INDEX. On release build this
function should return a value but doesn't and gets confused, on debug build I
get assert _mesa_format_from_format_and_type: Assertion `!"Unsupported format"'
failed.

I made minimalistic test for this, one can get it from here
<a href="https://github.com/juhapekka/CI_test.git">https://github.com/juhapekka/CI_test.git</a>

There seems also exist test in Piglit which does similar and halts Piglit run.
Piglit test is gl-1.0-drawpixels-color-index</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>