Shaders: one console wave run as two host waves meets at barriers between its LDS phases (stacked on #2176) #2925

Open
github-bot wants to merge 5 commits from github-bot/gh-2925 into main AGit
Owner

@⁠moe-miau on GitHub · 2026-11-26 00:13 UTC · original
moe-miau:port/one-wave-lds → main · +662 −14 · 16 files · 5 commits · open

Stacked on #2176 (n-romanovich). Its commits are in this branch; the change to review is the last commit. I'll rebase once #2176 is merged. If @⁠n-romanovich would rather take this into #2176, I'll close this one.

Problem

#2176 runs a wave64 compute program as two 32-lane host waves on NVIDIA, and refuses one whose thread group is a single console wave (64 threads or fewer) and that uses LDS. The console compiler leaves barriers out of such programs, because one wave's lanes run in step; split into two host waves, they would race on LDS.

In the title that refusal drops 64 programs on an RTX 4070 SUPER. One of them, 34d88edf583f3778, writes the 60×34×512 R16_FLOAT step-length volume that the ray-marched lighting passes (c7feccae4e01e454, 8bbcbda6008eaa37, 0184869d6e47e5fa, 915ed81ea580a276, ...) read. Left at zero, every lane marches 0.1-unit steps to the 10,000-step cap: c7feccae alone took 305 of ~520 ms of GPU time a frame (the same pass takes 0.29 ms in fxceless/victory-fork's timing log).

Measured with a local probe (reading the texture back before the pass, and logging every dispatch whose unordered views cover its memory):

t290 texels set writer seen
#2176 as is 0 of 1,044,480 none (34d88edf refused)
refusal lifted 522,240 34d88edf583f3778

Change

emit::lower::lds::barriers (new file, so lower.rs stays under the 512 KiB asset-policy limit) plans group barriers instead of refusing:

  • A program's LDS accesses must come in phases: reads only, writes only, or atomics only. Atomics need no order among themselves; any order of them is one the console could run in a group of several waves.
  • Between two phases a barrier (dx.op.barrier, sync + group-shared fence) goes at the first point every thread reaches exactly once: an instruction boundary in a block that lies on every path to every exit and in no loop. Writes are ordered among themselves too: two writes with no such point between them keep the program refused.
  • A lane that the iteration limit (LOOP_LIMIT) stops at a loop's unconditional back edge would return without reaching the barriers ahead and hang the others. It now returns through a block of its own that passes those barriers first.
  • Refused as before: two phases with no such point between them (an LDS read and write inside one branch or loop), GWS, and memory loads into LDS (buffer_load ... lds, which the lowering does not handle).

Of the 64 programs, 18 now translate on their own (6 more need #2711's lifts of #2176's other refusals); the others stay refused, each with the reason in its message. (The in-game numbers below are from the head before writes were made strict, when 20 translated; 34d88edf translates either way.)

The design and a review pass were done with Codex; Codex's review found the buffer-to-LDS case, now refused, with a test.

Tested

RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build, scripted Enter presses. Tree: main f3578e3 + #2464 + #2098 + #2626 + #2628 + #2711 + #2851 + #2705 (VICTORY_CARD_COPIES=1) + this.

GPU time per command (median over each 6-minute run, VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1). The "before" tree has neither #2705 nor this PR; #2705 alone leaves these ray-march passes as they were (95 and 67 ms for c7feccae, 146 and 105 ms for ce30cb33, in its own A/B):

pass before (ms) with this PR (ms)
c7feccae4e01e454 95.1 0.56
8bbcbda6008eaa37 147.6 2.58
ce30cb330ef34306 145.9 2.06
776d835da5ffa646 32.7 1.32
  • 15-minute runs, two: no device removal; both reach the prologue cell with movement prompts, lit through the window. The final head holds 2.4-2.5 fps (~400 ms a frame) at ~4,800 draws for the last 12 minutes; 44 programs left untranslated in the whole run (was 70 before this PR on the same tree). Walls still show green patches that predate this PR.
  • cargo test -p victory-shader --lib for the new tests: 10 passed, including the negative cases (one loop that reads and writes, a buffer load into LDS) and the loop-limit drain. wave64_one_wave_lds_is_refused_on_wave32_host becomes wave64_one_wave_lds_waits_between_its_phases_on_wave32_host (translates and validates).
  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean. cargo xtask policy: ok.

AI-assisted (Claude Code, design and review by Codex). Runs done on my machine.

🤖 Generated with Claude Code

**@⁠moe-miau** on GitHub · 2026-11-26 00:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925) `moe-miau:port/one-wave-lds` → `main` · +662 −14 · 16 files · 5 commits · open **Stacked on #2176 (n-romanovich).** Its commits are in this branch; the change to review is the last commit. I'll rebase once #2176 is merged. If @⁠n-romanovich would rather take this into #2176, I'll close this one. ## Problem #2176 runs a wave64 compute program as two 32-lane host waves on NVIDIA, and refuses one whose thread group is a single console wave (64 threads or fewer) and that uses LDS. The console compiler leaves barriers out of such programs, because one wave's lanes run in step; split into two host waves, they would race on LDS. In the title that refusal drops 64 programs on an RTX 4070 SUPER. One of them, `34d88edf583f3778`, writes the 60×34×512 R16_FLOAT step-length volume that the ray-marched lighting passes (`c7feccae4e01e454`, `8bbcbda6008eaa37`, `0184869d6e47e5fa`, `915ed81ea580a276`, ...) read. Left at zero, every lane marches 0.1-unit steps to the 10,000-step cap: `c7feccae` alone took **305 of ~520 ms** of GPU time a frame (the same pass takes 0.29 ms in fxceless/victory-fork's timing log). Measured with a local probe (reading the texture back before the pass, and logging every dispatch whose unordered views cover its memory): | | t290 texels set | writer seen | |---|---|---| | #2176 as is | 0 of 1,044,480 | none (`34d88edf` refused) | | refusal lifted | 522,240 | `34d88edf583f3778` | ## Change `emit::lower::lds::barriers` (new file, so `lower.rs` stays under the 512 KiB asset-policy limit) plans group barriers instead of refusing: - A program's LDS accesses must come in phases: reads only, writes only, or atomics only. Atomics need no order among themselves; any order of them is one the console could run in a group of several waves. - Between two phases a barrier (`dx.op.barrier`, sync + group-shared fence) goes at the first point every thread reaches exactly once: an instruction boundary in a block that lies on every path to every exit and in no loop. Writes are ordered among themselves too: two writes with no such point between them keep the program refused. - A lane that the iteration limit (`LOOP_LIMIT`) stops at a loop's unconditional back edge would return without reaching the barriers ahead and hang the others. It now returns through a block of its own that passes those barriers first. - Refused as before: two phases with no such point between them (an LDS read and write inside one branch or loop), GWS, and memory loads into LDS (`buffer_load ... lds`, which the lowering does not handle). Of the 64 programs, 18 now translate on their own (6 more need #2711's lifts of #2176's other refusals); the others stay refused, each with the reason in its message. (The in-game numbers below are from the head before writes were made strict, when 20 translated; `34d88edf` translates either way.) The design and a review pass were done with Codex; Codex's review found the buffer-to-LDS case, now refused, with a test. ## Tested RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build, scripted Enter presses. Tree: `main` `f3578e3` + #2464 + #2098 + #2626 + #2628 + #2711 + #2851 + #2705 (`VICTORY_CARD_COPIES=1`) + this. GPU time per command (median over each 6-minute run, `VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1`). The "before" tree has neither #2705 nor this PR; #2705 alone leaves these ray-march passes as they were (95 and 67 ms for `c7feccae`, 146 and 105 ms for `ce30cb33`, in its own A/B): | pass | before (ms) | with this PR (ms) | |---|---:|---:| | `c7feccae4e01e454` | 95.1 | **0.56** | | `8bbcbda6008eaa37` | 147.6 | **2.58** | | `ce30cb330ef34306` | 145.9 | **2.06** | | `776d835da5ffa646` | 32.7 | **1.32** | - 15-minute runs, two: no device removal; both reach the prologue cell with movement prompts, lit through the window. The final head holds 2.4-2.5 fps (~400 ms a frame) at ~4,800 draws for the last 12 minutes; 44 programs left untranslated in the whole run (was 70 before this PR on the same tree). Walls still show green patches that predate this PR. - `cargo test -p victory-shader --lib` for the new tests: 10 passed, including the negative cases (one loop that reads and writes, a buffer load into LDS) and the loop-limit drain. `wave64_one_wave_lds_is_refused_on_wave32_host` becomes `wave64_one_wave_lds_waits_between_its_phases_on_wave32_host` (translates and validates). - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. `cargo xtask policy`: ok. AI-assisted (Claude Code, design and review by Codex). Runs done on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a host of 32-lane waves, #2176 runs a wave64 program as two host waves
and refuses one whose thread group is a single console wave and uses LDS:
the console compiler leaves barriers out of such programs, whose lanes run
in step, so the two host halves would race. In the title that refuses 65
programs, among them 34d88edf583f3778, which writes the step-length volume
a ray-marched lighting pass reads; with that volume left at zero every lane
marches to its step cap (305 of 520 ms of GPU time a frame on an RTX 4070
SUPER).

`lower::lds::barriers` plans group barriers instead: LDS accesses must come
in phases of reads or of writes, and between two phases (and between writes,
where it can) a barrier goes at the first point every thread reaches exactly
once: an instruction boundary in a block on every path to every exit and in
no loop. A lane that the iteration limit stops at a loop's unconditional
back edge returns through a block of its own that first passes the
barriers still ahead, so the others never wait for it. Without such a point, or with LDS
atomics or memory loads into LDS, the program stays refused as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:17:39 +00:00
Triage pointed out that the earlier shortcut assumed one title's tiles write
disjoint slots. Writes are now ordered like any other phase change: two
writes with no point between them that all threads reach keep the program
refused. Of the 64 programs refused before #2925 on the RTX 4070 SUPER run,
18 translate with this (20 with the shortcut); 34d88edf583f3778 still does.
Also drops a stray blank line in the lower.rs tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 00:23 UTC · original · reviewed

Verified head ae618381 cleanly merged onto origin/main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 — WaveLaneCountMax = 32 — + D3D12 WARP + Windows SDK 10.0.26100.0 dxil.dll).

Architecture & Safety Audit

  • Running single-wave Wave64 LDS compute shaders as two 32-lane host waves with spine-only dx.op.barrier(1 | 8) phase separation (refusing unseparable non-spine hazards via NO_POINT and draining remaining Plan::drains barriers on LOOP_LIMIT abort via lds_abort) is well-reasoned and properly refuses cross-half v_readlane/v_writelane/ds_bpermute/non-quad ds_swizzle/64-bit mask-as-data ops when host_wave() < wave().
  • host_wave32() (D3D12_FEATURE_DATA_D3D12_OPTIONS1) and the shader_cache blake3 key update keep Wave32 and Wave64 cached artifacts cleanly separated.
  • File size & #2920 merge note: crates/victory-shader/src/emit/lower.rs is 523,227 B (1,061 B below the 524,288 B 512 KiB policy cap). Note that #2920 leaves lower.rs at 524,190 B, so landing both will require extracting additional helpers out of lower.rs (and checking lds_abort interaction if a shader mixes s_barrier and lds_barrier).

Local Verification (RTX 5090 + dxil.dll)

  • victory-shader: emit::tests::wave64 2/2 (wave64_cross_half_readlane_is_refused_on_wave32_host and wave64_one_wave_lds_waits_between_its_phases_on_wave32_host, DXIL validated), emit::lower:: + emit::flow_tests + emit::crosslane_tests 48/48 (including lds::tests 9/9), emit::memory_tests (skipping pre-existing Blackwell baseline crash) 4/4.
  • victory-gpu (--features diagnostics): shader_cache + draw::tests + host::tests (non-descriptor) 36/36 on RTX 5090.
  • cargo clippy --locked -p victory-shader -p victory-gpu -p victory --tests -- -D warnings (default and --all-features) & cargo xtask policy (192 files ok): clean.

Looks solid and ready to merge.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 00:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925#pullrequestreview-6066876470) · **reviewed** Verified head `ae618381` cleanly merged onto `origin/main` (`63bcca43`) on Windows 11 x64 (NVIDIA GeForce RTX 5090 — `WaveLaneCountMax = 32` — + D3D12 WARP + Windows SDK 10.0.26100.0 `dxil.dll`). ### Architecture & Safety Audit - Running single-wave Wave64 LDS compute shaders as two 32-lane host waves with `spine`-only `dx.op.barrier(1 | 8)` phase separation (refusing unseparable non-spine hazards via `NO_POINT` and draining remaining `Plan::drains` barriers on `LOOP_LIMIT` abort via `lds_abort`) is well-reasoned and properly refuses cross-half `v_readlane`/`v_writelane`/`ds_bpermute`/non-quad `ds_swizzle`/64-bit mask-as-data ops when `host_wave() < wave()`. - `host_wave32()` (`D3D12_FEATURE_DATA_D3D12_OPTIONS1`) and the `shader_cache` blake3 key update keep Wave32 and Wave64 cached artifacts cleanly separated. - **File size & `#2920` merge note**: `crates/victory-shader/src/emit/lower.rs` is **`523,227 B`** (`1,061 B` below the `524,288 B` 512 KiB policy cap). Note that `#2920` leaves `lower.rs` at `524,190 B`, so landing both will require extracting additional helpers out of `lower.rs` (and checking `lds_abort` interaction if a shader mixes `s_barrier` and `lds_barrier`). ### Local Verification (RTX 5090 + `dxil.dll`) - `victory-shader`: `emit::tests::wave64` **2/2** (`wave64_cross_half_readlane_is_refused_on_wave32_host` and `wave64_one_wave_lds_waits_between_its_phases_on_wave32_host`, DXIL validated), `emit::lower::` + `emit::flow_tests` + `emit::crosslane_tests` **48/48** (including `lds::tests` **9/9**), `emit::memory_tests` (skipping pre-existing Blackwell baseline crash) **4/4**. - `victory-gpu` (`--features diagnostics`): `shader_cache` + `draw::tests` + `host::tests` (non-descriptor) **36/36** on RTX 5090. - `cargo clippy --locked -p victory-shader -p victory-gpu -p victory --tests -- -D warnings` (default and `--all-features`) & `cargo xtask policy` (`192 files ok`): clean. Looks solid and ready to merge.
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-26 00:27 UTC · original · reviewed

Scoped review: translating a wave64 program as two host wave32s meeting at group barriers is the right decomposition for NVIDIA/Intel hosts (no WaveSize(64)), and VICTORY_HOST_WAVE32 overriding the query is the standard env-knob shape here. The Options field with ..Default::default() at the two call sites keeps it forward-compatible. Correctness hinges on the barrier pairing being symmetric between the halves — the same counting discipline #2920 introduces, so these likely land best together.

**@⁠kotekompotek** on GitHub · 2026-11-26 00:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925#pullrequestreview-6066907236) · **reviewed** Scoped review: translating a wave64 program as two host wave32s meeting at group barriers is the right decomposition for NVIDIA/Intel hosts (no WaveSize(64)), and `VICTORY_HOST_WAVE32` overriding the query is the standard env-knob shape here. The `Options` field with `..Default::default()` at the two call sites keeps it forward-compatible. Correctness hinges on the barrier pairing being symmetric between the halves — the same counting discipline #2920 introduces, so these likely land best together.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 04:23 UTC · original · edited 2026-11-26 05:46 UTC

Automated triage for the maintainers.

Needs work (one item left). The new commit fd180a6 addresses the earlier point: emit::lower::lds::barriers no longer skips two LDS writes with no common point between them, it refuses the program (NO_POINT) like the other unplaceable cases, and the "tiles write disjoint slots" comment is gone. The stray blank line in the lower.rs tests is removed too.

What still blocks merging as is: the branch carries the three commits of #2176 (n-romanovich's open PR, b2ea86a, 9857ed1, fb99078). Once #2176 lands, a rebase down to the two commits of this PR (or folding them into #2176, as you offered) would make it reviewable on its own. Note also that #233 (with #223) handles wave64 compute on 32-lane hosts by a different route; the maintainers will need to pick one base for this work.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 04:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925#issuecomment-7182555579) · edited 2026-11-26 05:46 UTC <!-- victory-triage v1 head=fd180a60e2ca99594f09871cec56855eb18ff6c9 verdict=needs-work at=2026-11-26T05:45:54Z --> Automated triage for the maintainers. **Needs work (one item left).** The new commit `fd180a6` addresses the earlier point: `emit::lower::lds::barriers` no longer skips two LDS writes with no common point between them, it refuses the program (`NO_POINT`) like the other unplaceable cases, and the "tiles write disjoint slots" comment is gone. The stray blank line in the `lower.rs` tests is removed too. What still blocks merging as is: the branch carries the three commits of #2176 (n-romanovich's open PR, `b2ea86a`, `9857ed1`, `fb99078`). Once #2176 lands, a rebase down to the two commits of this PR (or folding them into #2176, as you offered) would make it reviewable on its own. Note also that #233 (with #223) handles wave64 compute on 32-lane hosts by a different route; the maintainers will need to pick one base for this work. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-26 07:45 UTC · original

RTX 5080 (Blackwell), driver 621.40, title runs: this PR on top of the #2464 / #2176 stack brings back 41 of the 84 dropped compute programs at ae61838 (30 at fd180a6) (including 34d88edf583f3778), runs 600 s with no device removal, and the interior shots gain texture and light, but with a strong green cast I could not pin on this PR or on the wave32_approx change in the same tree.

Tree: main 842b0cb + #1906, #2098, #2626, #2628, #2464, #2176 (fb99078), #2118 + your wave32_approx change and the BVH-builder hold-back from #2176's thread (local), then this PR (ae61838, then fd180a6; both clean merges). Same switches as my earlier reports (diag build, VICTORY_D3D12_DRED=1, scripted Enter, 600 s).

tree without this PR + this PR at ae61838 + ae61838, wave32_approx off
programs refused (translate --cache) 426 341 1,008
pipelines skipped, compute / pixel / mesh shader does not translate 219 / 1 / 0 136 / 1 / 0 324 / 328 / 67
programs whose draws were dropped in the run 85 (84 compute) 44 (43 compute) 145 (138 compute)
device removed in 600 s no no no
frame 2,048 reached at 528 s 445 s 358 s
  • 39 of the 43 compute programs still refused give one-wave LDS on a 32-lane host: no point all threads reach between a write and a read is not supported.
  • 34d88edf583f3778 translates and gets a host pipeline.
  • Frame rate in the world is about the same as without the PR here (~1.7 fps), so the 305 ms pass you measured is not what limits this card in these shots.
  • fd180a6 (refusing one-wave LDS writes with no point between them): 373 programs refused (341 with ae61838), 55 dropped in the run (54 compute, 50 of them one-wave LDS on a 32-lane host: no point all threads reach between a write and a read), no removal in 600 s, frame 2,048 at 479 s, and the green cast on the interior shots is unchanged. So it does not come from the writes fd180a6 now refuses.
  • Picture: with this PR the interior shots are textured and lit (walls, bunk, papers) where the tree without it shows dark silhouettes, but with a strong green tint over the interior and blocky green patches along the bottom. With wave32_approx off the run never reached that interior shot in 600 s (it stayed on the exterior fence shot, as shots follow the clock and more passes were dropped), so I can't say which change brings the green (this PR's barrier lowering of the programs it still translates, wave32_approx, or the two together).

