[Mesa-dev] [PATCH] glx: only advertise GLX_INTEL_swap_event if it's supported

Brian Paul brianp at vmware.com
Fri Jan 25 12:50:40 PST 2013


On 01/24/2013 06:59 PM, Zack Rusin wrote:
> Only drivers supporting DRI2 version>=4 support GLX_INTEL_swap_event.
> So lets mark it as such otherwise applications which use this extension
> (i.e. everything based on Clutter, e.g. gnome-shell) break horribly on
> drivers supporting DRI2 versions only up to 3.
>
> Note: This is a candidate for the 9.0 branch.
>
> Signed-off-by: Zack Rusin<zackr at vmware.com>
> ---
>   src/glx/dri2_glx.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index 1b3cf2b..a51716f 100644
> --- a/src/glx/dri2_glx.c
> +++ b/src/glx/dri2_glx.c
> @@ -1062,8 +1062,9 @@ dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions)
>      __glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
>      __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
>
> -   /* FIXME: if DRI2 version supports it... */
> -   __glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
> +   if (psc->dri2->base.version>= 4) {
> +      __glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
> +   }
>
>      if (psc->dri2->base.version>= 3) {
>         const unsigned mask = psc->dri2->getAPIMask(psc->driScreen);

Other people are more familiar with this than me, but
Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list