[Mesa-dev] [PATCH 1/2] st/glx: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values

Chad Versace chad.versace at linux.intel.com
Fri Jan 4 10:45:39 PST 2013


On 01/03/2013 04:35 PM, Brian Paul wrote:
> Fixes piglit glx-dont-care-mask test.
> 
> Note: This is a candidate for the stable branches.
> ---
>  src/gallium/state_trackers/glx/xlib/glx_api.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
> index 8e3c6b8..e0e12c8 100644
> --- a/src/gallium/state_trackers/glx/xlib/glx_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
> @@ -687,6 +687,17 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
>  
>     while (*parselist) {
>  
> +      if (fbConfig &&
> +          parselist[1] == GLX_DONT_CARE &&
> +          parselist[0] != GLX_LEVEL) {
> +         /* For glXChooseFBConfig(), skip attributes whose value is
> +          * GLX_DONT_CARE, unless it's GLX_LEVEL (which can legitimately be
> +          * a negative value).
> +          */
> +         parselist += 2;
> +         continue;
> +      }
> +
>        switch (*parselist) {
>  	 case GLX_USE_GL:
>              if (fbConfig) {
> 

For both patches,
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

A spec quote would be nice here, but not a big deal.

>From page 17 (23 of the pdf) of the GLX 1.4 spec:
   GLX DONT CARE may be specified for all attributes except GLX LEVEL.


More information about the mesa-dev mailing list