shader-compiler: keep the DX9 multiply in v_mac_legacy_f32 #571
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/571"
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?
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-30T04:38:48Z.
For #334, as asked there.
vector.rsstrips_legacyand remembers it, but onlyv_mul_f32andv_mad_f32checked the flag, sov_mac_legacy_f32came out as a plaina * b + dst. It now usestb_mullthe same wayv_mad_legacy_f32does. No recorded shader uses it.check_basic_alu_gpu.pygets the inf × denormal case: 0x7f800000 × 0x00400000 + 0x3f800001, which gave 0xffc00000 where the card gives 0x3f800001. It runs after the edges, only in a shader of its own forv_mad_legacy_f32andv_mac_legacy_f32. The other float models don't flush denormal sources yet, so feeding it to every float shader would failv_mul_f32and friends for reasons that have nothing to do with this.The legacy model in
separatenow reads a denormal source as zero. The native reference shows these forms flush every denormal whatever MODE says (docs/CONSOLE_REFERENCE.md). That puts 35 more native lanes in line with the model, soALU_CHECK_REJECTSintest_native_rdna2_float.pydrops from 44 to 9 forv_fmac_legacy_f32andv_fma_legacy_f32.The unit test
mac_legacy_keeps_the_dx9_multiplycovers both encodings and fails without the fix.check_translator_gpu.py --only aluon an RX 6700 XT (RADV), at af15cbfa (the same change before main's rustfmt commit; the rebase onto it was clean):vector.rschange reverted: FAIL, 1 wrong:v_mac_legacy_f32on inputs 0x7f800000, 0x00400000, 0x3f800001 got 0xffc00000, wanted 0x3f800001The refusal is
s_bcnt0_i32_b32in both runs. It has nothing to do with this change.#446 currently tolerates this as a known translator fault (
legacy_rule_faultonv_mac_legacy_f32). I'll drop that from #446 once this lands, or here if #446 goes first.Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T09:38:37Z.
Merged into main as
8ece312f(squashed and credited to you), thanks!I ran the missing NVIDIA side here, an RTX 4070 Ti SUPER through GE-Proton11-14:
check_translator_gpu.py --only alupasses, 362 instructions, 0 wrong.vector.rschange reverted: 1 wrong,v_mac_legacy_f32on your inf x denormal case. NVIDIA returns 0x7fffffff where your card gave 0xffc00000; wrong either way.Nothing changes across our 46,664 recorded requests, and you can drop the tolerance from #446 now.
Pull request closed