mesa/swrast: use logf2 instead of util_fast_log2
authorDylan Baker <dylan.c.baker@intel.com>
Thu, 30 Apr 2020 19:40:56 +0000 (12:40 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 30 Jun 2020 21:43:22 +0000 (21:43 +0000)
commitfde25a6ed94409eca4e6b47f73774356314095d9
treecc73f428385711a21007cbd6a1c51ee90465d6f6
parent2e5b2145068223bbe0b4a8cb1ffb2f26e2fb6527
mesa/swrast: use logf2 instead of util_fast_log2

The fast version is apparently not accurate enough. I wrote a very
simply test program that called logf2 and the old LOG2 function 100000
times. Across that the two functions had very similar run times, neither
appeared meaningfully faster, so the optimization of bringing back yet
another way to calculate log2f seems pointless.

Fixes: bd4e769515345a6b20562310334bc828c0bb6605
       ("replace LOG2 with util_fast_log2")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2856
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5406>
src/mesa/swrast/s_span.c
src/mesa/swrast/s_texfilter.c