http://bugs.freedesktop.org/show_bug.cgi?id=11909

           Summary: GL_PACK_SWAP_BYTES dosen't work, when reading  back from
                    stencil buffer in GL_INT format
           Product: Mesa
           Version: CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: dri-devel@lists.sourceforge.net


use glPixelStorei to set GL_PACK_SWAP_BYTES to GL_FALSE
draw a group of values into stencil buffer, 
then, use glPixelStorei to set GL_PACK_SWAP_BYTES to GL_TRUE
read back values from buffer, the byte order is not as expected.

The following patch should fix this:

--- src/mesa/main/image.c       2007-08-05 20:06:34.000000000 +0800
+++ src/mesa/main/b.c   2007-08-09 13:23:01.000000000 +0800
@@ -3794,7 +3794,7 @@
          GLint *dst = (GLint *) dest;
          GLuint i;
          for (i=0;i<n;i++) {
-            *dst++ = (GLint) source[i];
+            dst[i] = (GLint) source[i];
          }
          if (dstPacking->SwapBytes) {
             _mesa_swap4( (GLuint *) dst, n );


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to