<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HSW, regression, bisected] i965/pixel_read: Use meta_pbo_GetTexSubImage for PBO ReadPixels (ef0499af255ecd)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89314#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HSW, regression, bisected] i965/pixel_read: Use meta_pbo_GetTexSubImage for PBO ReadPixels (ef0499af255ecd)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89314">bug 89314</a>
              from <span class="vcard"><a class="email" href="mailto:neil@linux.intel.com" title="Neil Roberts <neil@linux.intel.com>"> <span class="fn">Neil Roberts</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=116319" name="attach_116319" title="Example showing the error with GL_R16 to unsigned byte">attachment 116319</a> <a href="attachment.cgi?id=116319&action=edit" title="Example showing the error with GL_R16 to unsigned byte">[details]</a></span>
Example showing the error with GL_R16 to unsigned byte

It looks like there is a similar problem if we convert from a 16-bit component
to 8 bits as well. Here is a test which creates a texture with an internal
format of GL_R16, uploads all possible 16-bit values and then calls
glGetTexImage with a type of GL_UNSIGNED_BYTE. It does this with and without a
PBO. There are a bunch of cases where the results differ like this:

source_value=63095 float=245.505844 expected=246 without_pbo=246 with_pbo=245
source_value=63351 float=246.501953 expected=247 without_pbo=247 with_pbo=246
source_value=63608 float=247.501953 expected=248 without_pbo=248 with_pbo=247</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>