Not tested: more than one run per tree; this PR without #2176's other open points; Series S profile.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine (sandboxed at Low integrity, game folder read-only), read the logs and frame captures, and wrote this report.

**@⁠frenziedcoder** on GitHub · 2026-11-26 07:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925#issuecomment-7185806629) **RTX 5080 (Blackwell), driver 621.40, title runs: this PR on top of the #2464 / #2176 stack brings back 41 of the 84 dropped compute programs at `ae61838` (30 at `fd180a6`) (including `34d88edf583f3778`), runs 600 s with no device removal, and the interior shots gain texture and light, but with a strong green cast I could not pin on this PR or on the `wave32_approx` change in the same tree.** **Tree:** `main` `842b0cb` + #1906, #2098, #2626, #2628, #2464, #2176 (`fb99078`), #2118 + your `wave32_approx` change and the BVH-builder hold-back from #2176's thread (local), then this PR (`ae61838`, then `fd180a6`; both clean merges). Same switches as my earlier reports (diag build, `VICTORY_D3D12_DRED=1`, scripted `Enter`, 600 s). | | tree without this PR | + this PR at `ae61838` | + `ae61838`, `wave32_approx` off | |---|---|---|---| | programs refused (`translate --cache`) | 426 | 341 | 1,008 | | pipelines skipped, compute / pixel / mesh shader does not translate | 219 / 1 / 0 | 136 / 1 / 0 | 324 / 328 / 67 | | programs whose draws were dropped in the run | 85 (84 compute) | 44 (43 compute) | 145 (138 compute) | | device removed in 600 s | no | no | no | | frame 2,048 reached at | 528 s | 445 s | 358 s | - 39 of the 43 compute programs still refused give `one-wave LDS on a 32-lane host: no point all threads reach between a write and a read is not supported`. - `34d88edf583f3778` translates and gets a host pipeline. - Frame rate in the world is about the same as without the PR here (~1.7 fps), so the 305 ms pass you measured is not what limits this card in these shots. - `fd180a6` (refusing one-wave LDS writes with no point between them): 373 programs refused (341 with `ae61838`), 55 dropped in the run (54 compute, 50 of them `one-wave LDS on a 32-lane host: no point all threads reach between a write and a read`), no removal in 600 s, frame 2,048 at 479 s, and **the green cast on the interior shots is unchanged**. So it does not come from the writes `fd180a6` now refuses. - Picture: with this PR the interior shots are textured and lit (walls, bunk, papers) where the tree without it shows dark silhouettes, but with a strong green tint over the interior and blocky green patches along the bottom. With `wave32_approx` off the run never reached that interior shot in 600 s (it stayed on the exterior fence shot, as shots follow the clock and more passes were dropped), so I can't say which change brings the green (this PR's barrier lowering of the programs it still translates, `wave32_approx`, or the two together). **Not tested:** more than one run per tree; this PR without #2176's other open points; Series S profile. *AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine (sandboxed at Low integrity, game folder read-only), read the logs and frame captures, and wrote this report.*
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 11:35 UTC · original

