Mesa (master): freedreno/ir3: Disable sin/cos range reduction for mediump.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 5 17:47:59 UTC 2020


Module: Mesa
Branch: master
Commit: 9a6bbf4c80ee9fc4294ec70073e1602ea527963c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a6bbf4c80ee9fc4294ec70073e1602ea527963c

Author: Eric Anholt <eric at anholt.net>
Date:   Mon May  4 14:10:40 2020 -0700

freedreno/ir3: Disable sin/cos range reduction for mediump.

robclark noted that the blob wasn't doing range reduction in the mediump
case, and I confirmed it on
dEQP-GLES3.functional.shaders.operator.angle_and_trigonometry.sin.mediump_float_fragment
vs
dEQP-GLES3.functional.shaders.operator.angle_and_trigonometry.sin.highp_float_fragment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4893>

---

 src/freedreno/ir3/ir3_nir_trig.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/ir3/ir3_nir_trig.py b/src/freedreno/ir3/ir3_nir_trig.py
index 7e2d554b0d0..93eb8cae940 100644
--- a/src/freedreno/ir3/ir3_nir_trig.py
+++ b/src/freedreno/ir3/ir3_nir_trig.py
@@ -26,8 +26,8 @@ import argparse
 import sys
 
 trig_workarounds = [
-   (('fsin', 'x'), ('fsin', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))),
-   (('fcos', 'x'), ('fcos', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))),
+   (('fsin', 'x at 32'), ('fsin', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))),
+   (('fcos', 'x at 32'), ('fcos', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))),
 ]
 
 



More information about the mesa-commit mailing list