st/mesa: rewrite st_choose_format() to be table driven

Instead of using a giant switch statement with lots of code, use a
table to convert GL format enums to pipe formats.

Tested by running the old code next to the new and asserting that
the return value was the same for piglit tests.

We're doing a linear search, but if that ever appears to be too slow
the table could easily be sorted or hashed.
This commit is contained in:
Brian Paul 2011-05-21 10:43:49 -06:00
parent c3c1976f52
commit d57e95f22a

File diff suppressed because it is too large Load diff