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

Ian Romanick idr at freedesktop.org
Fri Jul 20 17:51:08 PDT 2012


On 07/20/2012 05:54 AM, Jon TURNEY wrote:
> 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)

 From the GLX perspective, GLX_SGIS_multisample (not supported on Apple) 
and GLX_ARB_multisample (supported on Apple) are identical.  It has 
always struck me as weird that they'll advertise one but not the other.

Note, however, that GL_ARB_multisample and GL_SGIS_multisample are *not* 
identical.

>   - 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)

The only thing added by this extension is the ability for the server to 
send an extra "priority" field with visuals that change some of the 
sorting rules.  I added support for this years ago when I thought we 
were going to use it for something.  That never happened.  It should be 
safe to remove this extension.

> 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,
>


More information about the xorg-devel mailing list