[Mesa-dev] [PATCH] st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0

Kenneth Graunke kenneth at whitecape.org
Sun Dec 2 19:29:44 PST 2012


On 12/02/2012 04:12 PM, Brian Paul wrote:
> From: Brian Paul <brianp at vmware.com>
>
> Only fail if GLX_SAMPLE_BUFFERS_ARB or GLX_SAMPLES_ARB are non-zero.
> We were already doing this in the older swrast/glx code.
>
> This fixes a piglit/waffle problem where we'd always fail to get a
> visual/config and report the test as "skip".
> ---
>   src/gallium/state_trackers/glx/xlib/glx_api.c |   10 ++++++----
>   1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
> index 08db6e8..8e3c6b8 100644
> --- a/src/gallium/state_trackers/glx/xlib/glx_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
> @@ -832,11 +832,13 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
>             * GLX_ARB_multisample
>             */
>            case GLX_SAMPLE_BUFFERS_ARB:
> -            /* ms not supported */
> -            return NULL;
>            case GLX_SAMPLES_ARB:
> -            /* ms not supported */
> -            return NULL;
> +            parselist++;
> +            if (*parselist++ != 0) {
> +               /* ms not supported */
> +               return NULL;
> +            }
> +            break;
>
>            /*
>             * FBConfig attribs.

Obvious enough :)

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list