32-lane hosts: 386 of 2,682 compute programs stay at WaveSize(64) (NVIDIA refuses them), all over one LDS rule; corpus count and what #500/#592/#158 recover #953

Open
opened 2026-11-26 03:54:32 +00:00 by github-bot · 6 comments
Owner

@⁠Daolyap on GitHub · 2026-11-25 13:39 UTC · original

On a 32-lane host the translator keeps some console wave64 compute programs at WaveSize(64), and every NVIDIA card refuses those pipelines (the debug layer says: Shader wants wave lane count of 64 but maximum wave lane count for device is 32). #920, #833 and #904 each report a handful in their runs; here is a count over the whole corpus.

Corpus count at f85101b: VICTORY_HOST_WAVE=32 VICTORY_WAVE_WHY=1 victory translate shaders.rpf (26,503 containers, 26,084 programs):

  • 386 of the 2,682 compute programs keep 64-lane waves, so about 14 % of compute never runs on NVIDIA.
  • Every one has the same blocking reason: LDS in a group over 32, an LDS read and write in one lane-branch region. The other reasons (v_mbcnt, v_readlane, mask as data, lane-constant masks) only appear alongside it.
  • Largest groups: 163 x group=64 with only that reason; 71 x group=64 adding mask as data, v_mbcnt; 49 x group=64 adding v_readlane; 28 x group=1024; 20 x group=128.

Open PRs, each measured alone on f85101b:

still at 64 lanes
f85101b 386
#592 378
#500 (VICTORY_LDS_EXACT=1) 374
#158 354

#500 and #592 combine cleanly once their lower.rs change is merged (a region passes if either rule clears it) and all 219 victory-shader tests pass. #158 combined with #592 fails #592's test a_branch_that_writes_lds_two_different_values_keeps_64_lanes (the program is split to 32 lanes); it passes with #592 alone and with #500 + #592, so I left #158 out (details on #158).

In game (RTX 3070 8 GB, driver 32.0.16.1692), prologue cell, 10-minute runs: refused pipelines went from 8 (7 compute + 1 mesh) to 5 with #500 + #592 and VICTORY_LDS_EXACT=1. 369cbe906ea72764 and 2cc4c197ee29e291 now run. Still refused: 02384a60fda6f2d0, 2da4beb386509b77, 5dc3b25986622949, 6b82bc7d22016cb5, 6f225b641c5b0708. At the same moment in the cell, the blocky band over the floor got noticeably smaller but didn't go away, so these refusals look like a main cause of the blocky regions people see on NVIDIA.

For comparison, upstream Marvisak/VIctory#189 (Wave64Mode::Emulate) reports compute refusals on 32-lane hosts going from 97 to 0 on the same corpus. It doesn't merge into this fork (it conflicts across most of lower.rs), but it looks like the complete answer for this class.

AI-assisted (Claude Code); counts from my own copy.

