Bug 5911 - glDrawArrays server byte-swapping bug and patch.
Summary: glDrawArrays server byte-swapping bug and patch.
Status: RESOLVED DUPLICATE of bug 5978
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: SPARC Solaris
: high major
Assignee: Xorg Project Team
QA Contact:
Keywords: patch
Depends on:
Reported: 2006-02-16 23:42 UTC by Colin McDonald
Modified: 2006-02-27 05:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Colin McDonald 2006-02-16 23:42:26 UTC
The OpenGL glDrawArrays function is not working when rendering from a
big-endian client application host to a little-endian display server.
No output is produced and/or the X server can crash.

Function __glXDispSwap_DrawArrays in xserver/xorg/GL/glx/render2swap.c
from the CVS head is not byte-swapping all of the values as needed.
There are two loops through the compHeader structure array, but the
extracted values are only swapped in the first loop.

diff -c of patch:

*** render2swap.c       Thu Feb 16 12:11:01 2006
--- render2swap.c.fix   Thu Feb 16 12:08:59 2006
*** 311,316 ****
--- 311,320 ----
        GLint numVals = compHeader[i].numVals;
        GLenum component = compHeader[i].component;
+       __GLX_SWAP_INT(&datatype);
+       __GLX_SWAP_INT(&numVals);
+       __GLX_SWAP_INT(&component);
        swapArray(numVals, datatype, stride, numVertexes, pc);
          switch (component) {
Comment 1 Colin McDonald 2006-02-28 00:11:42 UTC
Fix applied to xserver/xorg/GL/glx/render2swap.c version 1.6 by Alexander 
Gottwald (bug #5978).

*** This bug has been marked as a duplicate of 5978 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.