r300: fix bias presubtract algebraic transformation

One fneg too many.

Fixes: 0508db915 ("r300: implement bias presubtract")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40674>
This commit is contained in:
Pavel Ondračka 2026-03-27 10:40:27 +01:00 committed by Marge Bot
parent fdc1fae740
commit e68e519b91

View file

@ -53,8 +53,8 @@ r300_nir_prepare_presubtract = [
(('fadd', -1.0, a), ('fneg', ('fadd', 1.0, ('fneg', a)))),
# Bias presubtract 1 - 2 * x expects MAD -a 2.0 1.0 form.
(('ffma', 2.0, ('fneg', a), 1.0), ('ffma', ('fneg', a), 2.0, 1.0)),
(('ffma', a, -2.0, 1.0), ('fneg', ('ffma', ('fneg', a), 2.0, 1.0))),
(('ffma', -2.0, a, 1.0), ('fneg', ('ffma', ('fneg', a), 2.0, 1.0))),
(('ffma', a, -2.0, 1.0), ('ffma', ('fneg', a), 2.0, 1.0)),
(('ffma', -2.0, a, 1.0), ('ffma', ('fneg', a), 2.0, 1.0)),
(('ffma', 2.0, a, -1.0), ('fneg', ('ffma', ('fneg', a), 2.0, 1.0))),
(('ffma', a, 2.0, -1.0), ('fneg', ('ffma', ('fneg', a), 2.0, 1.0))),
# x * 2 can be usually folded into output modifier for the previous