summaryrefslogtreecommitdiff
path: root/GL/glx
diff options
context:
space:
mode:
Diffstat (limited to 'GL/glx')
-rw-r--r--GL/glx/glxbyteorder.h5
-rw-r--r--GL/glx/glxcmdsswap.c4
-rw-r--r--GL/glx/glxdri.c1
3 files changed, 8 insertions, 2 deletions
diff --git a/GL/glx/glxbyteorder.h b/GL/glx/glxbyteorder.h
index b9d738dba..cdf6b15f0 100644
--- a/GL/glx/glxbyteorder.h
+++ b/GL/glx/glxbyteorder.h
@@ -39,6 +39,11 @@
#include <byteswap.h>
#elif defined(USE_SYS_ENDIAN_H)
#include <sys/endian.h>
+#elif defined(__APPLE__)
+#include <libkern/OSByteOrder.h>
+#define bswap_16 OSSwapInt16
+#define bswap_32 OSSwapInt32
+#define bswap_64 OSSwapInt64
#else
#define bswap_16(value) \
((((value) & 0xff) << 8) | ((value) >> 8))
diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c
index d59dfdb4c..1857bc1eb 100644
--- a/GL/glx/glxcmdsswap.c
+++ b/GL/glx/glxcmdsswap.c
@@ -496,11 +496,11 @@ int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
GLXDrawable *drawId;
int *buffer;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
(void) drawId;
(void) buffer;
- __GLX_DECLARE_SWAP_VARIABLES;
-
pc += __GLX_VENDPRIV_HDR_SIZE;
__GLX_SWAP_SHORT(&req->length);
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index e03570468..5e683a8ab 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -495,6 +495,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
context->base.copy = __glXDRIcontextCopy;
context->base.forceCurrent = __glXDRIcontextForceCurrent;
+ context->base.pScreen = screen->base.pScreen;
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;