[Mesa-dev] [PATCH] st/mesa: replace _mesa_sysval_to_semantic table with function

Emil Velikov emil.l.velikov at gmail.com
Tue Apr 12 10:56:34 UTC 2016


Hi Brian,

I can see that the fix is in, so just a question for posterity.

On 11 April 2016 at 23:39, Brian Paul <brianp at vmware.com> wrote:
> Instead of using an array indexed by SYSTEM_VALUE_x, just use a
> switch statement.  This fixes a regression caused by inserting new
> SYSTEM_VALUE_ enums but not updating the mapping to TGSI semantics.
>
Considering the switch has a default statement, is there any benefit
of going that way (we won't get any compiler warnings as we add new
values) over using designated initializer* for the const data ? I'm
leaning (although I've not tried it) that MSVC 2013 should be fine
with the latter. It seems to work fine with structs at the very least.

-Emil


More information about the mesa-dev mailing list