[Mesa-dev] numeric defines in p_shader_tokens.h

Brian Paul brian.e.paul at gmail.com
Mon Apr 30 07:04:25 PDT 2012


On Sun, Apr 29, 2012 at 4:03 AM, Olivier Galibert <galibert at pobox.com> wrote:
>  Hi,
>
> Is there any (sane?) reason why the defines in p_shader_tokens aren't
> enums, at least most of them?  The tgsi opcodes aren't an exported
> interface, right?  Right?

We probably could use enums in more places.  One minor issue I seem to
remember is assigning an enum value into a bitfield (which we use a
lot in tgsi) can cause compiler warnings.  But I'd have to
double-check that.  I prefer not seeing a slew of new warnings because
it's easy to miss other important warnings in the midst of that.

-Brian


More information about the mesa-dev mailing list