[Mesa-dev] [PATCH 4/4] dri: Introduce SWAP_METHOD tokens

Michel Dänzer michel at daenzer.net
Thu Aug 10 03:20:18 UTC 2017


On 09/08/17 06:53 PM, Thomas Hellstrom wrote:
> We shouldn't be using GLX tokens in the dri subsystem, so define dri
> SWAP_METHOD tokens and translate when necessary. Unfortunately the X server
> uses the dri swap method value untranslated as the GLX fbconfig swapMethod,
> so we can't enumerate these tokens arbitrarily, but rather need to make them
> have the same values as the corresponding GLX tokens.
> 
> Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>

[...]

> diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
> index 406e97d..1d9f441 100644
> --- a/src/gallium/state_trackers/dri/dri_screen.c
> +++ b/src/gallium/state_trackers/dri/dri_screen.c
> @@ -156,7 +156,8 @@ dri_fill_in_modes(struct dri_screen *screen)
>     boolean mixed_color_depth;
>  
>     static const GLenum back_buffer_modes[] = {
> -      GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
> +      __DRI_ATTRIB_SWAP_NONE, __DRI_ATTRIB_SWAP_UNDEFINED,
> +      __DRI_ATTRIB_SWAP_COPY
>     };

BTW, does this array need to include __DRI_ATTRIB_SWAP_EXCHANGE as well,
or is it possible to use GLX_SWAP_EXCHANGE_OML anyway?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list