Shaders: ordered paired FP32 reductions for Wave64 on Wave32 hosts #1419
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1419
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1419"
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?
@ByFxbian on GitHub · 2026-11-27 01:17 UTC · original
ByFxbian:fix/paired-wave64-fp32→main· +1084 −584 · 6 files · 3 commits · openSummary
Follow-up to #1397, integrated in
b1d777a8.Implements ordered paired FP32 reductions for recognized full
Wave64 reduction trees on Wave32 hosts.
This addresses the floating-point reduction rejection reported
by Filip722 when testing the two water TransmissionVolumetrics
compute shaders:
Changes
NaN payload priority, infinities and denormals.
32-lane half, consistent with the updated RDNA2 lowering.
Targeted testing
Once the guest floating-point mode has been confirmed:
The two hashes should not be forced into the wave-wide workaround.
Fast math must remain disabled for the ordered FP32 path.
Hardware validation
NVIDIA GeForce RTX 3070, Windows.
Limitations
The FP32 path requires a confirmed non-IEEE, round-to-nearest,
flush-to-zero guest mode.
FP64, floating-point prefixes, unsupported instruction sequences,
unknown MODE changes and fast math remain conservatively rejected.
The two original water shaders still require replay and visual
validation.
The goal is to execute both programs correctly and determine
whether the original water appearance can be restored without
reintroducing the black tile artifacts.
No gameplay or visual fix is claimed until verified.
@fxceless on GitHub · 2026-11-27 01:31 UTC · original
Tested on an RTX 4070 (Windows) with the recipe above (WAVE_PAIRS_ONLY for both hashes, WAVE_PAIRS_FP32=non-ieee-rne-ftz, GROUP_SYNC=2, SHADER_OPT=127). Both programs are still refused, in two steps:
paired FP32 reduction with fast math or an unknown MODE change: each program has threes_setreg_imm32_b32 hwreg(HW_REG_MODE, 2, 2), 0(5dc3: 0x2bfc, 0x3010, 0x3494; 6f22: 0x4b78, 0x4f88, 0x5408). That field is the 64/16-bit rounding only, so it does not change FP32 rounding or denormals. We narrowed the gate locally to refuse only MODE writes touching bits 0-1 / 4-5.a paired FP32 section without a proven full reduction is not supportedat 0x570 (5dc3) and 0x580 (6f22). We are looking at that section's shape now.@akimfomin on GitHub · 2026-11-27 01:35 UTC · original
The two-bit write beginning at MODE bit 2 is confined to FP16/FP64 rounding. One guard edge worth keeping while narrowing it: AMD RDNA2 ISA §3.5, Table 4 also defines
DX10_CLAMPat bit 8 andIEEEat bit 9. Those matter when this lowering promises a non-IEEE NaN/min/max result. A rule that rejects only writes overlapping FP32 round/denorm (bits 0–1, 4–5) would also admit writes to bits 8 and 9.A small positive/negative fixture can keep the exact
offset=2,width=2write and the existing bit-exact reduction, then move the write to bit 8 or 9 and require conservative refusal. I checked the bit overlaps independently. This leaves the second failure in your report separate. In the current1338677epath, the same diagnostic covers an unproven live-out shape, an unsupported opcode/modifier and an EXEC write, so reporting which predicate failed first would help people reproduce the remaining shape with a synthetic program. PortBridge can help run that isolated fixture on a second NVIDIA adapter once available. No replay or picture claim here.@ByFxbian on GitHub · 2026-11-27 01:42 UTC · original
Just updated the PR based on your feedback.
The MODE guard now permits the reported FP16/FP64 rounding write while retaining conservative rejection of changes affecting FP32 rounding, denormals, DX10_CLAMP and IEEE mode.
The reduction rejection is now split into more specific diagnostics. All new FP32 hardware tests and the existing NVIDIA regression fixtures passed on my RTX 3070.
Both water hashes are ready for another replay test if possible
@akimfomin on GitHub · 2026-11-27 01:46 UTC · original
Thanks. I independently tested the updated
8d1162e31491ca8c462356e921b31f39ee99d58don a physical RTX 4070 Ti SUPER, driver 617.14, Windows 11 28000.3501, release. All fourpaired_fp32tests passed. The three GPU fixtures validated DXIL and passed 37 bit-exact comparisons in the paired path with 32 threads; the fourth test confirms refusal when the guest mode is absent. This includes the FP16/FP64 MODE write and the conservative refusal controls for the FP32 and NaN settings.For volunteers, set both the paired switch and the optimization mask explicitly in this test command. A first run with only the guest-mode variable exercised a non-paired or fast-math fallback and should not be compared. The two water-program replays and a visual check are still open. OpenAI Codex assisted with the isolated build and test run.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.