Legacy multiply-add as RDNA 2 runs it (fused, sources flushed): faces' lips #454
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!454
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-454"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@LofisMusk on GitHub · 2026-11-27 10:31 UTC · original
LofisMusk:legacy-fma→main· +118 −8 · 5 files · 2 commits · openCharacters' lips looked pursed and pushed out on Linux under Wine (RX 7900 XTX). This came up as the follow-up to #449, once the head skin was back.
v_mac_legacy_f32andv_mad_legacy_f32were translated as a legacy multiply followed by an add. RDNA 2 decodes the legacy encoding as fused (v_fma_legacy_f32) and flushes its sources, keeping the legacy rule that a zero factor gives a zero product. This ports fxceless f6a09d3 (fork PR #1026).Measured: 6,040 of the title's 25,790 shader translations change. With them the lips close and open naturally, in the same place and with the same moves as before. For comparison, the SDWA sext fix (upstream #3124) changes none of this title's translations.
The translator's output changes, so run
victory shadersagain (or delete the shader cache).🤖 Generated with Claude Code
https://claude.ai/code/session_018VwqyDRnxhcvy1dojRs4Cr
@UwUCammie on GitHub · 2026-11-27 10:54 UTC · original · edited 2026-11-27 10:56 UTC
I ran a generated
v_mad_legacy_f32fixture against this change on the RX 7900 XT with Wine 11.22, RADV 26.3.1 and vkd3d-proton71cae091b06571e.(1 + 2^-23) * (1 - 2^-23) - 1returned0x00000000. The fused result is0xa8800000(-2^-46).The same fixture hit this on vkd3d-proton 3.1 with the earlier fx change. Decorating the generated SPIR-V
FmawithNoContractionmade all four cases pass there. This is a game-free repro, so I can’t tell from it what happens to the mouth in-game.Fixture · Earlier driver test
The follow-up on the current driver confirmed that the generated SPIR-V has one
Fmaand noNoContractionon its result. I added that single decoration to the fixture SPIR-V, ranspirv-val, and reran with the same executable and driver, with the driver cache disabled in both runs. All four cases passed. The override was scoped to the generated fixture. The Wine gameplay candidate is still held.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.