mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 02:40:46 +02:00
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>
This commit is contained in:
parent
08bee3e5ac
commit
fe4aae0e6a
1 changed files with 11 additions and 1 deletions
|
|
@ -524,7 +524,17 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
|
|||
config->visualSelectGroup = *bp++;
|
||||
break;
|
||||
case GLX_SWAP_METHOD_OML:
|
||||
config->swapMethod = *bp++;
|
||||
if (*bp == GLX_SWAP_UNDEFINED_OML ||
|
||||
*bp == GLX_SWAP_COPY_OML ||
|
||||
*bp == GLX_SWAP_EXCHANGE_OML) {
|
||||
config->swapMethod = *bp++;
|
||||
} else {
|
||||
/* X servers with old HW drivers may return any value here, so
|
||||
* assume GLX_SWAP_METHOD_UNDEFINED.
|
||||
*/
|
||||
config->swapMethod = GLX_SWAP_UNDEFINED_OML;
|
||||
bp++;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case GLX_SAMPLE_BUFFERS_SGIS:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue