mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
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:
parent
c3c1976f52
commit
d57e95f22a
1 changed files with 551 additions and 907 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue