Revert "spirv: Use a simpler and more correct implementaiton of tanh()"
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 27 Feb 2020 19:38:53 +0000 (11:38 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 5 Mar 2020 15:23:31 +0000 (15:23 +0000)
commit9f9432d56c055b9704a76cad44da88d5e12f825c
tree4c2bbb6e64f97819bd5dd7fbaaa66d1f6dd41e9e
parent986e92f0ea803caf014adc40e900bc774af71da3
Revert "spirv: Use a simpler and more correct implementaiton of tanh()"

This reverts commit da1c49171d0df185545cfbbd600e287f7c6160fa.

The reduced formula has precision problems on fp16 around 0.  Bring
back the old formula, but make sure to keep the clamping.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4054>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4054>
src/compiler/spirv/vtn_glsl450.c