On 08/02/2018 04:40 PM, Ilia Mirkin wrote: > On Thu, Aug 2, 2018 at 7:34 PM, Ian Romanick <[email protected]> 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@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@localhost home]$ I think this is a (really trivial) bug in the Khronos header. Boo. > [Your other point about auto-generation and coming from Khronos > obviously stand.] > > -ilia _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
