[waffle] Bad parameters passed to glXChooseFBConfig
Brian Paul
brian.e.paul at gmail.com
Wed Dec 26 15:25:48 PST 2012
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.
-Brian
More information about the waffle
mailing list