[Mesa-dev] [PATCH] include: update GL & GLES headers

Jason Ekstrand jason at jlekstrand.net
Fri Aug 3 00:05:41 UTC 2018



On August 2, 2018 16:45:55 Ian Romanick <idr at freedesktop.org> wrote:

> On 08/02/2018 04:40 PM, Ilia Mirkin wrote:
>> On Thu, Aug 2, 2018 at 7:34 PM, Ian Romanick <idr at freedesktop.org> wrote:
>>> On 08/02/2018 02:26 PM, Sagar Ghuge wrote:
>>>> I have few comments below, I might be wrong about those but except that
>>>> this patch looks good to me. I checked it against Khronos headers.
>>>>
>>>> On 08/01/2018 11:34 AM, Marek Olšák wrote:
>>>>> +#ifndef GL_AMD_framebuffer_multisample_advanced
>>>>> +#define GL_AMD_framebuffer_multisample_advanced
>>>>
>>>> I might be wrong but value is missing for a macro I guess. I am not sure
>>>> but, are we just trying to expand it to nothing. Please let me know if I
>>>> am missing something here.
>>>
>>> This is the same as '#define GL_AMD_framebuffer_multisample_advanced 1'.
>>
>> For the sake of completeness, it's actually different.
>>
>> If you #define foo 1, then the token "foo" will be replaced with the
>> token "1" after preprocessing. If you just do "#define foo", then foo
>> may only be used with #ifdef foo, or #if defined(foo). Using foo
>> outside of that will cause it to be replaced with nothing.
>
> I was going to argue, but...
>
> [idr at localhost home]$ echo "#define foo
> foo" | cpp -E
> # 1 "<stdin>"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 31 "<command-line>"
> # 1 "/usr/include/stdc-predef.h" 1 3 4
> # 32 "<command-line>" 2
> # 1 "<stdin>"
>
>
> [idr at localhost home]$
>
> I think this is a (really trivial) bug in the Khronos header.  Boo.

All this discussion is interesting, of course, but it seems as if we've 
gotten distracted and collectively forgot to ack the patch...




More information about the mesa-dev mailing list