**@⁠Daolyap** on GitHub · 2026-11-25 13:39 UTC · [original](https://github.com/fxceless/victory-fork/issues/953) On a 32-lane host the translator keeps some console wave64 compute programs at `WaveSize(64)`, and every NVIDIA card refuses those pipelines (the debug layer says: *Shader wants wave lane count of 64 but maximum wave lane count for device is 32*). #920, #833 and #904 each report a handful in their runs; here is a count over the whole corpus. **Corpus count** at f85101b: `VICTORY_HOST_WAVE=32 VICTORY_WAVE_WHY=1 victory translate shaders.rpf` (26,503 containers, 26,084 programs): - **386 of the 2,682 compute programs keep 64-lane waves**, so about 14 % of compute never runs on NVIDIA. - **Every one** has the same blocking reason: `LDS in a group over 32, an LDS read and write in one lane-branch region`. The other reasons (`v_mbcnt`, `v_readlane`, `mask as data`, lane-constant masks) only appear alongside it. - Largest groups: 163 x group=64 with only that reason; 71 x group=64 adding `mask as data, v_mbcnt`; 49 x group=64 adding `v_readlane`; 28 x group=1024; 20 x group=128. **Open PRs, each measured alone on f85101b:** | | still at 64 lanes | |---|---| | f85101b | 386 | | #592 | 378 | | #500 (`VICTORY_LDS_EXACT=1`) | 374 | | #158 | 354 | #500 and #592 combine cleanly once their `lower.rs` change is merged (a region passes if either rule clears it) and all 219 `victory-shader` tests pass. **#158 combined with #592 fails #592's test** `a_branch_that_writes_lds_two_different_values_keeps_64_lanes` (the program is split to 32 lanes); it passes with #592 alone and with #500 + #592, so I left #158 out (details on #158). **In game** (RTX 3070 8 GB, driver 32.0.16.1692), prologue cell, 10-minute runs: refused pipelines went from 8 (7 compute + 1 mesh) to **5** with #500 + #592 and `VICTORY_LDS_EXACT=1`. `369cbe906ea72764` and `2cc4c197ee29e291` now run. Still refused: `02384a60fda6f2d0`, `2da4beb386509b77`, `5dc3b25986622949`, `6b82bc7d22016cb5`, `6f225b641c5b0708`. At the same moment in the cell, the blocky band over the floor got noticeably smaller but didn't go away, so these refusals look like a main cause of the blocky regions people see on NVIDIA. For comparison, upstream Marvisak/VIctory#189 (`Wave64Mode::Emulate`) reports compute refusals on 32-lane hosts going from 97 to 0 on the same corpus. It doesn't merge into this fork (it conflicts across most of `lower.rs`), but it looks like the complete answer for this class. AI-assisted (Claude Code); counts from my own copy.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:54:32 +00:00
Author
Owner

@⁠Ortomanic on GitHub · 2026-11-25 15:39 UTC · original

A data point from an RTX 5080 under Linux, for the "what recovers them" table. Details are on #823 (#823), since it overlaps that PR and #695.

  • In game: allowing the wave-wide form (widen) only as a last resort for one-wave groups takes the refused compute pipelines in the first room from 7 to 3. 369cbe90, 2cc4c197, 5dc3b259 and 6f225b64 run; 02384a60, 2da4beb3 and 6b82bc7d stay refused. That matches #823's hand-picked four and its remaining three. No device loss in a two-minute run.
  • Offline: with my harness on 0b0074e plus our patches (25,985 containers, 32-lane host), 27 programs need 64-lane waves and 7 still do with the last-resort rule. My 27 is far from the 386 counted here at f85101b with victory translate; I have not reconciled the two tools, so please do not read them as the same measure.

AI-assisted (Claude Code).

**@⁠Ortomanic** on GitHub · 2026-11-25 15:39 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7167190417) A data point from an RTX 5080 under Linux, for the "what recovers them" table. Details are on #823 (https://git.gtahub.st/github/fxceless--victory-fork/pulls/823), since it overlaps that PR and #695. - **In game:** allowing the wave-wide form (`widen`) only as a last resort for one-wave groups takes the refused compute pipelines in the first room from 7 to 3. `369cbe90`, `2cc4c197`, `5dc3b259` and `6f225b64` run; `02384a60`, `2da4beb3` and `6b82bc7d` stay refused. That matches #823's hand-picked four and its remaining three. No device loss in a two-minute run. - **Offline:** with my harness on `0b0074e` plus our patches (25,985 containers, 32-lane host), 27 programs need 64-lane waves and 7 still do with the last-resort rule. My 27 is far from the 386 counted here at `f85101b` with `victory translate`; I have not reconciled the two tools, so please do not read them as the same measure. AI-assisted (Claude Code).
Author
Owner

@⁠d0dev on GitHub · 2026-11-25 16:52 UTC · original

Data point from an RTX 4070 Ti SUPER (driver 616.92, Ryzen 7 5800X3D, 32 GB, Windows 11 26200), on 3973179 + #1002 #999 and open PRs, with the D3D12 debug layer (VICTORY_D3D12_DEBUG=1, diag build):

8 compute pipelines refused in one session (world, chapter 1), all with "Shader wants wave lane count of 64 but maximum wave lane count for device is 32" (id 622):

