Module: Mesa Branch: master Commit: d57e95f22af1a1b2d9013db7a15524717bd29579 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d57e95f22af1a1b2d9013db7a15524717bd29579
Author: Brian Paul <[email protected]> Date: Sat May 21 10:43:49 2011 -0600 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. --- src/mesa/state_tracker/st_format.c | 1454 ++++++++++++++---------------------- 1 files changed, 549 insertions(+), 905 deletions(-) Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=d57e95f22af1a1b2d9013db7a15524717bd29579 _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
