[PATCH 4/4] Harmonize swrast GLX extension list with minimum for other GLX providers

Jon TURNEY jon.turney at dronecode.org.uk
Fri Jul 20 05:54:14 PDT 2012


Use __glXInitExtensionEnableBits() so the GLX extensions reported for swrast
includes the minimum set of extensions we expect from all providers.

This changes the behaviour of swrast:

- GLX_SGIS_multisample will now be reported on APPLE (I can't work out why this
conditional was added, it dates back to the XFree86 4.4RC3 import. I don't think
swrast is available in Xquartz anyhow, since it overloads the swrast provider
with the native one)

 - GLX_SGIX_visual_select_group will be reported (I guess this should work as
all the pieces on both sides are in place in mesa, even if it may not be very
useful, but I suppose I should test that assumption)

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 glx/glxdriswrast.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index d5cfaf1..18af28d 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -410,6 +410,9 @@ initializeExtensions(__GLXDRIscreen * screen)
     const __DRIextension **extensions;
     int i;
 
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_make_current_read");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
+
     extensions = screen->core->getExtensions(screen->driScreen);
 
     for (i = 0; extensions[i]; i++) {
@@ -448,25 +451,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     screen->base.swapInterval = NULL;
     screen->base.pScreen = pScreen;
 
-    /*
-      Rather than calling __glXInitExtensionEnableBits, we explicitly enable a
-      specific set of extensions here to maintain the historical behaviour, which
-      is slightly different.
-    */
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_multisample");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_info");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_rating");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_import_context");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_texture_from_pixmap");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_make_current_read");
-#ifndef __APPLE__
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIS_multisample");
-#endif
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_pbuffer");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_visual_select_group");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
+    __glXInitExtensionEnableBits(screen->glx_enable_bits);
 
     screen->driver = glxProbeDriver(driverName,
                                     (void **) &screen->core,
-- 
1.7.9



More information about the xorg-devel mailing list