glx: Work around X servers reporting bogus values of GLX_SWAP_METHOD_OML
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 9 Aug 2017 09:00:16 +0000 (11:00 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 10 Aug 2017 07:15:33 +0000 (09:15 +0200)
commitfe4aae0e6ad395ef48c2f710c3deb51a0b769000
treef3a33b2a03c878defd4fd7bb27ce8509a980e07b
parent08bee3e5ac95ad51ef06ba3a4ee349f96f173df7
glx: Work around X servers reporting bogus values of GLX_SWAP_METHOD_OML

Due to the recently fixed bug where dri drivers didn't report a correct
__DRI_ATTRIB_SWAP_METHOD value, and the fact that X servers just forward this
incorrect value (from the AIGLX dri driver) untranslated as
GLX_SWAP_METHOD_OML, the latter value might be undefined when old dri AIGLX
drivers are used, which breaks client fbconfig matching with server fbconfigs.

So work around this by assuming GLX_SWAP_METHOD_UNDEFINED when a bogus value
is read.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/glx/glxext.c