[Mesa-dev] [PATCH] Make glXChooseFBConfig handle unspecified sRGB correctly
Adam Jackson
ajax at redhat.com
Tue Jul 31 18:06:22 UTC 2018
On Mon, 2018-07-30 at 12:14 -0700, Eric Anholt wrote:
> Jon Turney <jon.turney at dronecode.org.uk> writes:
>
> > Make glXChooseFBConfig properly handle the case where the only matching
> > configs have the sRGB flag set, but no sRGB attribute is specified.
> >
> > Since 6e06e281, the sRGBcapable flag is now actually compared, using
> > MATCH_DONT_CARE.
> >
> > 7b0f912e added defaulting of sRGBcapable to GL_FALSE in
> > __glXInitializeVisualConfigFromTags(), to handle servers which don't report
> > it, but this function is also used by glXChooseFBConfig(), so sRGBcapable is
> > implicitly false when not explicitly specified.
> >
> > (This can cause e.g. glxinfo to fail to find anything matching the simple
> > config it looks for if all the candidates have the sRGB flag set to true.
> > I'm assuming this doesn't happen 'normally' as candidate configs with and
> > without sRGB true are available)
> >
> > Move this defaulting to createConfigsFromProperties(), and set the default
> > for glXChooseFBConfig() in init_fbconfig_for_chooser() to GLX_DONT_CARE.
>
> Reviewed-by: Eric Anholt <eric at anholt.net>
This change looks sane, but I note that the extension doesn't actually
specify how we're supposed to handle this attribute. I've filed a spec
bug, in the vague hope that that'll be addressed someday:
https://github.com/KhronosGroup/OpenGL-Registry/issues/199
Regardless, patch merged, thanks:
To gitlab.freedesktop.org:mesa/mesa.git
03a61b977e1..faa29c0e244 master -> master
- ajax
More information about the mesa-dev
mailing list