[PATCH xserver 1/2] glx: Work around a GLX_OML swap method in older dri drivers
Thomas Hellstrom
thellstrom at vmware.com
Tue Sep 12 16:31:21 UTC 2017
Hi!
Could someone review this series please,
Thanks
Thomas
On 09/06/2017 04:27 PM, Thomas Hellstrom wrote:
> 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 at vmware.com>
> ---
> glx/glxdricommon.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
> index f6c6fcd..d374dc7 100644
> --- a/glx/glxdricommon.c
> +++ b/glx/glxdricommon.c
> @@ -181,6 +181,13 @@ createModeFromConfig(const __DRIcoreExtension * core,
> config->config.bindToTextureTargets |=
> GLX_TEXTURE_RECTANGLE_BIT_EXT;
> 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:
> setScalar(&config->config, attrib, value);
> break;
More information about the xorg-devel
mailing list