02384a60fda6f2d0 2cc4c197ee29e291 2da4beb386509b77 369cbe906ea72764 5dc3b25986622949 6b82bc7d22016cb5 6f225b641c5b0708 926c46bab3b86bd6

The first seven are already in the lists above; 926c46bab3b86bd6 is not.

**@⁠d0dev** on GitHub · 2026-11-25 16:52 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7168665642) Data point from an RTX 4070 Ti SUPER (driver 616.92, Ryzen 7 5800X3D, 32 GB, Windows 11 26200), on `3973179` + #1002 #999 and open PRs, with the D3D12 debug layer (`VICTORY_D3D12_DEBUG=1`, diag build): 8 compute pipelines refused in one session (world, chapter 1), all with *"Shader wants wave lane count of 64 but maximum wave lane count for device is 32"* (id 622): `02384a60fda6f2d0` `2cc4c197ee29e291` `2da4beb386509b77` `369cbe906ea72764` `5dc3b25986622949` `6b82bc7d22016cb5` `6f225b641c5b0708` `926c46bab3b86bd6` The first seven are already in the lists above; `926c46bab3b86bd6` is not.
Author
Owner

@⁠HLVM04 on GitHub · 2026-11-25 16:56 UTC · original

One more row for the "what recovers them" question, from an RTX 5070 Ti (32-lane waves, driver 616.64), Series S profile, on 9376fd6 + #798 #783 #799. One run per configuration.

  • #799's loose-LDS fallback builds 5 of our 7 refused compute pipelines: 02384a60fda6f2d0, 2cc4c197ee29e291, 2da4beb386509b77, 369cbe906ea72764 and 6b82bc7d22016cb5. Two stayed refused. That includes 02384a60, 2da4beb3 and 6b82bc7d, the three that #500 + #592 and the wave-wide last resort both leave refused in the runs above.
  • 2da4beb386509b77 built this way draws the textured wired glass in the window scene. We checked that in a PIX capture and bisected it with VICTORY_SKIP_PIPELINES, so its output looks right there. We have not checked the other four.
  • Earlier, on the Series X profile at 9376fd6, making the remaining programs wave-wide as a last resort built 4 of them. It cost fps and did not visibly reduce the blocky artifacts for us.

We have not run #799 together with the wave-wide rule, or against #854's paired form.

**@⁠HLVM04** on GitHub · 2026-11-25 16:56 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7168769951) One more row for the "what recovers them" question, from an RTX 5070 Ti (32-lane waves, driver 616.64), Series S profile, on `9376fd6` + #798 #783 #799. One run per configuration. - #799's loose-LDS fallback builds 5 of our 7 refused compute pipelines: `02384a60fda6f2d0`, `2cc4c197ee29e291`, `2da4beb386509b77`, `369cbe906ea72764` and `6b82bc7d22016cb5`. Two stayed refused. That includes `02384a60`, `2da4beb3` and `6b82bc7d`, the three that #500 + #592 and the wave-wide last resort both leave refused in the runs above. - `2da4beb386509b77` built this way draws the textured wired glass in the window scene. We checked that in a PIX capture and bisected it with `VICTORY_SKIP_PIPELINES`, so its output looks right there. We have not checked the other four. - Earlier, on the Series X profile at `9376fd6`, making the remaining programs wave-wide as a last resort built 4 of them. It cost fps and did not visibly reduce the blocky artifacts for us. We have not run #799 together with the wave-wide rule, or against #854's paired form.
Author
Owner

@⁠Thewyrmking95 on GitHub · 2026-11-25 17:09 UTC · original

Two more rows for the "what recovers them" question. Both come from forks that merged these PRs and wrote down their in-game runs. I haven't measured either myself.

#854 (paired form) isn't in the table above yet. realblastex/flamingo merged it, and its FLAMINGO.md (run 106) reports no pipeline refused and no program untranslated, including the cascades' alpha shadow program. Its one side effect was rows of black boxes on the water. Runs 107–108 put those down to ray tracing: with FLAMINGO_BVH_MISS=1 (every ray misses) they went away, and two runs had no hang. KomanderDG88/VIniVIdiVIci also ships #854 and reports 30/30 on its paired LDS tests, including a 128-thread group. Its notes say an earlier wave-wide barrier form hung, so it stays off unless VICTORY_WAVE_WIDE=1 is set.

