[waffle] Bad parameters passed to glXChooseFBConfig
Chad Versace
chad.versace at linux.intel.com
Fri Dec 28 11:32:23 PST 2012
On 12/26/2012 03:25 PM, Brian Paul wrote:
> In glx_config.c we're passing -1 for GLX_DEPTH_SIZE and/or
> GLX_STENCIL_SIZE when those buffers are not requested. The negative
> values seem to be the defaults in the wcore_config_attrs object,
> coming from WAFFLE_DONT_CARE=-1.
>
> Per the glXGetFBConfig() man page, negative values are not allowed for
> those attributes.
>
> Mesa's fake GLX code (used for xlib/swrast) isn't handling this
> properly and a lot of piglit tests fail as a consequence.
>
> One possible fix would be to add some zero-clamping code like this in
> glx_config_choose():
>
> GLX_DEPTH_SIZE, MAX2(0, attrs->depth_size),
> GLX_STENCIL_SIZE, MAX2(0, attrs->stencil_size),
>
> I suspect other GLX attribs are also getting illegal negative values too.
Thanks for finding this bug. And yes, the values of GLX_{RED,GREEN,BLUE}_SIZE
are getting illegal negative values too.
Since the GLX and EGL specs are in agreement there---that the default value is 0
and negative values are illegal---I prefer to update core Waffle to match their specs.
I'll send a patch that does so.
More information about the waffle
mailing list