diff options
author | Thomas Hellstrom <[email protected]> | 2017-08-09 11:25:10 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2017-08-10 09:15:33 +0200 |
commit | 2437ebd7059062d59d2d9b8c6c91977432a5aafa (patch) | |
tree | 0ae8233ccdb62920371fce53e6da456ce0ed73f0 /src/glx/dri_common.c | |
parent | 48bd91785a5231fcadfcfccd0b193c142bc24a40 (diff) |
dri: Introduce SWAP_METHOD tokens
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r-- | src/glx/dri_common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 0f8f7134b4a..e2bbd48d3a5 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -317,6 +317,19 @@ driConfigEqual(const __DRIcoreExtension *core, return GL_FALSE; break; + case __DRI_ATTRIB_SWAP_METHOD: + if (value == __DRI_ATTRIB_SWAP_EXCHANGE) + glxValue = GLX_SWAP_EXCHANGE_OML; + else if (value == __DRI_ATTRIB_SWAP_COPY) + glxValue = GLX_SWAP_COPY_OML; + else + glxValue = GLX_SWAP_UNDEFINED_OML; + + if (!scalarEqual(config, attrib, glxValue)) + return GL_FALSE; + + break; + default: if (!scalarEqual(config, attrib, value)) return GL_FALSE; |