glx: Work around a GLX_OML swap method in older dri drivers
The swapMethod config member would typically contain an arbitrary value on older dri drivers. Fix this so that if we detect an illegal value, return GLX_SWAP_UNDEFINED_OML. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
da29a15874
commit
0fc26310d5
|
@ -158,6 +158,13 @@ createModeFromConfig(const __DRIcoreExtension * core,
|
||||||
config->config.bindToTextureTargets |=
|
config->config.bindToTextureTargets |=
|
||||||
GLX_TEXTURE_RECTANGLE_BIT_EXT;
|
GLX_TEXTURE_RECTANGLE_BIT_EXT;
|
||||||
break;
|
break;
|
||||||
|
case __DRI_ATTRIB_SWAP_METHOD:
|
||||||
|
/* Workaround for broken dri drivers */
|
||||||
|
if (value != GLX_SWAP_UNDEFINED_OML &&
|
||||||
|
value != GLX_SWAP_COPY_OML &&
|
||||||
|
value != GLX_SWAP_EXCHANGE_OML)
|
||||||
|
value = GLX_SWAP_UNDEFINED_OML;
|
||||||
|
/* Fall through. */
|
||||||
default:
|
default:
|
||||||
setScalar(&config->config, attrib, value);
|
setScalar(&config->config, attrib, value);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue