mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
Revert "nir/opt_algebraic: optimize fmax(-fmin(b, a), b) -> fmax(b, -a)"
This is wrong for negative values.
This reverts commit 07cd30ca29.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12515>
This commit is contained in:
parent
a16f3963d3
commit
f4b858e746
1 changed files with 0 additions and 5 deletions
|
|
@ -652,11 +652,6 @@ optimizations.extend([
|
|||
# fmin(0.0, b)) while the right one is "b", so this optimization is inexact.
|
||||
(('~fmin', ('fsat', a), '#b(is_zero_to_one)'), ('fsat', ('fmin', a, b))),
|
||||
|
||||
# max(-min(b, a), b) -> max(b, -a)
|
||||
# min(-max(b, a), b) -> min(-b, -a)
|
||||
(('fmax', ('fneg', ('fmin', b, a)), b), ('fmax', b, ('fneg', a))),
|
||||
(('fmin', ('fneg', ('fmax', b, a)), b), ('fmin', ('fneg', b), ('fneg', a))),
|
||||
|
||||
# If a in [0,b] then b-a is also in [0,b]. Since b in [0,1], max(b-a, 0) =
|
||||
# fsat(b-a).
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue