From: Eric Anholt Date: Mon, 4 May 2020 21:10:40 +0000 (-0700) Subject: freedreno/ir3: Disable sin/cos range reduction for mediump. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a6bbf4c80ee9fc4294ec70073e1602ea527963c;p=mesa.git 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: --- 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@32'), ('fsin', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))), + (('fcos', 'x@32'), ('fcos', ('fsub', ('fmul', 6.2831853, ('ffract', ('fadd', ('fmul', 0.15915494, 'x'), 0.5))), 3.14159265))), ]