glx: Drop support for GLX_MESA_allocate_memory
[mesa.git] / src / glx / dri_common.c
index dbc6082313bef50b7333240a8ccc68206655514a..70ff8f1c0333faef3129fe050fa4d353a5fe765b 100644 (file)
@@ -33,7 +33,7 @@
  *   Kristian Høgsberg (krh@redhat.com)
  */
 
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 
 #include <unistd.h>
 #include <dlfcn.h>
@@ -338,13 +338,10 @@ driConvertConfigs(const __DRIcoreExtension * core,
 
 /* Bind DRI1 specific extensions */
 _X_HIDDEN void
-driBindExtensions(__GLXscreenConfigs *psc)
+driBindExtensions(__GLXscreenConfigs *psc, const __DRIextension **extensions)
 {
-   const __DRIextension **extensions;
    int i;
 
-   extensions = psc->core->getExtensions(psc->__driScreen);
-
    for (i = 0; extensions[i]; i++) {
 #ifdef __DRI_SWAP_CONTROL
       /* No DRI2 support for swap_control at the moment, since SwapBuffers
@@ -375,13 +372,11 @@ driBindExtensions(__GLXscreenConfigs *psc)
 
 /* Bind DRI2 specific extensions */
 _X_HIDDEN void
-dri2BindExtensions(__GLXscreenConfigs *psc)
+dri2BindExtensions(__GLXscreenConfigs *psc,
+                  const __DRIextension **extensions)
 {
-   const __DRIextension **extensions;
    int i;
 
-   extensions = psc->core->getExtensions(psc->__driScreen);
-
    for (i = 0; extensions[i]; i++) {
 #ifdef __DRI_TEX_BUFFER
       if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0)) {
@@ -413,13 +408,11 @@ dri2BindExtensions(__GLXscreenConfigs *psc)
 
 /* Bind extensions common to DRI1 and DRI2 */
 _X_HIDDEN void
-driBindCommonExtensions(__GLXscreenConfigs *psc)
+driBindCommonExtensions(__GLXscreenConfigs *psc,
+                       const __DRIextension **extensions)
 {
-   const __DRIextension **extensions;
    int i;
 
-   extensions = psc->core->getExtensions(psc->__driScreen);
-
    for (i = 0; extensions[i]; i++) {
 #ifdef __DRI_COPY_SUB_BUFFER
       if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
@@ -428,13 +421,6 @@ driBindCommonExtensions(__GLXscreenConfigs *psc)
       }
 #endif
 
-#ifdef __DRI_ALLOCATE
-      if (strcmp(extensions[i]->name, __DRI_ALLOCATE) == 0) {
-        psc->allocate = (__DRIallocateExtension *) extensions[i];
-        __glXEnableDirectExtension(psc, "GLX_MESA_allocate_memory");
-      }
-#endif
-
 #ifdef __DRI_FRAME_TRACKING
       if (strcmp(extensions[i]->name, __DRI_FRAME_TRACKING) == 0) {
         psc->frameTracking = (__DRIframeTrackingExtension *) extensions[i];