ir3: Make trig replacement expression exact
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 17 Sep 2021 13:37:49 +0000 (15:37 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Sep 2021 15:45:29 +0000 (15:45 +0000)
commitdfe432d829257dd01070ae1dcd4b663a0e96641f
tree8e6a3211058d9d53610fe0aa575a667c9e5ff515
parent6ed18749de52d1f24b23fad266eb3e8b46702752
ir3: Make trig replacement expression exact

This prevents other optimizations from associating the inner multiply,
which can add inaccuracies that can lead to discontinuities around the
boundary of the ffract. We should use exactly the sequence that the blob
uses to avoid problems.

Since fadd + fmul cannot be combined to ffma when exact is specified, we
have to use ffma ourselves.

Fixes artifacts in PixMark Volplosion with !7458.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12912>
src/freedreno/ci/traces-freedreno.yml
src/freedreno/ir3/ir3_nir_trig.py