diff options
author | Thomas Hellstrom <[email protected]> | 2017-08-09 10:50:23 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2017-08-10 09:15:33 +0200 |
commit | 08bee3e5ac95ad51ef06ba3a4ee349f96f173df7 (patch) | |
tree | c06c09ac8ed709deeb194a36e0a43c2db004dfec /src | |
parent | 82ba384c10d598bee4786ef5f79e92a0e7b53892 (diff) |
dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD
The attribMap had two entries for this attribute, and
driGetConfigAttribIndex didn't return a proper value for this attribute.
Fix this, and also make sure we return SWAP_UNDEFINED for single-buffer
configs as required by the GLX_OML_swap_method spec.
Finally bump the dri core extension version to 2, indicating that we
correctly report __DRI_ATTRIB_SWAP_METHOD.
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/utils.c | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 39ecaf0658a..31a3040365a 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -767,7 +767,7 @@ driSwapBuffers(__DRIdrawable *pdp) /** Core interface */ const __DRIcoreExtension driCoreExtension = { - .base = { __DRI_CORE, 1 }, + .base = { __DRI_CORE, 2 }, .createNewScreen = NULL, .destroyScreen = driDestroyScreen, diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index c37d446a1e4..7ae4cb8cd20 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -286,6 +286,7 @@ driCreateConfigs(mesa_format format, if ( db_modes[i] == GLX_NONE ) { modes->doubleBufferMode = GL_FALSE; + modes->swapMethod = GLX_SWAP_UNDEFINED_OML; } else { modes->doubleBufferMode = GL_TRUE; @@ -403,7 +404,6 @@ static const struct { unsigned int attrib, offset; } attribMap[] = { * so the iterator includes them though.*/ __ATTRIB(__DRI_ATTRIB_RENDER_TYPE, level), __ATTRIB(__DRI_ATTRIB_CONFIG_CAVEAT, level), - __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, level) }; @@ -428,10 +428,6 @@ driGetConfigAttribIndex(const __DRIconfig *config, else *value = 0; break; - case __DRI_ATTRIB_SWAP_METHOD: - /* XXX no return value??? */ - break; - default: /* any other int-sized field */ *value = *(unsigned int *) |