Merge branch '7.8'
[mesa.git] / src / glx / glxclient.h
index e0b286b68838e99bafac9c1705964e3180caa40f..57d254ea9873f54fe3ecae6e5ef0cb979d7c6735 100644 (file)
@@ -69,7 +69,7 @@
  * We also need to define a USED attribute, so the optimizer doesn't
  * inline a static function that we later use in an alias. - ajax
  */
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if defined(__GNUC__)
 #  define PUBLIC __attribute__((visibility("default")))
 #  define USED __attribute__((used))
 #else
@@ -97,8 +97,13 @@ typedef struct _glapi_table __GLapi;
 #define containerOf(ptr, type, member)              \
     (type *)( (char *)ptr - offsetof(type,member) )
 
-#include <GL/internal/dri_interface.h>
+extern void DRI_glXUseXFont(Font font, int first, int count, int listbase);
+
+#endif
 
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+
+#include <GL/internal/dri_interface.h>
 
 /**
  * Display dependent methods.  This structure is initialized during the
@@ -182,8 +187,8 @@ struct __GLXDRIdrawableRec
 extern __GLXDRIdisplay *driswCreateDisplay(Display * dpy);
 extern __GLXDRIdisplay *driCreateDisplay(Display * dpy);
 extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy);
+extern void dri2InvalidateBuffers(Display *dpy, XID drawable);
 
-extern void DRI_glXUseXFont(Font font, int first, int count, int listbase);
 
 /*
 ** Functions to obtain driver configuration information from a direct
@@ -403,8 +408,13 @@ struct __GLXcontextRec
    const __GLcontextModes *mode;
 
 #ifdef GLX_DIRECT_RENDERING
+#ifdef GLX_USE_APPLEGL
+   void *driContext;
+   Bool do_destroy;
+#else
    __GLXDRIcontext *driContext;
    __DRIcontext *__driContext;
+#endif
 #endif
 
     /**
@@ -501,7 +511,7 @@ struct __GLXscreenConfigsRec
      */
    char *effectiveGLXexts;
 
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /**
      * Per screen direct rendering interface functions and data.
      */
@@ -547,6 +557,10 @@ struct __GLXscreenConfigsRec
    const __DRI2flushExtension *f;
 #endif
 
+#ifdef __DRI2_CONFIG_QUERY
+   const __DRI2configQueryExtension *config;
+#endif
+
 #endif
 
     /**
@@ -612,7 +626,7 @@ struct __GLXdisplayPrivateRec
      */
    __GLXscreenConfigs *screenConfigs;
 
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /**
      * Per display direct rendering interface functions and data.
      */
@@ -790,7 +804,7 @@ extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
                                     int32_t * numerator,
                                     int32_t * denominator);
 
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 GLboolean
 __driGetMscRateOML(__DRIdrawable * draw,
                    int32_t * numerator, int32_t * denominator, void *private);
@@ -798,6 +812,10 @@ __driGetMscRateOML(__DRIdrawable * draw,
 /* So that dri2.c:DRI2WireToEvent() can access
  * glx_info->codes->first_event */
 XExtDisplayInfo *__glXFindDisplay (Display *dpy);
+
+extern __GLXDRIdrawable *
+GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable, int *const scrn_num);
+
 #endif
 
 #endif /* !__GLX_client_h__ */