In-game result for the stack #2176 → #2711 → #2925 on an RTX 5090 (32-lane waves), Linux, GE-Proton11-14 Wine with its vkd3d-proton, VICTORY_WAVE32_APPROX=1. Context: #2688.

Base: main plus a few unmerged PRs needed on this setup, including #439's console flow for one-wave LDS on 32-lane hosts. The stack merged on top. The scene is the lit prison yard after the opening, in a warm run.

What it unlocks:

  • Offline, over the whole shader pack with --host-lanes 32-32, 41 of the 42 compute shaders the base refuses (wave64 groups of more than 64 threads, and implicit derivatives in the console flow) now translate. That includes all 21 cascadeshadows_*. Only CS_DensityShadowMapMips (5b2ce592c3a5dd09) still stops.
  • In game, the base refuses 50 distinct shaders and this build 8. 42 pipelines now run that never ran on the base:
    • every cascadeshadows_classify / cascadeshadows_rendering tiled pass;
    • alphaResolve:CS_AlphaTransmissionDepthTileGenerationMip1;
    • the irradiance-cache shade passes;
    • the particle light atlases;
    • the projected-decal resolve;
    • vfx_triangleClip;
    • CS_ComputeInfiniteRRIntensity.
  • Stability: 10 minutes cold plus 10 minutes warm, no device removal, no Xid. The warm frame median was 827 ms, the same as the base.
  • Picture: the window the camera looks through now renders as textured, refracting glass, and the wire mesh over it is gone; on the base it's a sharp mesh over a clear view. I can't tell from this scene which is right. The cold run showed cyan blotches around frame 1450, which were gone in the warm run.

