On Mon, Jun 13, 2016 at 09:39:39AM -0700, Nanley Chery wrote:
> You can add an entry to the end of the enum defined in extensions.h called
> "MESA_EXTENSION_COUNT"  or similar.

This is a good idea, but with one caveat:
I've seen twice already bugs caused by people using ALL_CAPS counter
entries in enums, and then someone trying to use them in #if conditions,
where it resolves as `0` since the preprocessor doesn't know them.

I would strongly advise to use lower case names, so as to avoid this
confusion.

Cheers,
  Eric
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to