<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 - gallium/wgl: Another fix to context creation without prior SetPixelFormat()"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103412">103412</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>gallium/wgl: Another fix to context creation without prior SetPixelFormat()
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>17.2
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows (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>Other
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>frank.richter@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=135000" name="attach_135000" title="patch: Don't blindly use GetPixelFormat() return value">attachment 135000</a> <a href="attachment.cgi?id=135000&action=edit" title="patch: Don't blindly use GetPixelFormat() return value">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103412&attachment=135000'>[review]</a>
patch: Don't blindly use GetPixelFormat() return value

This is a follow-up to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - gallium/wgl: Allow context creation without prior SetPixelFormat()"
   href="show_bug.cgi?id=101326">bug 101326</a>.

The patch for that bug blindly took the pixel format index returned by
GetPixelFormat(). However, what's the guarantee that this pixel format index is
actually sensible in the Mesa context, or even a valid index?

Well, none actually. (It's also not an entirely theoretic problem. I received a
crash report where an invalid index is indicated, though I couldn't reproduce
the exact scenario.)

The attached patch fixes the blind usage of the index by computing the proper
Mesa pixel format index from the pixel format description.</pre>
        </div>
      </p>


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

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