[Piglit] [PATCH] gl30basic: add some extra suspected extension

Ilia Mirkin imirkin at alum.mit.edu
Thu Jun 29 13:46:59 UTC 2017


On Thu, Jun 29, 2017 at 9:19 AM, Brian Paul <brianp at vmware.com> wrote:
> A couple more nit-picks below.
>
> On 06/29/2017 02:21 AM, Sandra Koroniewska wrote:
>>
>> WGL_EXT_SWAP_CONTROL is added for historical reasons.

Is it WGL_EXT_SWAP_CONTROL or WGL_EXT_swap_control? I assume you
tested this, so it's the latter (as that's what's in the code).

>> ---
>>   tests/general/gl30basic.c | 11 +++++------
>>   1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/tests/general/gl30basic.c b/tests/general/gl30basic.c
>> index 2207787bb..92d21cd6b 100644
>> --- a/tests/general/gl30basic.c
>> +++ b/tests/general/gl30basic.c
>> @@ -95,12 +95,11 @@ test_extension_list(void)
>>         const GLubyte *ext = glGetStringi(GL_EXTENSIONS, k);
>>         if (0)
>>            printf("Ext[%d] = %s\n", k, (char *) ext);
>> -      if (!ext ||
>> -          ext[0] != 'G' ||
>> -          ext[1] != 'L' ||
>> -          ext[2] != '_') {
>> -         printf("%s: bad extension string [%d]: %s\n", Prog, k, ext);
>> -         return PIGLIT_FAIL;
>> +
>> +      /*In some drivers WGL_EXT_swap_control is in the extension string
>> for historical reasons*/
>
>
> We usually put a space after /* and before */  Also, the comment should
> probably be wrapped at < 80 columns.  So:
>
>
> /* In some drivers WGL_EXT_swap_control is in the extension
>  * string for historical reasons
>  */
>
>
>> +      if (!ext || (strncmp(ext, "GL_", 3) != 0 && strcmp(ext,
>> "WGL_EXT_swap_control") != 0)){
>
>
> Space between ) and { at end.
>
>> +          printf("%s: bad extension string [%d]: %s\n", Prog, k, ext);
>> +          return PIGLIT_FAIL;
>>         }
>>         if (strchr((char *) ext, ' ')) {
>>            printf("%s: extension string [%d] contains a space: %s\n",
>> Prog, k, ext);
>>
>
> -Brian
>
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list