util: Change a codegenned switch statement to a nice little table.
authorEric Anholt <eric@anholt.net>
Wed, 1 Jul 2020 20:00:16 +0000 (13:00 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 12 Aug 2020 21:22:24 +0000 (14:22 -0700)
commit9fd0f455af7bc741ea330fcd12478833580dbcfc
treec92947cf63d43685c301506a627fd9e1eb61f2f1
parent4064a6cd207811434e5400a613b3833fbda6b787
util: Change a codegenned switch statement to a nice little table.

This saves us 13 to 35kb on release drivers in my builds.

Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5826>
src/gallium/drivers/svga/svga_pipe_clear.c
src/gallium/frontends/nine/device9.c
src/util/format/u_format_table.py