gallium: Obtain ARB_framebuffer_no_attachment constants
[mesa.git] / src / glx / glxclient.h
index e33dba6a8fb39512f13d64ddf6083888b41f0ca5..2776b44a9e5650bdeaf2dcd697f6fe9d30f86cd9 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifdef _WIN32
 #include <stdint.h>
-#endif
+#include <pthread.h>
 #include "GL/glxproto.h"
 #include "glxconfig.h"
 #include "glxhash.h"
-#if defined( HAVE_PTHREAD )
-# include <pthread.h>
-#endif
+#include "util/macros.h"
 
 #include "glxextensions.h"
 
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
 
 #define GLX_MAJOR_VERSION 1       /* current version numbers */
 #define GLX_MINOR_VERSION 4
@@ -125,6 +121,7 @@ struct __GLXDRIscreenRec {
                     int64_t *msc, int64_t *sbc);
    int (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval);
    int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
+   int (*getBufferAge)(__GLXDRIdrawable *pdraw);
 };
 
 struct __GLXDRIdrawableRec
@@ -630,7 +627,6 @@ extern void __glXPreferEGL(int state);
 extern int __glXDebug;
 
 /* This is per-thread storage in an MT environment */
-#if defined( HAVE_PTHREAD )
 
 extern void __glXSetCurrentContext(struct glx_context * c);
 
@@ -647,14 +643,6 @@ extern struct glx_context *__glXGetCurrentContext(void);
 
 # endif /* defined( GLX_USE_TLS ) */
 
-#else
-
-extern struct glx_context *__glXcurrentContext;
-#define __glXGetCurrentContext() __glXcurrentContext
-#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
-
-#endif /* defined( HAVE_PTHREAD ) */
-
 extern void __glXSetCurrentContextNull(void);
 
 
@@ -662,14 +650,9 @@ extern void __glXSetCurrentContextNull(void);
 ** Global lock for all threads in this address space using the GLX
 ** extension
 */
-#if defined( HAVE_PTHREAD )
 extern pthread_mutex_t __glXmutex;
 #define __glXLock()    pthread_mutex_lock(&__glXmutex)
 #define __glXUnlock()  pthread_mutex_unlock(&__glXmutex)
-#else
-#define __glXLock()
-#define __glXUnlock()
-#endif
 
 /*
 ** Setup for a command.  Initialize the extension for dpy if necessary.
@@ -766,9 +749,6 @@ extern char *__glXQueryServerString(Display * dpy, int opcode,
 extern char *__glXGetString(Display * dpy, int opcode,
                             CARD32 screen, CARD32 name);
 
-extern char *__glXstrdup(const char *str);
-
-
 extern const char __glXGLClientVersion[];
 extern const char __glXGLClientExtensions[];
 
@@ -781,7 +761,7 @@ extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 extern GLboolean
-__glxGetMscRate(__GLXDRIdrawable *glxDraw,
+__glxGetMscRate(struct glx_screen *psc,
                int32_t * numerator, int32_t * denominator);
 
 /* So that dri2.c:DRI2WireToEvent() can access