summaryrefslogtreecommitdiff
path: root/xc/lib/GL/glx/glxclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib/GL/glx/glxclient.h')
-rw-r--r--xc/lib/GL/glx/glxclient.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/xc/lib/GL/glx/glxclient.h b/xc/lib/GL/glx/glxclient.h
index 0f0bc9e63..fffa57b17 100644
--- a/xc/lib/GL/glx/glxclient.h
+++ b/xc/lib/GL/glx/glxclient.h
@@ -43,6 +43,9 @@
#ifdef NEED_GL_FUNCS_WRAPPED
#include "indirect.h"
#endif
+#ifdef XTHREADS
+#include "Xthreads.h"
+#endif
#define GLX_MAJOR_VERSION 1 /* current version numbers */
@@ -560,8 +563,15 @@ extern __GLXcontext *__glXcurrentContext;
** Global lock for all threads in this address space using the GLX
** extension
*/
+#if defined(GLX_DIRECT_RENDERING) && defined(XTHREADS)
+extern xmutex_rec __glXmutex;
+extern xmutex_rec __glXSwapBuffersMutex;
+#define __glXLock() xmutex_lock(&__glXmutex)
+#define __glXUnlock() xmutex_unlock(&__glXmutex)
+#else
#define __glXLock()
#define __glXUnlock()
+#endif
/*
** Setup for a command. Initialize the extension for dpy if necessary.