#799's loose-LDS fallback has a cost that I haven't seen mentioned here. In the same log, run 54 has it on: refused pipelines went from 5 to 2, "but the world grainy and smeared" where the three programs it let through draw. In run 60 it made the opening cutscene darker and washed some shots out. flamingo keeps it opt-in (VICTORY_WAVE_LDS_LOOSE=1, keyed in the shader cache). It seems safer as a last resort than as a default.

So #854 and #592's flag-only rule look like the parts worth combining. flamingo carries #592's rule as lds_flag_region, on by default through VICTORY_LDS_FLAGS. Upstream Marvisak/VIctory#189 remains the complete answer if it can be ported.

AI-assisted (Claude Code)

**@⁠Thewyrmking95** on GitHub · 2026-11-25 17:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7169095180) Two more rows for the "what recovers them" question. Both come from forks that merged these PRs and wrote down their in-game runs. I haven't measured either myself. #854 (paired form) isn't in the table above yet. realblastex/flamingo merged it, and its FLAMINGO.md (run 106) reports no pipeline refused and no program untranslated, including the cascades' alpha shadow program. Its one side effect was rows of black boxes on the water. Runs 107–108 put those down to ray tracing: with FLAMINGO_BVH_MISS=1 (every ray misses) they went away, and two runs had no hang. KomanderDG88/VIniVIdiVIci also ships #854 and reports 30/30 on its paired LDS tests, including a 128-thread group. Its notes say an earlier wave-wide barrier form hung, so it stays off unless VICTORY_WAVE_WIDE=1 is set. #799's loose-LDS fallback has a cost that I haven't seen mentioned here. In the same log, run 54 has it on: refused pipelines went from 5 to 2, "but the world grainy and smeared" where the three programs it let through draw. In run 60 it made the opening cutscene darker and washed some shots out. flamingo keeps it opt-in (VICTORY_WAVE_LDS_LOOSE=1, keyed in the shader cache). It seems safer as a last resort than as a default. So #854 and #592's flag-only rule look like the parts worth combining. flamingo carries #592's rule as lds_flag_region, on by default through VICTORY_LDS_FLAGS. Upstream [Marvisak/VIctory#189](https://github.com/Marvisak/VIctory/issues/189) remains the complete answer if it can be ported. AI-assisted (Claude Code)
Author
Owner

@⁠HoLa-Lee on GitHub · 2026-11-26 16:34 UTC · original

A card-side datapoint for #854, which is not in the table above (the table lists #592, #500 and #158). Measured on an RTX 4080 SUPER, driver 616.87, 300 s of the intro with the same keys and seed, VICTORY_TEXTURE_REFRESH_EVERY=8, VICTORY_TEXTURE_STAGE_MB=64, VICTORY_INDIRECT_GATHER=1, debug layer off:

current line #854 (51700c6)
compute pipelines refused 7 (02384a60, 2cc4c197, 2da4beb3, 369cbe90, 5dc3b259, 6b82bc7d, 6f225b64) 0
compute shaders that do not translate 2 (926c46ba a lane mask holding lanes elsewhere read as data, f133e35e a lane mask exchanged where not every lane runs) 0
dropped … without a host pipeline from refusals present gone for the compute ones
device removals / traps 0 / 0 0 / 0

So on this corpus slice the paired form recovers 100 % of what our run was losing, including the two water volumetrics programs this issue is about - 5dc3b25986622949 and 6f225b641c5b0708 are both in our seven, and both are created once #854 is in.

What it costs, which is the other half of the decision - at matched draw counts the frame is slower, because those programs now run instead of being skipped:

draws current line #854
6,116 / 7,016 1,200 ms 1,840 ms
9,393 / 9,967 1,119 ms 3,749 ms

and the texture term grows from 0.3-8 MB a frame to 8-275 MB, for the same reason: the compute paths that now run touch texture memory.

