play: 47 folded compute programs run in their exact unfolded form (VICTORY_WAVE_FOLDED_SKIP) #4202

Closed
github-bot wants to merge 11 commits from github-bot/gh-4201 into main AGit
Owner

@⁠marquezlale-creator on GitHub · 2026-11-30 17:22 UTC · original
marquezlale-creator:pr/unfold-exact-compute → main · +786 −820 · 32 files · 11 commits · closed without merging

What it changes

Some wave64 compute programs are folded for 32-lane cards (two console lanes per host lane, doubled registers), the costliest form there: e.g. 129-156 console VGPRs become ~258-312 a host thread and spill. These 47 also translate in an exact unfolded form (wave-wide branches, local waves as the allocation idiom, deep skips, "without skips, scalars followed"), so they are named in VICTORY_WAVE_FOLDED_SKIP in victory play's defaults and in scripts/play-nvidia.ps1 (which keeps play's shader-key switches, #4067).

The list (full program names, so a short pattern does not catch variants that must stay folded): shadows (tiled cascades / misc, hair), SSR ray pre-passes, irradiance cache, transmission volumetrics (tiled, local lights, submerged), particle update and pre-render, the particle light atlases, scan mips, tiling, visibility, temporal resolves and DOF-aware scene colour resolves, MinMax reductions, water classification, disocclusion, variance filter, decal classification, defrag relocations, raster classification counts, and the foliage culling (CS_Tree_BatchCull, _ImposterOnly, CS_DrawBatch).

Two of them (ptfx_CS_lightAtlas_Sprite / _Trail) take a local-waves form that is approximate only in a loop bound; read in their code (#3896 runs them as local waves too). The other 45 are exact.

How it was tested

  • GPU and profile: RTX 5070 12 GB, Series X, 2560x1440, DLSS balanced, frame generation off, ray tracing off.
  • Offline: every compute program of the title through victory translate --validate with VICTORY_HOST_MAX_WAVE=32 and this list: the 47 unfolded and validated, the other 103 folded ones unchanged; 691 of 691 compute programs of one third of the title validated, and the 153 heavy ones.
  • Before: heavy scenes (~12,700 draws) 10-12 fps; 17-21 with the light atlases alone.
  • After: 21.4-24.2 fps there with the first 25 of the list, light scenes 28.8-33; the card's wait for those programs gone (card time top pipelines). Picture checked in play (shadows, reflections, volumetric light and fog, particles, heat haze) with the first 25; the 22 added since (temporal resolves, MinMax, water, foliage culling...) validated offline the same way.
  • For shader changes, the wave sizes tested: 32 lanes (host), the console's 64.
  • cargo test passed for the crates it touches: cargo check -p victory --tests yes (a settings change).

Please watch trees for flicker with the foliage culling unfolded: an earlier note in emit/mod.rs says foliage flickered once with the wave-wide forms from an empty cache (v2026.11.29.02).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3896 (light atlases as local waves), #3440 and #3695 (folding itself).

🤖 Generated with Claude Code

**@⁠marquezlale-creator** on GitHub · 2026-11-30 17:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4201) `marquezlale-creator:pr/unfold-exact-compute` → `main` · +786 −820 · 32 files · 11 commits · closed without merging ## What it changes Some wave64 compute programs are folded for 32-lane cards (two console lanes per host lane, doubled registers), the costliest form there: e.g. 129-156 console VGPRs become ~258-312 a host thread and spill. These 47 also translate in an **exact** unfolded form (wave-wide branches, local waves as the allocation idiom, deep skips, "without skips, scalars followed"), so they are named in `VICTORY_WAVE_FOLDED_SKIP` in `victory play`'s defaults and in `scripts/play-nvidia.ps1` (which keeps play's shader-key switches, #4067). The list (full program names, so a short pattern does not catch variants that must stay folded): shadows (tiled cascades / misc, hair), SSR ray pre-passes, irradiance cache, transmission volumetrics (tiled, local lights, submerged), particle update and pre-render, the particle light atlases, scan mips, tiling, visibility, temporal resolves and DOF-aware scene colour resolves, MinMax reductions, water classification, disocclusion, variance filter, decal classification, defrag relocations, raster classification counts, and the foliage culling (`CS_Tree_BatchCull`, `_ImposterOnly`, `CS_DrawBatch`). Two of them (`ptfx_CS_lightAtlas_Sprite` / `_Trail`) take a local-waves form that is approximate only in a loop bound; read in their code (#3896 runs them as local waves too). The other 45 are exact. ## How it was tested - GPU and profile: RTX 5070 12 GB, Series X, 2560x1440, DLSS balanced, frame generation off, ray tracing off. - Offline: every compute program of the title through `victory translate --validate` with `VICTORY_HOST_MAX_WAVE=32` and this list: the 47 unfolded and validated, the other 103 folded ones unchanged; 691 of 691 compute programs of one third of the title validated, and the 153 heavy ones. - Before: heavy scenes (~12,700 draws) 10-12 fps; 17-21 with the light atlases alone. - After: 21.4-24.2 fps there with the first 25 of the list, light scenes 28.8-33; the card's wait for those programs gone (`card time` top pipelines). Picture checked in play (shadows, reflections, volumetric light and fog, particles, heat haze) with the first 25; the 22 added since (temporal resolves, MinMax, water, foliage culling...) validated offline the same way. - For shader changes, the wave sizes tested: 32 lanes (host), the console's 64. - `cargo test` passed for the crates it touches: `cargo check -p victory --tests` yes (a settings change). **Please watch trees for flicker** with the foliage culling unfolded: an earlier note in `emit/mod.rs` says foliage flickered once with the wave-wide forms from an empty cache (v2026.11.29.02). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3896 (light atlases as local waves), #3440 and #3695 (folding itself). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The translator folds some wave64 compute programs (two console lanes per host
lane, doubled registers), the costliest form on 32-lane cards. These 47 also
translate in an exact form (wave-wide branches, local waves as the allocation
idiom, deep skips), checked with victory translate --validate: the 47 unfolded
and validated, the other 103 folded ones unchanged.

RTX 5070, Series X, 2560x1440, DLSS balanced, heavy scenes (~12,700 draws):
17-21 fps after the particle light atlases alone (as #3896), 21.4-24.2 with
the next 23 (shadows, SSR, irradiance cache, volumetrics), the card's wait
for them gone; picture checked in play. In both launchers, as play-nvidia.ps1
keeps play's shader-key switches (#4067).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:33 +00:00
github-bot closed this pull request 2026-12-01 18:50:31 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4201#issuecomment-7321496647) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4202
No description provided.