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 /include/GL | |
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 'include/GL')
-rw-r--r-- | include/GL/internal/dri_interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 5e8fce79f91..2cbd738439e 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -724,6 +724,18 @@ struct __DRIuseInvalidateExtensionRec { #define __DRI_ATTRIB_TEXTURE_2D_BIT 0x02 #define __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT 0x04 +/* __DRI_ATTRIB_SWAP_METHOD */ +/* Note that with the exception of __DRI_ATTRIB_SWAP_NONE, we need to define + * the same tokens as GLX. This is because old and current X servers will + * transmit the driconf value grabbed from the AIGLX driver untranslated as + * the GLX fbconfig value. __DRI_ATTRIB_SWAP_NONE is only used by dri drivers + * to signal to the dri core that the driconfig is single-buffer. + */ +#define __DRI_ATTRIB_SWAP_NONE 0x0000 +#define __DRI_ATTRIB_SWAP_EXCHANGE 0x8061 +#define __DRI_ATTRIB_SWAP_COPY 0x8062 +#define __DRI_ATTRIB_SWAP_UNDEFINED 0x8063 + /** * This extension defines the core DRI functionality. * |