[Mesa-dev] [PATCH 1/4] dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD
Thomas Hellstrom
thellstrom at vmware.com
Thu Aug 10 05:25:00 UTC 2017
On 08/10/2017 05:20 AM, Michel Dänzer wrote:
> 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.
Hmm, Actually this looks awkward in the patches only due to me using
spaces rather than tabs to indent in the new code (old code uses tabs).
Not sure what the preferred strategy is here, use mesa coding style
(spaces) or old dri coding style (tabs). If the latter, we should
probably at some point add subsystem editor setup files that override
the mesa default ones.
>
> With that fixed in both patches, the series is
>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>
>
Thanks for reviewing!
Thomas
More information about the mesa-dev
mailing list