summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-10-15 16:57:09 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-10-21 13:30:14 +0200
commit1ab7fe38df0396e0da96ab67b3d9aa237563b3ca (patch)
treebf3f6847bee065158aaf526d6db05438118a5b90 /GL
parentfe32a0eb9fee450b530a8944aa3a2a16573b5f9a (diff)
Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms.
(cherry picked from 3ad1642f1bbaa5f96558cdf3384b40f7122f8781 commit)
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/glxdri.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index b5723049d..170662c7e 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -359,7 +359,12 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
if (pixmap->drawable.depth >= 24) {
bpp = 4;
format = GL_BGRA;
- type = GL_UNSIGNED_BYTE;
+ type =
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+ GL_UNSIGNED_BYTE;
+#else
+ GL_UNSIGNED_INT_8_8_8_8_REV;
+#endif
} else {
bpp = 2;
format = GL_RGB;