Two caveats so this is not read as more than it is: one card, one scene, and the #854 arm carried two of our own commits on top of 51700c6 (this session's texture stride, and the removal of two diagnostics counters its tree does not have). The refusal count is what the change moves, not any of that.

**@⁠HoLa-Lee** on GitHub · 2026-11-26 16:34 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7197826934) **A card-side datapoint for #854, which is not in the table above** (the table lists #592, #500 and #158). Measured on an RTX 4080 SUPER, driver 616.87, 300 s of the intro with the same keys and seed, `VICTORY_TEXTURE_REFRESH_EVERY=8`, `VICTORY_TEXTURE_STAGE_MB=64`, `VICTORY_INDIRECT_GATHER=1`, debug layer off: | | current line | `#854` (`51700c6`) | |---|---|---| | compute pipelines refused | **7** (`02384a60`, `2cc4c197`, `2da4beb3`, `369cbe90`, `5dc3b259`, `6b82bc7d`, `6f225b64`) | **0** | | compute shaders that do not translate | **2** (`926c46ba` `a lane mask holding lanes elsewhere read as data`, `f133e35e` `a lane mask exchanged where not every lane runs`) | **0** | | `dropped … without a host pipeline` from refusals | present | gone for the compute ones | | device removals / traps | 0 / 0 | 0 / 0 | So on this corpus slice the paired form recovers **100 %** of what our run was losing, including the **two water volumetrics programs this issue is about** - `5dc3b25986622949` and `6f225b641c5b0708` are both in our seven, and both are created once #854 is in. **What it costs**, which is the other half of the decision - at matched draw counts the frame is slower, because those programs now run instead of being skipped: | draws | current line | #854 | |---|---|---| | 6,116 / 7,016 | 1,200 ms | 1,840 ms | | 9,393 / 9,967 | 1,119 ms | 3,749 ms | and the texture term grows from 0.3-8 MB a frame to 8-275 MB, for the same reason: the compute paths that now run touch texture memory. Two caveats so this is not read as more than it is: one card, one scene, and the #854 arm carried two of our own commits on top of `51700c6` (this session's texture stride, and the removal of two diagnostics counters its tree does not have). The refusal count is what the change moves, not any of that.
Author
Owner

@⁠HLVM04 on GitHub · 2026-11-26 16:56 UTC · original

A cost data point for #854 from the other end, where the card is not the limit: RTX 5070 Ti 16 GB (32-lane waves), Series S profile, fork 0b0074e plus #798 #783 #799 #770 #827 #845 and local processor-side changes, first gameplay scene, 2 runs each arm.

median p75 p90
without #854 53–59 ms 75–98 ms
with #854 52–53 ms 56 ms 64–76 ms

No crash or device loss, picture unchanged or slightly cleaner. The only cost seen was one 0.7 s spike on the first launch while the new forms were translated.

Caveats: our frames are bound by processor-side preparation (the card is busy only a few ms a frame), so extra card work from programs that now run is hidden here rather than absent. A card-bound frame like yours above will show it. Different scene and tree, and we did not count refusals in these runs.

**@⁠HLVM04** on GitHub · 2026-11-26 16:56 UTC · [original](https://github.com/fxceless/victory-fork/issues/953#issuecomment-7198288461) A cost data point for #854 from the other end, where the card is not the limit: RTX 5070 Ti 16 GB (32-lane waves), Series S profile, fork `0b0074e` plus #798 #783 #799 #770 #827 #845 and local processor-side changes, first gameplay scene, 2 runs each arm. | | median | p75 | p90 | |---|---|---|---| | without #854 | 53–59 ms | | 75–98 ms | | with #854 | 52–53 ms | 56 ms | 64–76 ms | No crash or device loss, picture unchanged or slightly cleaner. The only cost seen was one 0.7 s spike on the first launch while the new forms were translated. Caveats: our frames are bound by processor-side preparation (the card is busy only a few ms a frame), so extra card work from programs that now run is hidden here rather than absent. A card-bound frame like yours above will show it. Different scene and tree, and we did not count refusals in these runs.
This discussion has been locked. Commenting is limited to contributors.
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/fxceless--victory-fork#953
No description provided.