Skip to content

Shader: legacy multiply-add as RDNA 2 runs it (#67, point 4) - #74

Open
UwUCammie wants to merge 1 commit into
borntofrag34:linux-winefrom
UwUCammie:shader/legacy-mad-fused
Open

UwUCammie wants to merge 1 commit into
borntofrag34:linux-winefrom
UwUCammie:shader/legacy-mad-fused

Conversation

@UwUCammie

Copy link
Copy Markdown

Point 4 of #67: v_mac_legacy_f32 and v_mad_legacy_f32 become one FMad with flushed sources and the legacy zero rule (a zero factor gives +0 + c, with the +0 rule of legacy_sum kept). From fsrajner/VIctory-7900XTX c36478c, originally fxceless f6a09d3. VICTORY_LEGACY_FUSED=0 gives the old form; the cache keys on the switch only while it is on, so old caches keep their key.

On RDNA cards the test of the two factors uses the same min(|a|, |b|) form as legacy_mul.

There is a unit test over 1,728 cases, run on the card (RX 7900 XT, vkd3d-proton). One thing it showed: with the dxil-spirv in my vkd3d-proton FMad still comes out as a multiply and an add. dxil-spirv only made it a real FMA on 11 November (114e664ef), so the fused half depends on the vkd3d-proton build, while the flushing and the zero rule do not. The test takes either.

Not done: refusals over the whole archive, and a close look at lips in a cutscene before and after. I ran about 2,800 frames with it and saw nothing wrong. victory-shader passes except stub_pipeline_is_created, which also fails for me on plain linux-wine.

…ED=0: as before)

v_mac_legacy_f32 and v_mad_legacy_f32 become one multiply-add with flushed
sources and the legacy zero rule. From fxceless f6a09d3, by way of
fsrajner/VIctory-7900XTX c36478c (lips); the fourth point of avatarmanz#67.
@UwUCammie
UwUCammie force-pushed the shader/legacy-mad-fused branch from 57d85f6 to 9195918 Compare November 30, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant