Add rebased paired Wave64 fallback for 32-lane hosts #2001
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2001"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T06:37:21Z.
Summary
This PR rebases the paired Wave64 fallback from #348 onto the current
mainbranch and keeps it as an opt-in last resort for Wave64 compute programs that the upstream wave-wide and LDS fallbacks still cannot lower on 32-lane NVIDIA hosts.The paired form runs console lane
nand lanen + 32in one host thread, so a 64-lane console wave fits in one 32-lane host wave and cross-lane operations stay inside the thread. This covers the remainingCS_CollectTriangles_Meshletscase (6b82bc7d22016cb5), whose wave-wide form exceeds the host's 32 KiB LDS budget.Changes include:
VICTORY_WAVE_PAIRSandVICTORY_WAVE_PAIRS_FP32cache-key coverage.The fallback is disabled by default and runs only after the existing upstream forms fail.
Attribution
This work originates in #348 and the paired implementation from
fxceless/victory-fork; original commit authorship is retained. This PR is a rebased integration for the currentmain, not a claim of sole authorship.Validation
main:6b82bc7d22016cb5reports1 do not translatein a fresh-cache targeted warm-up.cargo test --locked -p victory-shader— 473 passed, 0 failed, 24 ignored after rebasing onto829188e.cargo build --release -p victory --locked— passed.VICTORY_WAVE_PAIRS=1for6b82bc7d22016cb5— 1 translated, 0 do not translate.git diff --checkTesting the opt-in fallback
The paired form is disabled by default. To test
6b82bc7d22016cb5, run the targeted warm-up with bothVICTORY_WAVE_PAIRS=1andVICTORY_WAVE_WHY=1. A successful run reports1 translated, 0 do not translateand logsWAVE64-RETRY paired Wave64 (last fallback). WithoutVICTORY_WAVE_PAIRS=1, the original refusal is expected.Reviewer validation
The reviewer tested
d4b5d51+#901+#851+#2001on an RTX 5060 withVICTORY_WAVE_PAIRS=1andVICTORY_WAVE_WHY=1. All four target programs entered the paired fallback withwave Some(32)and translated;6b82bc7d22016cb5and7168dd781ca7efb9also created host pipelines. The run reported zero shader refusals.Relevant log excerpt:
Known limitations
CS_TraceShadowRays_*programs remain blocked by dynamic descriptor reads.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Razen114514 on 2026-11-29T08:20:25Z.
#2001does not make6b82bc7d22016cb5translate hereBuilt
d4b5d51+#901+#851+#2001, Series S, DLSS performance, frame generation 2x, RTX 5060 8 GB.6b82bc7d22016cb5(vfx_triangleClip:CS_CollectTriangles_Meshlets) is still refused with the same error as before:And
WAVE64-PAIREDnever appears anywhere in the log — so the paired path was not entered for it, rather than entered and rejected.Reading the diff, that looks right: it is 11 lines changing
console_lane()and theclanecache across halves, with nothing that routes a program into the paired form. If the intent is thatCS_CollectTriangles_Meshletsshould now translate, something else still has to select it — the PR description reads as if it already would.Three more refused on the same build
All
sr_and allno wave32 lowering:34992f2b65a789a5sr_denoising:CS_TemporalResolve1_Alpha_68979fba_Wrapped7168dd781ca7efb9sr_tracing:CS_RayPrePass_Opaque_SSR_a80bdf75_Wrapped71883e40620a567asr_denoising:CS_TemporalResolve2_Opaque_FrameStatistics_357e0818_WrappedThese may be the intended consequence of
d148613("the reflections' programs are left out of the wave-wide form") — if so, that part can be ignored.One thing that did improve on this build
a10179ab7eda0dc3—CS_TransmissionVolumetrics_VolumePortalsOnly, the water-absorption programdocs/water.mdnames — now translates and gets a host pipeline:On the previous build it was refused (
shader does not translate ... hash=a10179ab7eda0dc3) and its draws were dropped. For reference, the refusals on that build were 6 in total, on this one 4 — but a different set: the water program is fixed, and the threesr_ones above are new.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T08:35:55Z.
Thanks for the detailed test. The paired form is intentionally opt-in and only runs with
VICTORY_WAVE_PAIRS=1; without it, the original refusal is expected. The 11-line commit is the follow-up lane-cache fix, while the routing is inmod.rsfrombb120ff. Could you rerun6b82bc7d22016cb5withVICTORY_WAVE_PAIRS=1andVICTORY_WAVE_WHY=1? The expected log line isWAVE64-RETRY paired Wave64 (last fallback). I’ll add these exact test instructions to the PR description and rebase onto the latestmain. I’ll also compare the threesr_refusals against the baseline separately.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Razen114514 on 2026-11-29T09:02:28Z.
Confirmed: with
VICTORY_WAVE_PAIRS=1all four translateYou were right and my report was wrong — I tested a build that had the switch unset, and the refusal was the expected outcome of that, not of your patch. Thanks for the correction.
Reran with
VICTORY_WAVE_PAIRS=1andVICTORY_WAVE_WHY=1ond4b5d51+#901+#851+#2001, Series S, DLSS performance, RTX 5060 8 GB:WAVE_PAIRS=16b82bc7d22016cb5vfx_triangleClip:CS_CollectTriangles_Meshlets34992f2b65a789a5sr_denoising:CS_TemporalResolve1_Alpha7168dd781ca7efb9sr_tracing:CS_RayPrePass_Opaque_SSR71883e40620a567asr_denoising:CS_TemporalResolve2_Opaque_FrameStatisticsRefusals on this build: 0. On the same build without the switch there were 4. That is the first time any run of ours has had nothing refused, and
wave Some(32)on all four says the paired form fitted them into a 32-lane host wave.What it looks like
The water changed for the better on the build before this one, when
a10179ab7eda0dc3(CS_TransmissionVolumetrics_VolumePortalsOnly) started translating: clear, teal-green, seabed visible, no black patches. That improvement is kept.One artefact survives and I do not think it is this PR's business, but it is worth saying because it is what I hoped the SSR program would fix: thin dark lines across the water, fixed in screen space — they do not move with the camera or the surface, they stay welded to the same pixels. I expected that to be
CS_RayPrePass_Opaque_SSRbeing dropped; it now translates and the lines are unchanged, so they are something else. Most likely a tile boundary in a screen-space pass rather than a missing program.If you want the log for the four retries I can attach it. Otherwise this is a "yes, it works" with the switch set, which is what your PR description will now say.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T09:07:02Z.
Yes, please attach the log showing the four paired Wave64 retry lines and the host pipeline creation for
6b82bc7d22016cb5and7168dd781ca7efb9. It will be useful as validation evidence after the rebase.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Razen114514 on 2026-11-29T09:10:51Z.
Here is the excerpt, in order. Each
last fallbackline is followed by the program that took it, and the two host-pipeline lines are at the end:Reading it against the four programs:
wave Some(32)71883e40620a567aCS_TemporalResolve2_Opaque_FrameStatisticswave Some(32)7168dd781ca7efb9CS_RayPrePass_Opaque_SSRwave Some(32)34992f2b65a789a5CS_TemporalResolve1_Alphawave Some(32)6b82bc7d22016cb5CS_CollectTriangles_MeshletsAll four report
wave Some(32), so the paired form fitted each of them into a 32-lane host wave.CS_CollectTriangles_MeshletsandCS_RayPrePass_Opaque_SSRthen get their host pipelines built; the twoTemporalResolveprograms translate but no pipeline line follows in this excerpt, presumably because nothing bound them yet in that stretch of the run.The full log is 16.7 MB, so this is the relevant part rather than the whole file. If you want the whole thing for the rebase validation I can gzip and attach it instead.
Nothing was refused on this run:
does not translateappears 0 times, against 4 on the same build with the switch unset.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by grosterr on 2026-11-29T13:03:28Z.
A note for whoever validates this next. On the release
829188e,6b82bc7d22016cb5(CS_CollectTriangles_Meshlets) and7168dd781ca7efb9translate on an RTX 3060 withVICTORY_WAVE_PAIRSunset: the play log shows "shader translated" and a host pipeline for each, and no refusal. They were refused one1f2eb6, so something in between fixed them, probably #1504'sVICTORY_WAVE_FOLDED.The tests above were on
d4b5d51, so it may be worth rechecking the "still refused" list on current main. If anything is left, the paired form would only be needed for that.Posted by Claude Code on behalf of the machine's owner.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T13:38:28Z.
Confirmed on the latest baseline. I tested the official
v2026.11.29.01executable (829188e) on an RTX 5070 Laptop GPU with 32-lane host waves, a fresh shader cache, andVICTORY_WAVE_PAIRSunset.All seven previously discussed programs translated successfully:
407eca669212d4005e3dd99e0f067aee6b82bc7d22016cb5a10179ab7eda0dc334992f2b65a789a57168dd781ca7efb971883e40620a567aThe fresh-cache targeted warm-up reported
7 translated now, 0 in the cache already, 0 do not translate. A follow-up audit of the seven extracted containers reported7 translated of 7,7 validated, and7 pipelines, with every target loggingWAVE64-RETRY folded: wave Some(32).This confirms the upstream folded fallback covers these programs without the paired form. For this tested set, #2001 no longer appears necessary; unless maintainers want it retained for other programs not covered by upstream, I agree it should be treated as superseded and closed.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T13:51:56Z.
Given the latest-baseline result, I recommend closing #2001 as superseded for the currently tested shader set.
On the official
v2026.11.29.01executable (829188e), with an RTX 5070 Laptop GPU, 32-lane host waves, a fresh cache, andVICTORY_WAVE_PAIRSunset, all seven previously discussed programs translated successfully:WAVE64-RETRY folded: wave Some(32).The upstream folded fallback therefore covers these programs without the paired form. Unless a specific remaining shader demonstrates a need for the paired fallback, retaining #2001 would add maintenance and rebase complexity without a demonstrated benefit. I suggest closing it and opening a new, narrowly scoped PR only if such a case is found.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.