[Mesa-dev] [PATCH 1/4] dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD
Michel Dänzer
michel at daenzer.net
Thu Aug 10 03:20:10 UTC 2017
On 09/08/17 06:53 PM, Thomas Hellstrom wrote:
> 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 at vmware.com>
[...]
> diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
> index c37d446..f3ea61e 100644
> --- a/src/mesa/drivers/dri/common/utils.c
> +++ b/src/mesa/drivers/dri/common/utils.c
> @@ -284,8 +284,9 @@ driCreateConfigs(mesa_format format,
> modes->transparentIndex = GLX_DONT_CARE;
> modes->rgbMode = GL_TRUE;
>
> - if ( db_modes[i] == GLX_NONE ) {
> + if ( db_modes[i] == GLX_NONE) {
> modes->doubleBufferMode = GL_FALSE;
> + modes->swapMethod = GLX_SWAP_UNDEFINED_OML;
The indentation of the added line doesn't match that of the previous
line. Patch 4 further changes this code (which is also what Brian's
comment was about AFAICT) to be even less consistently indented compared
to the surrounding code.
With that fixed in both patches, the series is
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list