dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 9 Aug 2017 08:50:23 +0000 (10:50 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 10 Aug 2017 07:15:33 +0000 (09:15 +0200)
commit08bee3e5ac95ad51ef06ba3a4ee349f96f173df7
treec06c09ac8ed709deeb194a36e0a43c2db004dfec
parent82ba384c10d598bee4786ef5f79e92a0e7b53892
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 <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/utils.c