One thing to know if this lands together with #439. Merged naively, #2925's phase plan also ran inside #439's console flow. Its "no point all threads reach between a write and a read" refusal then rejected 138 compute programs the console flow translates, 42 of them used in this scene (lens flares, sr_tracing tiling, ambient-map propagation, particle emit, ...). What worked:

  • programs the console flow handles keep that path, and the phase plan is skipped there (the console flow already puts a group barrier before every LDS access);
  • #2176's halves with #2925's barriers apply only where the console flow refuses, or for groups over 64 threads;
  • #2176's lane mask and #2711's approximation checks apply only to compute outside the split forms.

With that, every program the base emits gives byte-identical DXIL, and the 57 gains stay. While merging I also had to fix one artifact of my own: duplicated lane-number handling made v_writelane_b32 in the console flow write lane n and n XOR 32. That bug isn't in your PRs. I can share the merged branch if it helps.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 11:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2925#issuecomment-7190917894) In-game result for the stack #2176 → #2711 → #2925 on an RTX 5090 (32-lane waves), Linux, GE-Proton11-14 Wine with its vkd3d-proton, `VICTORY_WAVE32_APPROX=1`. Context: #2688. **Base:** `main` plus a few unmerged PRs needed on this setup, including #439's console flow for one-wave LDS on 32-lane hosts. The stack merged on top. The scene is the lit prison yard after the opening, in a warm run. **What it unlocks:** - **Offline,** over the whole shader pack with `--host-lanes 32-32`, 41 of the 42 compute shaders the base refuses (wave64 groups of more than 64 threads, and implicit derivatives in the console flow) now translate. That includes all 21 `cascadeshadows_*`. Only `CS_DensityShadowMapMips` (`5b2ce592c3a5dd09`) still stops. - **In game,** the base refuses 50 distinct shaders and this build 8. 42 pipelines now run that never ran on the base: - every `cascadeshadows_classify` / `cascadeshadows_rendering` tiled pass; - `alphaResolve:CS_AlphaTransmissionDepthTileGenerationMip1`; - the irradiance-cache shade passes; - the particle light atlases; - the projected-decal resolve; - `vfx_triangleClip`; - `CS_ComputeInfiniteRRIntensity`. - **Stability:** 10 minutes cold plus 10 minutes warm, no device removal, no Xid. The warm frame median was 827 ms, the same as the base. - **Picture:** the window the camera looks through now renders as textured, refracting glass, and the wire mesh over it is gone; on the base it's a sharp mesh over a clear view. I can't tell from this scene which is right. The cold run showed cyan blotches around frame 1450, which were gone in the warm run. **One thing to know if this lands together with #439.** Merged naively, #2925's phase plan also ran inside #439's console flow. Its "no point all threads reach between a write and a read" refusal then rejected 138 compute programs the console flow translates, 42 of them used in this scene (lens flares, `sr_tracing` tiling, ambient-map propagation, particle emit, ...). What worked: - programs the console flow handles keep that path, and the phase plan is skipped there (the console flow already puts a group barrier before every LDS access); - #2176's halves with #2925's barriers apply only where the console flow refuses, or for groups over 64 threads; - #2176's lane mask and #2711's approximation checks apply only to compute outside the split forms. With that, every program the base emits gives byte-identical DXIL, and the 57 gains stay. While merging I also had to fix one artifact of my own: duplicated lane-number handling made `v_writelane_b32` in the console flow write lane n and n XOR 32. That bug isn't in your PRs. I can share the merged branch if it helps. _AI-assisted (Claude); measured on my machine, no game data shared._
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2925/head:github-bot/gh-2925'
git switch 'github-bot/gh-2925'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2925'
git switch 'github-bot/gh-2925'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2925'
git switch 'github-bot/gh-2925'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2925'
git switch 'main'
git merge --squash 'github-bot/gh-2925'
git switch 'main'
git merge --ff-only 'github-bot/gh-2925'
git switch 'main'
git merge 'github-bot/gh-2925'
git push origin 'main'
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/Marvisak--VIctory!2925
No description provided.