[PATCH] Drop GLXServerExtensions string constant listing GLX extensions for swrast

Jon Turney jon.turney at dronecode.org.uk
Wed Sep 30 05:53:06 PDT 2015


Since 2d719433, it looks like we are free()-ing this constant string when we
build the real extension list string, which is perhaps not ideal. Instead
initialize GLXextensions to strdup(""), as the other dri loaders do.

The GLX extension list for swrast is now generated dynamically, so the string
constant is no longer needed.

Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
---
 glx/glxscreens.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index b0ad3b7..288a0be 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -160,20 +160,6 @@ static const char GLServerExtensions[] =
 */
 unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;
 unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION;
-static char GLXServerExtensions[] =
-    "GLX_ARB_multisample "
-    "GLX_EXT_visual_info "
-    "GLX_EXT_visual_rating "
-    "GLX_EXT_import_context "
-    "GLX_EXT_texture_from_pixmap "
-    "GLX_OML_swap_method "
-    "GLX_SGI_make_current_read "
-#ifndef __APPLE__
-    "GLX_SGIS_multisample "
-#endif
-    "GLX_SGIX_fbconfig "
-    "GLX_SGIX_pbuffer "
-    "GLX_MESA_copy_sub_buffer ";
 
 static Bool
 glxCloseScreen(ScreenPtr pScreen)
@@ -329,7 +315,7 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
 
     pGlxScreen->pScreen = pScreen;
     pGlxScreen->GLextensions = strdup(GLServerExtensions);
-    pGlxScreen->GLXextensions = strdup(GLXServerExtensions);
+    pGlxScreen->GLXextensions = strdup("");
 
     /* All GLX providers must support all of the functionality required for at
      * least GLX 1.2.  If the provider supports a higher version, the GLXminor
-- 
2.5.3



More information about the xorg-devel mailing list