mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-17 06:10:38 +02:00
nir: mark exact fmul in ldexp lowering
this chain of fmul is deliberately chosen for floating point precision reasons, it needs to be exact, or else we might try to reassociate it and break subnormal handling. avoids regressing dEQP-VK.glsl.builtin.precision.ldexp_subnormals.* Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36257>
This commit is contained in:
parent
ecfca8ec6f
commit
421d0e0953
1 changed files with 1 additions and 1 deletions
|
|
@ -3091,7 +3091,7 @@ def ldexp(f, exp, bits):
|
|||
# of our exponent is doubled.
|
||||
pow2_1 = fexp2i(('ishr', exp, 1), bits)
|
||||
pow2_2 = fexp2i(('isub', exp, ('ishr', exp, 1)), bits)
|
||||
return ('fmul', ('fmul', f, pow2_1), pow2_2)
|
||||
return ('!fmul', ('!fmul', f, pow2_1), pow2_2)
|
||||
|
||||
optimizations += [
|
||||
(('ldexp@16', 'x', 'exp'), ldexp('x', 'exp', 16), 'options->lower_ldexp'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue