Shaders: wave64 compute on 32-lane hosts, in halves and in the console flow #233

Open
github-bot wants to merge 29 commits from github-bot/gh-233 into main AGit
Owner

@⁠r4tedx on GitHub · 2026-11-24 01:40 UTC · original
r4tedx:shader/wave64-console-flow → main · +2988 −1428 · 24 files · 29 commits · open

Current head 87d1f423, which merges main 63bcca4 (no rebase or force-push); CI check is green on it. 19f63196 moves lower.rs's inline tests, unchanged, into emit/lower/tests.rs, so lower.rs stays under the 512 KiB file-size limit with main merged in; that move is the bulk of the diff and changes no code. The design note docs/wave64-on-wave32.md was removed in 691ff20; a short summary is in docs/architecture.md. Merge notes and per-level checks: #439. The older notes below name the heads they were written for. AI-assisted.

Reports from the title, read before merging. Testers ran this on their own copies (their data, linked):

Stacked on #223 (its commit is the first one here); review that first.

Rebased onto main 8e79c80 on 2026-11-24 (twice that day; upstream merged about 55 PRs and added CI; new upstream tests needed the argument #223 adds and the field this PR adds to lower::Parts, fixed in the commits that introduce them). CI's two clippy commands (-D warnings, with and without --all-features) are clean at this head. CI's first run on these PRs failed in tests, not in clippy: GitHub's runner has no GPU and lists Windows' software renderer (4-lane waves) as an adapter, and tests here assumed every listed adapter runs 32-lane waves. The tests are fixed where they were introduced: the hardware-adapter list leaves that renderer out by its ids and name, and the one test that takes the default device accepts a host without 32-lane waves. No translator code changed. Head dd3c08c, was 3098672; the six commits here are replayed unchanged. Ids in testers' reports are from before the rebase: 727e884 is now 63f197d, 3098672 is now dd3c08c.

What

Console wave64 compute programs that depend on the lane layout run on hosts without 64-lane waves (NVIDIA: D3D12 range 32..32), as two 32-lane waves per console wave. Two forms, picked per program:

  • In-half split. A program whose cross-lane reads are only DPP and ds_swizzle (reads within 16, 8, 32 or 4 lanes), with no mask read whole, no LDS and no whole-wave sections, declares WaveSize(32). It uses the existing thread relabelling, and DPP row masks name the console's rows.

  • Console flow, for groups of at most 64 threads (one console wave) without LDS. Every lane runs every block, as on the console:

    • structure::structure_console builds the per-lane booleans without resolving mask joins from what arriving lanes know (every lane arrives), and Structured::execs gives the lane's EXEC bit at each vector instruction.
    • The lowering guards every vector instruction with EXEC (v_readlane, v_writelane and v_readfirstlane ignore it, as on the console).
    • Branches are the console's s_cbranch_*: EXEC, VCC and mask-operation SCC tests are taken for the whole console wave, from both halves' ballots.
    • Each half's dword is exchanged through two group-shared slots between two group barriers. Since both halves take every branch alike, every thread of the group reaches each barrier, inside divergent branches and loops too.
    • Masks read whole (s_bcnt1, s_ff1, scalar compares) are the exchanged ballots. v_readlane and v_readfirstlane read the owning half; v_writelane, v_mbcnt and mask bit tests use the console lane.

    lower tries the per-lane form first. A program that needs the console flow stops with CONSOLE_FLOW and is lowered again from the console structure.

Also: emit::host::Host::on(name), adapters() and VICTORY_ADAPTER for tests, so a machine with two GPUs can run each test natively (64-lane adapter, the reference) and split (32-lane adapter). docs/architecture.md summarizes the design (the longer docs/wave64-on-wave32.md was removed in 691ff20).

Nothing changes on hosts that run 64-lane waves.

How this relates to other open PRs

  • #189 (alfycs) also runs wave64 compute as two 32-lane waves with group-shared exchanges, and covers much this PR does not: groups of several console waves, LDS, whole-wave reductions and prefix sums, SGPR spills at constant lanes, and an emulation mode for WARP. It keeps the per-lane control flow and refuses exchanges outside blocks the whole group reaches. This PR's console flow covers exactly those refused cases: exchanges inside branches one half skips, and lane reads in loops the halves leave at different iterations (tests below). The two could be combined: the console flow for divergent single-wave programs, #189 for the rest.
  • #192 (kxiserino) gives DPP/ds_swizzle-only programs WaveSize(32), like the in-half split here (and on 64-lane hosts too), and orders single-wave LDS with barriers, which this PR does not do. It has no cross-half exchange. Its DPP row-mask handling caught a bug in an earlier version of this branch, fixed in 727e884.
  • #54 (alessiodeia) declares WaveSize(32) for groups of at most 32 threads and resolves SGPR spills in SSA. Groups of 33 to 64 threads, which this PR handles, stay WaveSize(64) there.
  • #94 adds VICTORY_ADAPTER with the same meaning to the shader test host. If it merges first, the adapter helpers here move onto its API.
  • #225: the console flow is also the direction suggested there for the per-lane lane-read bug on every GPU. This PR uses it only for split wave64 programs.

Not verified

No game files and no console hardware were used. The expected values in the tests follow the ISA's EXEC, v_readlane, ballot and DPP semantics, checked against the native form on an RDNA2 GPU where that form is right. I did not measure how many of the title's programs each form covers. Testers did, on their own copies: the counts are in the note at the top (98 of the 321 compute programs a 32-lane driver refuses on main).

The console flow runs both halves through every block, guarded, so a divergent program costs more than in the per-lane form. Each exchange is two group barriers. Not measured on real shaders.

Not covered yet: groups of more than 64 threads that need an exchange, LDS in split programs, whole-wave sections, ds_(b)permute across halves. These still stop at translation with the reason from #223.

Tested

Windows 11, an NVIDIA RTX 5070 (32..32, split) and an AMD Radeon iGPU (RDNA2, 32..64, native) in one machine. Hand-assembled GFX10 programs run on every hardware adapter (emit/split_tests.rs), every lane checked against the console's result:

  • In-half: ds_swizzle xor 16 plus DPP row_mirror, in groups of 32, 64 and 128 threads and 3-D groups 4x4x4, 8x8x2, 2x4x8, 16x2x4, 8x8x4 and 4x8x8. Exact on both, so the thread relabelling holds on this NVIDIA driver for all of them. DPP row_mask:0x3: exact on both; it failed on the RTX 5070 before 727e884.

  • Console flow, exact on the RTX 5070:

    • s_bcnt1 of lanes below 40 in groups of 64, 48 and 32 threads;
    • v_readlane 40;
    • a v_readlane inside a branch only lanes below 20 take (the upper half has no lane there);
    • a loop lane t runs t times with v_readlane 40 in every iteration.

    The last one is wrong in the per-lane form on the Radeon (#225), so that test checks 64-lane hosts only for the other cases.

  • A 128-thread program that needs an exchange still stops at translation on 32..32.

  • Merged with #164 (64-bit LDS atomics): the exchange's group-shared slots and its LDS compose, and all tests pass once #164's new test passes the Target argument.

  • cargo test --workspace: 278 passed, 0 failed, 4 ignored (at 3098672, which adds the v_readfirstlane fix and its test). cargo clippy --workspace --all-targets: nothing new. cargo xtask policy: ok. Each commit builds on its own.

The approach of pairing two 32-lane waves through group-shared memory follows XCL's design notes (docs/wave64-on-wave32.md in ivall/xcl, GPL-2.0-only); no code from XCL or its forks is used.

AI-assisted; no game assets were used.

🤖 Generated with Claude Code

**@⁠r4tedx** on GitHub · 2026-11-24 01:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/233) `r4tedx:shader/wave64-console-flow` → `main` · +2988 −1428 · 24 files · 29 commits · open **Current head `87d1f423`, which merges `main` `63bcca4` (no rebase or force-push); CI `check` is green on it.** `19f63196` moves lower.rs's inline tests, unchanged, into `emit/lower/tests.rs`, so lower.rs stays under the 512 KiB file-size limit with `main` merged in; that move is the bulk of the diff and changes no code. The design note `docs/wave64-on-wave32.md` was removed in `691ff20`; a short summary is in `docs/architecture.md`. Merge notes and per-level checks: [#439](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439). The older notes below name the heads they were written for. AI-assisted. > **Reports from the title, read before merging.** Testers ran this on their own copies (their data, linked): > - Whole-title translate on a 32-lane host: [98 compute pipelines gained, 0 lost](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233). > - [5 of the 98 are created from modules that fail `dxil.dll` validation](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), and all of them call `sample`. This is not something this PR emits differently: compute programs that sample with implicit derivatives (`image_sample`) are emitted as `dx.op.sample`, which validator 1.6 / 1.7 rules do not allow outside pixel shaders. [`main` emits 23 such modules and this PR 22, all of which already failed on `main`](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), so it adds none. [Diagnosis with a hand-assembled reproduction](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233); #180 replaces these samples and #201 tracks the class. A [census rerun](https://git.gtahub.st/github/Marvisak--VIctory/issues/201) by another tester measured it: with #180 (and #459) on `main`, the 23 compute failures of this class go to 0 and nothing that validated before fails. The 5 are modules `main` also emits; there the driver refuses their pipelines for the wave size, and here they get one. > - [Windows 10, RTX 3080, driver 32.0.15.9649](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233): compute refusals drop from 103 to 1 and more draws run. The one pipeline that driver refuses (`E_OUTOFMEMORY`) is one of those 5 modules; newer drivers (616.92, 621.x) take it. The log shows a first-chance exception in the driver's shader compiler shortly before; that the two are linked is not proven. The run then ends in a device removal. > - Two Windows 11 runs ([RTX 5070 Ti](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320), [RTX 5080](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320)) end in the same device removal with and without this stack. Stacked on #223 (its commit is the first one here); review that first. Rebased onto `main` `8e79c80` on 2026-11-24 (twice that day; upstream merged about 55 PRs and added CI; new upstream tests needed the argument #223 adds and the field this PR adds to `lower::Parts`, fixed in the commits that introduce them). CI's two clippy commands (`-D warnings`, with and without `--all-features`) are clean at this head. CI's first run on these PRs failed in tests, not in clippy: GitHub's runner has no GPU and lists Windows' software renderer (4-lane waves) as an adapter, and tests here assumed every listed adapter runs 32-lane waves. The tests are fixed where they were introduced: the hardware-adapter list leaves that renderer out by its ids and name, and the one test that takes the default device accepts a host without 32-lane waves. No translator code changed. Head `dd3c08c`, was `3098672`; the six commits here are replayed unchanged. Ids in testers' reports are from before the rebase: `727e884` is now `63f197d`, `3098672` is now `dd3c08c`. ## What Console wave64 compute programs that depend on the lane layout run on hosts without 64-lane waves (NVIDIA: D3D12 range 32..32), as two 32-lane waves per console wave. Two forms, picked per program: - **In-half split.** A program whose cross-lane reads are only DPP and `ds_swizzle` (reads within 16, 8, 32 or 4 lanes), with no mask read whole, no LDS and no whole-wave sections, declares `WaveSize(32)`. It uses the existing thread relabelling, and DPP row masks name the console's rows. - **Console flow**, for groups of at most 64 threads (one console wave) without LDS. Every lane runs every block, as on the console: - `structure::structure_console` builds the per-lane booleans without resolving mask joins from what arriving lanes know (every lane arrives), and `Structured::execs` gives the lane's EXEC bit at each vector instruction. - The lowering guards every vector instruction with EXEC (`v_readlane`, `v_writelane` and `v_readfirstlane` ignore it, as on the console). - Branches are the console's `s_cbranch_*`: EXEC, VCC and mask-operation SCC tests are taken for the whole console wave, from both halves' ballots. - Each half's dword is exchanged through two group-shared slots between two group barriers. Since both halves take every branch alike, every thread of the group reaches each barrier, inside divergent branches and loops too. - Masks read whole (`s_bcnt1`, `s_ff1`, scalar compares) are the exchanged ballots. `v_readlane` and `v_readfirstlane` read the owning half; `v_writelane`, `v_mbcnt` and mask bit tests use the console lane. `lower` tries the per-lane form first. A program that needs the console flow stops with `CONSOLE_FLOW` and is lowered again from the console structure. Also: `emit::host::Host::on(name)`, `adapters()` and `VICTORY_ADAPTER` for tests, so a machine with two GPUs can run each test natively (64-lane adapter, the reference) and split (32-lane adapter). `docs/architecture.md` summarizes the design (the longer `docs/wave64-on-wave32.md` was removed in `691ff20`). Nothing changes on hosts that run 64-lane waves. ### How this relates to other open PRs - **#189** (alfycs) also runs wave64 compute as two 32-lane waves with group-shared exchanges, and covers much this PR does not: groups of several console waves, LDS, whole-wave reductions and prefix sums, SGPR spills at constant lanes, and an emulation mode for WARP. It keeps the per-lane control flow and refuses exchanges outside blocks the whole group reaches. This PR's console flow covers exactly those refused cases: exchanges inside branches one half skips, and lane reads in loops the halves leave at different iterations (tests below). The two could be combined: the console flow for divergent single-wave programs, #189 for the rest. - **#192** (kxiserino) gives DPP/`ds_swizzle`-only programs `WaveSize(32)`, like the in-half split here (and on 64-lane hosts too), and orders single-wave LDS with barriers, which this PR does not do. It has no cross-half exchange. Its DPP row-mask handling caught a bug in an earlier version of this branch, fixed in `727e884`. - **#54** (alessiodeia) declares `WaveSize(32)` for groups of at most 32 threads and resolves SGPR spills in SSA. Groups of 33 to 64 threads, which this PR handles, stay `WaveSize(64)` there. - **#94** adds `VICTORY_ADAPTER` with the same meaning to the shader test host. If it merges first, the adapter helpers here move onto its API. - **#225**: the console flow is also the direction suggested there for the per-lane lane-read bug on every GPU. This PR uses it only for split wave64 programs. ## Not verified No game files and no console hardware were used. The expected values in the tests follow the ISA's EXEC, `v_readlane`, ballot and DPP semantics, checked against the native form on an RDNA2 GPU where that form is right. I did not measure how many of the title's programs each form covers. Testers did, on their own copies: the counts are in the note at the top (98 of the 321 compute programs a 32-lane driver refuses on `main`). The console flow runs both halves through every block, guarded, so a divergent program costs more than in the per-lane form. Each exchange is two group barriers. Not measured on real shaders. Not covered yet: groups of more than 64 threads that need an exchange, LDS in split programs, whole-wave sections, `ds_(b)permute` across halves. These still stop at translation with the reason from #223. ## Tested Windows 11, an NVIDIA RTX 5070 (32..32, split) and an AMD Radeon iGPU (RDNA2, 32..64, native) in one machine. Hand-assembled GFX10 programs run on every hardware adapter (`emit/split_tests.rs`), every lane checked against the console's result: - In-half: `ds_swizzle` xor 16 plus DPP `row_mirror`, in groups of 32, 64 and 128 threads and 3-D groups 4x4x4, 8x8x2, 2x4x8, 16x2x4, 8x8x4 and 4x8x8. Exact on both, so the thread relabelling holds on this NVIDIA driver for all of them. DPP `row_mask:0x3`: exact on both; it failed on the RTX 5070 before `727e884`. - Console flow, exact on the RTX 5070: - `s_bcnt1` of lanes below 40 in groups of 64, 48 and 32 threads; - `v_readlane` 40; - a `v_readlane` inside a branch only lanes below 20 take (the upper half has no lane there); - a loop lane t runs t times with `v_readlane` 40 in every iteration. The last one is wrong in the per-lane form on the Radeon (#225), so that test checks 64-lane hosts only for the other cases. - A 128-thread program that needs an exchange still stops at translation on 32..32. - Merged with #164 (64-bit LDS atomics): the exchange's group-shared slots and its LDS compose, and all tests pass once #164's new test passes the `Target` argument. - `cargo test --workspace`: 278 passed, 0 failed, 4 ignored (at `3098672`, which adds the `v_readfirstlane` fix and its test). `cargo clippy --workspace --all-targets`: nothing new. `cargo xtask policy`: ok. Each commit builds on its own. The approach of pairing two 32-lane waves through group-shared memory follows XCL's design notes (`docs/wave64-on-wave32.md` in ivall/xcl, GPL-2.0-only); no code from XCL or its forks is used. AI-assisted; no game assets were used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
How one console wave64 runs as two 32-lane host waves under our
per-lane structurisation, what has to cross halves, why exchanges need
uniform regions, how to test on a machine with both GPU kinds, and the
order of the remaining steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A compute shader that reads other lanes declares the console's wave
size. NVIDIA runs waves of 32 lanes only (D3D12 reports 32..32), so a
console wave64 program of that kind was refused at pipeline creation
and its dispatches were dropped without saying why.

The host's wave range (D3D12 options 1) now goes into translation as
`emit::Target`. A shader that needs a wave size the host does not run
stops there with the reason, the shader cache keys entries by the range,
and the run logs the range once with a warning when 64-lane waves are
missing. `victory translate --host-lanes 32-32` counts these shaders
without a GPU.

This is the first step towards running these programs as two 32-lane
waves on such hosts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`emit::host::Host::on(name)` and `VICTORY_ADAPTER` choose a hardware
adapter by part of its description, and `adapters()` lists them, so a
machine with an AMD and an NVIDIA GPU can run a test on each: the
native wave64 form as the reference on the one with 64-lane waves, the
32-lane form on the other. A new test checks on every adapter that a
wave64 program reading other lanes translates exactly when the adapter
runs 64-lane waves, and that the adapter then takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a host without 64-lane waves (NVIDIA), a console wave64 compute
program whose lanes read only their own 32-lane half (DPP, ds_swizzle)
now declares WaveSize(32) instead of failing to translate. It must
read no mask whole, test no bit of a mask held as a number, have no
whole-wave sections and use no LDS. Every other wave64 program that
depends on the lane layout still stops with the reason from the
previous step. Mask ballots, wave reductions and lane-bit tests refuse
the split form as a safety net.

New GPU tests run hand-assembled programs on every hardware adapter
and check each lane against the console's layout. On an RTX 5070 the
split form is exact for 1-D groups of 32, 64 and 128 threads and for
3-D groups up to 8x8x4. A Radeon iGPU runs the same programs natively
as the reference, and a read across halves (v_readlane 40) still needs
64-lane waves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A console wave64 program that reads masks whole or lanes of the other
half now runs on a host without 64-lane waves when its group is one
console wave (64 threads or fewer, no LDS). It runs as the console
does ("console flow"):

- `structure::structure_console` never resolves mask joins from what
  the lanes arriving know (every lane arrives); `Structured::execs`
  gives each vector instruction's EXEC bit.
- Vector instructions are guarded by EXEC. Branches are the console's
  s_cbranch_*: EXEC, VCC and mask-operation SCC tests are the console
  wave's, from both halves' ballots exchanged through group-shared
  memory between group barriers, which every thread reaches since both
  halves branch alike.
- Masks read whole are the exchanged ballots. v_readlane and
  v_readfirstlane read the owning half; v_writelane, v_mbcnt and mask
  bit tests use the console lane.

The per-lane form is tried first; a program that needs the console
flow is lowered again from the console structure.

GPU tests on an RTX 5070 are exact against the console: s_bcnt1 over
both halves (64, 48 and 32 threads), v_readlane 40, an exchange inside
a branch only the lower half takes, and a loop the halves leave at
different iterations with a lane read in each. The last one shows that
the per-lane form, which hosts with 64-lane waves get, is wrong for it
(on a Radeon iGPU): noted in docs/wave64-on-wave32.md, not changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A wave64 program split over two 32-lane waves took the DPP row index
from the host lane, so the upper half (console rows 2 and 3) read
row_mask bits 0 and 1. The row now comes from the console lane there.
New test: v_mov_b32_dpp with row_mask:0x3 writes lanes 0 to 31 only,
exact on an RTX 5070 (split) and a Radeon iGPU (native).

Found in review against #189 and #192, which both get this right.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
v_readfirstlane reads the console wave's first lane. A wave64 program
with DPP or ds_swizzle and a v_readfirstlane was split into two 32-lane
waves, where the upper half read its own first lane: with all 64 lanes
active, lanes 32 to 63 got lane 32's value where the console gives
lane 0's (measured on an RTX 5070).

Such programs now take the console flow, which reads the first lane in
EXEC of the whole console wave (groups of at most 64 threads, no LDS),
or stop with the reason as they did before the split existed.

New test, exact on an RTX 5070 and a Radeon iGPU. Found by running the
same program against #192, which has the same result on both adapters.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The comment on the console flow's SCC said both write the old EXEC to
their scalar destination. Only saveexec does; wrexec writes the new EXEC
to both, so either write names the mask SCC tests.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Main lowers a descriptor each lane holds by the path it took
(Source::LanePhi, #566) as a DXIL phi over the edges into the join. In
the console flow every lane reaches the join by the edge the wave took,
so the phi gave every lane that edge's descriptor, silently: the joined
if/else program of the waterfall tests, lowered in the console flow,
sampled the second texture in all 32 lanes where lanes 0-15 hold the
first (RTX 5070; the module passes dxil.dll).

The console flow now stops with its own reason there. A program that
takes the console flow only for its lane reads keeps the per-lane form
where that translates; one that needs it for the host's wave size stops
with the reason.

Found on the testers' branch, where #566 and the console flow first met.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The GPU tests walk every hardware adapter and expect each to take the
console's wave-size-dependent programs in one form or the other. An
integrated GPU with narrower waves (an Intel UHD reporting 16-16 was
reported on #439) runs none of them: the translator refuses, correctly,
and 30 tests failed there for expecting a pipeline. The list now leaves
such an adapter out, by its wave range, as it already left out the
software renderer by name. An adapter no SM 6.6 device can be made on
stays listed, for its user to skip as before.

Checked on an RTX 5070 (32-32) and a Radeon iGPU (32-64): both still
listed, each_adapter_gets_what_it_runs and two split tests exact. Not
checked on a 16-lane adapter (none here).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The tests that walk every hardware adapter (split_tests, the lane-read
loop tests, each_adapter_gets_what_it_runs) opened each one by name, so
neither VICTORY_ADAPTER nor VICTORY_WARP=1 kept them off a card: a run
meant for the software renderer still dispatched on every GPU in the
machine.

The adapter list now honours them. VICTORY_TEST_ADAPTERS=<part of a
name>[,<part>...] lists only the adapters whose description holds one
of the parts; without it VICTORY_ADAPTER=<part> does the same, so one
setting keeps a whole shader test run on one adapter; VICTORY_WARP=1
lists none. An adapter that is left out is not opened at all.

Checked on a machine with an RTX 5070 and a Radeon iGPU, with two of
these tests: VICTORY_ADAPTER=Radeon and VICTORY_TEST_ADAPTERS=radeon
run on the Radeon only; VICTORY_WARP=1 and a name that matches nothing
run on no adapter.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Conflicts were where main's write marks (`emit::Options`, `emit_with`,
`translate_with`, `Parts::view_marks`) and its warm-up (`translate
--cache`, `host_shader` returning whether the entry was cached) met the
branch's `Target`:

- emit: `Options` gains `target` (default `Target::ANY`), so main's
  `emit_with` and `translate_with` keep their signatures; `emit(..,
  target)` and `translate_for(c, target)` stay as they were and fill it
  in. `Parts` has both `target` and `view_marks`. Main's retry with
  `structure::killing` is kept as it is.
- shader cache: `host_shader(container, target)` translates with main's
  write marks for `target` and keeps main's (result, cached) pair; the
  branch's key function is renamed `host_key`, since main now has a
  `key` for the build.
- `translate --cache` (new on main) asks `shader_cache::host_target()`,
  which is what a run's `pipeline::translate` uses, so warm entries are
  keyed as the run looks them up; `--cache` refuses `--host-lanes`.
- `translate` (the census) passes its target with main's `view_marks:
  true`; `--pipelines` documents both the host's wave sizes and main's
  pipeline library.
- victory-gpu `Host` keeps both `target` and main's `heap_atomics64`.
- The `Parts` and `emit` call sites main added (the `fuses_fmad` probe
  in `emit/host.rs` and tests in bvh, memory, semantics, stride,
  synthetic, valu and `emit::tests`) pass `Target::ANY`.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Main's newer lowering is kept as it is around the console flow: the
waterfall loop's `v_readfirstlane_b32` and the spilled-SGPR
`v_readlane_b32` keep their arms before the console-flow ones, the
helper-lane read stays in the per-lane `v_readfirstlane_b32`, and
`lane_bit_of`, `mask_number`, the heap and view guards and the write
marks are untouched. Resolutions worth knowing:

- `mask_dword`: the console flow's exchanged ballot comes first, then
  the split form's refusal, then main's `mask_number` for masks holding
  lanes elsewhere (per-lane form only: in the console flow every lane is
  at the block that writes the mask).
- `emit`: one `parts(st, res, console_cf)` closure serves the per-lane
  pass, the `CONSOLE_FLOW` retry with `structure_console`, and main's
  retry with `structure::killing` (pixel discards; never both).
- `structure`: `structure_as(program, helpers, console)` behind
  `structure`, `killing` and `structure_console`; `Structured` has both
  `execs` and main's `restored` / `discards`.
- Test host: `Host::new` takes `VICTORY_ADAPTER` first, else main's
  first adapter that is a GPU (so a machine without one still skips);
  `adapters()` and `Host::on` keep their own hardware test.
- Main's per-lane reasoning that does not hold where the wave takes the
  branches is switched off in the console flow: `never_taken` and the
  branch conditions `live_edges` collects (a lane comes along an edge
  whatever its own condition is, and SGPRs are the wave's). The console
  flow fills phis as it did before the merge.
- Main's 16-bit whole-wave section (`Shape::Half`) reduces over the host
  wave and reads lane `hi` of it: refused in a program split in halves,
  as the other reductions are.
- The `Parts` sites main added pass `console_cf: false`.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Main's `v_cndmask_b32` now takes masks that derive from neither EXEC nor
a compare (`Structured::other`, inline constants) and tests the lane's
bit of the number. In a wave64 program run as two 32-lane waves without
the console flow, `lane_bit` has only the host lane: lanes 32..63 would
test the low word. Guards and branch conditions on such masks already
keep a program out of that form, a select's mask does not, so the merged
code reached `lane_bit`'s debug assertion (and, without assertions, the
wrong bits).

`lane_bit` now returns the refusal instead of asserting. The select then
has no result, and the program stops with that reason if the result is
used.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
A compute program's image_sample or image_sample_b has no valid DXIL
form yet: the module fails validation with "an operation that is
incompatible with the shader stage" (#201). Drivers take such a module
in the per-lane form. In the console flow in two 32-lane halves the
same module also carries group barriers inside its branches and loops,
and a title run on an RTX 4070 lost its device in a submission of two
of them (ptfx_CS_lightAtlas_Sprite and _Trail, reported on #233 from
fxceless/victory-gta6@e9765a7). That is the best-supported reading,
not a proven cause.

On a host without 64-lane waves such a program now stops, by name,
with "an implicit-derivative sample in the console flow on a host
without 64-lane waves". The per-lane form and hosts with 64-lane waves
are unchanged.

Offline over the title's shader pack (local title data, CPU only,
counts only; 32-lane host): exactly 12 compute programs change, all from
"emitted, fails validation" to this refusal; none that validates is
lost. Both programs named in the report and the one tied to an earlier
RTX 3080 report are among them. None of the 12 ran on a 32-lane card
before this stack.

Test (CPU only, no device): emit::tests::
implicit_samples_stop_the_console_flow_in_halves; it fails with the
guard disabled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A wave64 program that restores EXEC dword by dword from a mask
(s_mov_b32 exec_lo, s12; s_mov_b32 exec_hi, s13) leaves the structure
pass holding the mask as a number that is known only as the mask's own
dword. With console lanes the lowering followed that in a circle until
the stack ran out, which ends the whole process: a translator run, or
the runtime translating a title's shader. Reproduced at this level after
the merge with main 940d32f with the test below (stack overflow).

The opaque-mask arm now stops with "an opaque lane mask" when it meets
the mask it is already reading, as #439 has done since f12df1e. Test
taken from there: a_mask_copied_dword_by_dword_stops_instead_of_recursing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: GPT-6.2 Sol (Codex) <[email protected]>
Co-Authored-By: GPT-6.2 Sol (Codex) <[email protected]>
Co-Authored-By: GPT-6.2 Sol (Codex) <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:55:50 +00:00
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 02:23 UTC · original

Thanks for the run on a second Blackwell card, and for trying the two together. I reproduced all of it on an RTX 5070 and a Radeon iGPU (RDNA2, 32..64) and followed it up.

The build break. Yes: whichever of #269 and this lands second needs target / console_cf in build_lanes_cs (and per_lane_only with #320). I will fix it on my side if #269 goes in first.

The per-half counts are not from this PR's split. #269's programs read no other lane, so they declare no wave size, and a 64-thread group runs as whatever waves the host forms: two of 32 on NVIDIA, with or without this PR. #269 takes its maxima over the host wave, which is the console wave only when the host forms 64-lane waves. The Radeon iGPU here shows the same thing on plain #269 9356bee (with a local patch only to pick the adapter): scalar_counted_in_a_divergent_loop_read_after_it gives 32 on lanes 0-31 and 64 on lanes 32-63, the nested test 8 and 16. That driver runs an undeclared compute shader in waves of 32 although it offers 64. I have left a note on #269.

The console flow gets #269's four programs right, after one fix. With a local switch that sends every compute program through the console flow (not in any PR), in a merge of #269 onto #320:

RTX 5070 (two halves) Radeon iGPU (native)
loop_exit_mask_counted_after_the_loop exact exact
scalar_counted_in_a_divergent_loop_read_after_it exact exact
scalar_counted_in_nested_divergent_loops exact exact
mask_grown_inside_a_branch_counted_after_it exact exact

Scalars are the wave's own there by construction (every lane runs every block, branches are taken wave-wide), so nothing needs a maximum.

The fix: a lane-mask join of an untracked mask, which you hit, was a gap in the console flow. A loop's exit mask starts as a constant 0, and the console flow's mask joins took only masks derived from EXEC or a VALU result. Fixed in 5cc9a7e on #320 with a test of its own (a loop in that form with a lane read in each iteration and the exit mask counted afterwards: refused on the RTX 5070 before, exact on both adapters now).

What is not done. Neither this PR nor #320 selects the console flow for #269's programs: they select on lane reads and on masks read whole, not on scalars leaving a divergent loop. So the combination still gives per-half counts for the two scalar tests on a 32-lane host until one of them makes that selection. I would rather add it as a follow-up once #269 or this has landed than guess at #269's condition here.

No game data used. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 02:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120083839) Thanks for the run on a second Blackwell card, and for trying the two together. I reproduced all of it on an RTX 5070 and a Radeon iGPU (RDNA2, 32..64) and followed it up. **The build break.** Yes: whichever of #269 and this lands second needs `target` / `console_cf` in `build_lanes_cs` (and `per_lane_only` with #320). I will fix it on my side if #269 goes in first. **The per-half counts are not from this PR's split.** #269's programs read no other lane, so they declare no wave size, and a 64-thread group runs as whatever waves the host forms: two of 32 on NVIDIA, with or without this PR. #269 takes its maxima over the host wave, which is the console wave only when the host forms 64-lane waves. The Radeon iGPU here shows the same thing on plain #269 `9356bee` (with a local patch only to pick the adapter): `scalar_counted_in_a_divergent_loop_read_after_it` gives 32 on lanes 0-31 and 64 on lanes 32-63, the nested test 8 and 16. That driver runs an undeclared compute shader in waves of 32 although it offers 64. I have left a note on #269. **The console flow gets #269's four programs right, after one fix.** With a local switch that sends every compute program through the console flow (not in any PR), in a merge of #269 onto #320: | | RTX 5070 (two halves) | Radeon iGPU (native) | |---|---|---| | `loop_exit_mask_counted_after_the_loop` | exact | exact | | `scalar_counted_in_a_divergent_loop_read_after_it` | exact | exact | | `scalar_counted_in_nested_divergent_loops` | exact | exact | | `mask_grown_inside_a_branch_counted_after_it` | exact | exact | Scalars are the wave's own there by construction (every lane runs every block, branches are taken wave-wide), so nothing needs a maximum. The fix: `a lane-mask join of an untracked mask`, which you hit, was a gap in the console flow. A loop's exit mask starts as a constant 0, and the console flow's mask joins took only masks derived from EXEC or a VALU result. Fixed in `5cc9a7e` on #320 with a test of its own (a loop in that form with a lane read in each iteration and the exit mask counted afterwards: refused on the RTX 5070 before, exact on both adapters now). **What is not done.** Neither this PR nor #320 selects the console flow for #269's programs: they select on lane reads and on masks read whole, not on scalars leaving a divergent loop. So the combination still gives per-half counts for the two scalar tests on a 32-lane host until one of them makes that selection. I would rather add it as a follow-up once #269 or this has landed than guess at #269's condition here. No game data used. AI-assisted.
Author
Owner

@⁠Raxstreams on GitHub · 2026-11-24 02:27 UTC · original · edited 2026-11-24 02:30 UTC

Tested the PR head at 727e884 on an RTX 3080 Ti. I replayed 96 distinct compute shaders from a run where every shader passed DXIL validation and every D3D12 compute pipeline creation failed. On this PR alone, 18 of the 96 passed both checks, including all three depth-pyramid shaders (8×8 groups). The driver created another seven pipelines whose DXIL failed validation. With this PR's lowering on our existing integration branch, 25/96 passed both checks, including all three depth shaders.

I also launched the local integration build. It reached the intro location card, then presented a black frame with 1,872 draws and exited with DXGI_ERROR_DEVICE_HUNG. The slow-submission trace included two of the depth-pyramid pipelines. That trace covers many pipelines per submission and does not identify the command responsible for the hang. I have not seen a rendered world from this change.

**@⁠Raxstreams** on GitHub · 2026-11-24 02:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120169838) · edited 2026-11-24 02:30 UTC Tested the PR head at `727e884` on an RTX 3080 Ti. I replayed 96 distinct compute shaders from a run where every shader passed DXIL validation and every D3D12 compute pipeline creation failed. On this PR alone, 18 of the 96 passed both checks, including all three depth-pyramid shaders (8×8 groups). The driver created another seven pipelines whose DXIL failed validation. With this PR's lowering on our existing integration branch, 25/96 passed both checks, including all three depth shaders. I also launched the local integration build. It reached the intro location card, then presented a black frame with 1,872 draws and exited with DXGI_ERROR_DEVICE_HUNG. The slow-submission trace included two of the depth-pyramid pipelines. That trace covers many pipelines per submission and does not identify the command responsible for the hang. I have not seen a rendered world from this change.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 02:30 UTC · original

Thanks, this is the first result from real programs. The seven pipelines the driver created from modules that fail validation are the part I most want to fix: D3D12 checks only the container hash we write, so a driver taking them proves nothing.

I could not reproduce it with what I have. Every hand-assembled program in split_tests.rs (both forms: in halves, and the console flow with exchanges, branches and loops) passes dxil.dll's validator here, and as of fabe8bc on #320 the tests check that before creating the pipeline. So the seven hit something those programs do not. Could you post, for those seven:

  • the validator's message (the first one per shader is enough), and
  • whether the shader's group is at most 64 threads and whether it reads a mask whole or another lane (if your replay prints the reason or the form; otherwise the message alone will do).

Messages and counts only, please, no shader contents.

Two more things that would help decide what to do next, if they are cheap for you:

  • For the 71 that still fail on this PR alone, the reasons and their counts. victory translate --host-lanes 32-32 <paths> lists them as emit: <reason>. I expect groups of more than 64 threads that need an exchange, LDS, and whole-wave sections, which this PR still refuses (#189 covers some of those), but I have no numbers.
  • The same replay on #320's head (fabe8bc). It adds one fix that matters for real code: the loop form compilers emit (an exit mask that starts as 0) stopped the console flow with a lane-mask join of an untracked mask, so some of the 71 may be that.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 02:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120217585) Thanks, this is the first result from real programs. The seven pipelines the driver created from modules that fail validation are the part I most want to fix: D3D12 checks only the container hash we write, so a driver taking them proves nothing. I could not reproduce it with what I have. Every hand-assembled program in `split_tests.rs` (both forms: in halves, and the console flow with exchanges, branches and loops) passes `dxil.dll`'s validator here, and as of `fabe8bc` on #320 the tests check that before creating the pipeline. So the seven hit something those programs do not. Could you post, for those seven: - the validator's message (the first one per shader is enough), and - whether the shader's group is at most 64 threads and whether it reads a mask whole or another lane (if your replay prints the reason or the form; otherwise the message alone will do). Messages and counts only, please, no shader contents. Two more things that would help decide what to do next, if they are cheap for you: - For the 71 that still fail on this PR alone, the reasons and their counts. `victory translate --host-lanes 32-32 <paths>` lists them as `emit: <reason>`. I expect groups of more than 64 threads that need an exchange, LDS, and whole-wave sections, which this PR still refuses (#189 covers some of those), but I have no numbers. - The same replay on #320's head (`fabe8bc`). It adds one fix that matters for real code: the loop form compilers emit (an exit mask that starts as 0) stopped the console flow with `a lane-mask join of an untracked mask`, so some of the 71 may be that. No game data used on my side. AI-assisted.
Author
Owner

@⁠SlopComp on GitHub · 2026-11-24 02:44 UTC · original

Tested on a real dump, which the description says wasn't available. Two NVIDIA GPUs (RTX 5080 and RTX 3080, both D3D12 wave lanes 32..32); run on the 3080.

victory translate --validate --pipelines --list over the whole title, main (d2a4bae) vs this PR (727e884):

main #233
Compute programs emitted 1,693 of 2,581 1,470 of 2,581
Compute pipelines created 1,372 1,470
Compute pipelines refused by the driver 321 (all E_INVALIDARG, WaveSize(64)) 0
Vertex/pixel pipelines 12,284 12,284
Mesh pipelines 8,191 8,191

Of the 321 programs main emits with WaveSize(64):

  • 98 now translate and create pipelines on 32-lane hosts.
  • The other 223 now stop at translation instead of at pipeline creation, mostly with the two new reasons: console wave64 lanes on a host without 64-lane waves (162 compute programs overall) and a wave64 group sharing LDS without barriers on a host without 64-lane waves (120). That matches the "not covered yet" list (LDS in split programs, groups over 64 threads).

No program that creates a pipeline on main fails on this branch (per-program comparison: 98 gained, 0 lost). Vertex, pixel and mesh results are identical.

Tests on the RTX 3080 (VICTORY_ADAPTER="RTX 3080"):

  • cargo test --release -p victory-shader split: 9 passed, 0 failed.
  • cargo test --release --workspace: 277 passed, 0 failed, 4 ignored (same totals as in the description).

Not checked: whether the 98 newly created pipelines compute the right results in the title (no 64-lane reference adapter here, and the world isn't run).

**@⁠SlopComp** on GitHub · 2026-11-24 02:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120440868) Tested on a real dump, which the description says wasn't available. Two NVIDIA GPUs (RTX 5080 and RTX 3080, both D3D12 wave lanes 32..32); run on the 3080. **`victory translate --validate --pipelines --list` over the whole title, main (d2a4bae) vs this PR (727e884):** | | main | #233 | |---|---|---| | Compute programs emitted | 1,693 of 2,581 | 1,470 of 2,581 | | Compute pipelines created | 1,372 | **1,470** | | Compute pipelines refused by the driver | 321 (all E_INVALIDARG, `WaveSize(64)`) | **0** | | Vertex/pixel pipelines | 12,284 | 12,284 | | Mesh pipelines | 8,191 | 8,191 | Of the 321 programs main emits with `WaveSize(64)`: - **98** now translate and create pipelines on 32-lane hosts. - The other 223 now stop at translation instead of at pipeline creation, mostly with the two new reasons: `console wave64 lanes on a host without 64-lane waves` (162 compute programs overall) and `a wave64 group sharing LDS without barriers on a host without 64-lane waves` (120). That matches the "not covered yet" list (LDS in split programs, groups over 64 threads). No program that creates a pipeline on main fails on this branch (per-program comparison: 98 gained, 0 lost). Vertex, pixel and mesh results are identical. **Tests on the RTX 3080 (`VICTORY_ADAPTER="RTX 3080"`):** - `cargo test --release -p victory-shader split`: 9 passed, 0 failed. - `cargo test --release --workspace`: 277 passed, 0 failed, 4 ignored (same totals as in the description). Not checked: whether the 98 newly created pipelines compute the right results in the title (no 64-lane reference adapter here, and the world isn't run).
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 02:56 UTC · original

Thank you, this is the measurement the description could not give, and it orders what is left.

What I will do with it. The 120 programs that stop with a wave64 group sharing LDS without barriers are all groups of one console wave (that is what the reason means), so the console flow can take them: both halves reach every LDS access together, and a group barrier before each access gives the console's instruction order. I am working on that as a follow-up on top of #320 and will post here when it is up. In the same change the other reason gets split (group of more than 64 threads / LDS / ds_(b)permute / whole-wave section), so a rerun shows what stops the 162 without anyone having to look into the programs.

Three questions, counts and messages only, no shader contents:

  1. Did --validate reject any of the 1,470 emitted compute modules, in particular any of the 98 gained? On another card seven pipelines were created from modules that fail validation, and I cannot reproduce that with hand-assembled programs (all of mine validate). The validator's first message per failing shader would be enough.
  2. The head moved since your run: 3098672 stops splitting programs that have a v_readfirstlane (in the upper half it read lane 32 where the console reads the wave's first lane; found with a hand-assembled case). Those programs now take the console flow if their group is at most 64 threads without LDS, and stop otherwise, so the 98 will shift. The same comparison on 3098672, or on #320's head a5ba4a4 (which also takes the loop form compilers emit in the console flow), would show by how much.
  3. If you get to run the title on it: whether anything visible changes with the refused pipelines gone. A run on #320 found the device removal of #71 unchanged, which I would expect, since nothing here touches it.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 02:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120624639) Thank you, this is the measurement the description could not give, and it orders what is left. **What I will do with it.** The 120 programs that stop with `a wave64 group sharing LDS without barriers` are all groups of one console wave (that is what the reason means), so the console flow can take them: both halves reach every LDS access together, and a group barrier before each access gives the console's instruction order. I am working on that as a follow-up on top of #320 and will post here when it is up. In the same change the other reason gets split (group of more than 64 threads / LDS / `ds_(b)permute` / whole-wave section), so a rerun shows what stops the 162 without anyone having to look into the programs. **Three questions**, counts and messages only, no shader contents: 1. Did `--validate` reject any of the 1,470 emitted compute modules, in particular any of the 98 gained? On another card [seven pipelines were created from modules that fail validation](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), and I cannot reproduce that with hand-assembled programs (all of mine validate). The validator's first message per failing shader would be enough. 2. The head moved since your run: `3098672` stops splitting programs that have a `v_readfirstlane` (in the upper half it read lane 32 where the console reads the wave's first lane; found with a hand-assembled case). Those programs now take the console flow if their group is at most 64 threads without LDS, and stop otherwise, so the 98 will shift. The same comparison on `3098672`, or on #320's head `a5ba4a4` (which also takes the loop form compilers emit in the console flow), would show by how much. 3. If you get to run the title on it: whether anything visible changes with the refused pipelines gone. [A run on #320](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320) found the device removal of #71 unchanged, which I would expect, since nothing here touches it. No game data used on my side. AI-assisted.
Author
Owner

@⁠MisaXz on GitHub · 2026-11-24 02:11 UTC · original · edited 2026-11-24 03:16 UTC

Test report from a second Blackwell card.

Tested

  • NVIDIA GeForce RTX 5080, driver 621.14 (32-lane waves only); Ryzen 7 9800X3D; Windows 11 Pro 26300; Rust 1.98.1; debug
  • This PR at 727e884 (base d2a4bae): cargo test --workspace --no-fail-fast: 277 passed, 0 failed, 4 ignored. The same counts as in the description. main d2a4bae here: 264 / 0 / 4.

With #269 (scalars in divergent loops), local only

  • The two merge without a textual conflict but do not compile: error[E0063]: missing fields console_cf and target in initializer of Parts<'_> in #269's build_lanes_cs.
  • With that helper changed to translate through emit_for(&native, host.target()) (32..32 here), two of #269's programs still give each half's own count (a scalar incremented in a divergent loop reads 32 on lanes 0-31 and 64 on lanes 32-63, where #269 expects 64 on all), and one stops with Unsupported { what: "a lane-mask join of an untracked mask" }. They read no other lane, so they are split in halves and not run in the console flow. Details in my comment on #269.

Not tested

  • VICTORY_ADAPTER, release build, the title itself (no game files used).
  • Correction (edited): I first wrote that the AMD iGPU in this machine was not used. These tests dispatch on every hardware adapter, so it most likely was; I only captured the per-adapter output on #320 5cc9a7e, where both adapters print exact.

Re-run on the new head 3098672 (same machine, both adapters): cargo test --workspace --no-fail-fast: 278 passed, 0 failed, 4 ignored. cargo test -p victory-shader --lib -- split_tests lane_read_loop --nocapture --test-threads=1: 9 passed, every case prints exact on the RTX 5080 (split) and on the AMD Radeon(TM) Graphics iGPU (native).

AI use

  • Claude Code (Claude Fable 5.2) ran the tests and wrote this report from their output.
**@⁠MisaXz** on GitHub · 2026-11-24 02:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7119856284) · edited 2026-11-24 03:16 UTC Test report from a second Blackwell card. **Tested** - NVIDIA GeForce RTX 5080, driver 621.14 (32-lane waves only); Ryzen 7 9800X3D; Windows 11 Pro 26300; Rust 1.98.1; debug - This PR at `727e884` (base `d2a4bae`): `cargo test --workspace --no-fail-fast`: 277 passed, 0 failed, 4 ignored. The same counts as in the description. `main` `d2a4bae` here: 264 / 0 / 4. **With #269 (scalars in divergent loops), local only** - The two merge without a textual conflict but do not compile: `error[E0063]: missing fields console_cf and target in initializer of Parts<'_>` in #269's `build_lanes_cs`. - With that helper changed to translate through `emit_for(&native, host.target())` (32..32 here), two of #269's programs still give each half's own count (a scalar incremented in a divergent loop reads 32 on lanes 0-31 and 64 on lanes 32-63, where #269 expects 64 on all), and one stops with `Unsupported { what: "a lane-mask join of an untracked mask" }`. They read no other lane, so they are split in halves and not run in the console flow. Details in [my comment on #269](https://git.gtahub.st/github/Marvisak--VIctory/pulls/269). **Not tested** - `VICTORY_ADAPTER`, release build, the title itself (no game files used). - Correction (edited): I first wrote that the AMD iGPU in this machine was not used. These tests dispatch on every hardware adapter, so it most likely was; I only captured the per-adapter output on #320 `5cc9a7e`, where both adapters print `exact`. **Re-run on the new head `3098672`** (same machine, both adapters): `cargo test --workspace --no-fail-fast`: 278 passed, 0 failed, 4 ignored. `cargo test -p victory-shader --lib -- split_tests lane_read_loop --nocapture --test-threads=1`: 9 passed, every case prints `exact` on the RTX 5080 (split) and on the AMD Radeon(TM) Graphics iGPU (native). **AI use** - Claude Code (Claude Fable 5.2) ran the tests and wrote this report from their output.
Author
Owner

@⁠SlopComp on GitHub · 2026-11-24 03:16 UTC · original

Same setup (real dump, RTX 3080, 32..32), translate --validate --pipelines --list, compared per program against main d2a4bae.

1. Validation of the emitted compute modules

Yes. On 727e884, 22 of the 1,470 compute modules fail --validate and still create a pipeline. 5 of those are in the 98 gained. All 22 already failed validation on main (main has 23 such, 17 of which create a pipeline there too), so the PR doesn't add any. Every one has the same first (and only) message:

Function: main: error: Entry function performs some operation that is incompatible with the shader stage or other entry properties. See other errors for details.

2. Newer heads

Head Compute pipelines vs main vs 727e884 Created but fail --validate of those, new vs main
727e884 1,470 +98 / −0 — 22 0
3098672 1,470 +98 / −0 +0 / −0 22 0
a5ba4a4 (#320) 1,491 +119 / −0 +21 / −0 42 20
  • 3098672: same 98 programs, no shift. A handful of programs change which stop reason they report first; the set that creates pipelines is identical.
  • a5ba4a4: 21 more pipelines, but 20 of those 21 fail validation, all with the same message as above. Stop reasons that changed vs 727e884: a lane-mask join of an untracked mask 21 → 0, a descriptor chosen by control flow 1 → 0, a descriptor's address or format read as data 20 → 19, new an SCC the emitter did not compute 0 → 2.

So on this NVIDIA driver, modules that fail validation are accepted at pipeline creation (on main as well), and #320's head adds 20 of them.

3. Not run in the title yet.

No game data shared beyond counts and validator messages.

**@⁠SlopComp** on GitHub · 2026-11-24 03:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120941410) Same setup (real dump, RTX 3080, 32..32), `translate --validate --pipelines --list`, compared per program against main `d2a4bae`. **1. Validation of the emitted compute modules** Yes. On `727e884`, 22 of the 1,470 compute modules fail `--validate` and still create a pipeline. 5 of those are in the 98 gained. All 22 already failed validation on main (main has 23 such, 17 of which create a pipeline there too), so the PR doesn't add any. Every one has the same first (and only) message: > Function: main: error: Entry function performs some operation that is incompatible with the shader stage or other entry properties. See other errors for details. **2. Newer heads** | Head | Compute pipelines | vs main | vs `727e884` | Created but fail `--validate` | of those, new vs main | |---|---|---|---|---|---| | `727e884` | 1,470 | +98 / −0 | — | 22 | 0 | | `3098672` | 1,470 | +98 / −0 | +0 / −0 | 22 | 0 | | `a5ba4a4` (#320) | 1,491 | +119 / −0 | +21 / −0 | 42 | **20** | - `3098672`: same 98 programs, no shift. A handful of programs change which stop reason they report first; the set that creates pipelines is identical. - `a5ba4a4`: 21 more pipelines, but **20 of those 21 fail validation**, all with the same message as above. Stop reasons that changed vs `727e884`: `a lane-mask join of an untracked mask` 21 → 0, `a descriptor chosen by control flow` 1 → 0, `a descriptor's address or format read as data` 20 → 19, new `an SCC the emitter did not compute` 0 → 2. So on this NVIDIA driver, modules that fail validation are accepted at pipeline creation (on main as well), and #320's head adds 20 of them. **3.** Not run in the title yet. No game data shared beyond counts and validator messages.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 03:25 UTC · original

The follow-up I mentioned is up as #439 (head 88cb024, on top of #320): programs of one console wave per group that share LDS now take the console flow on 32-lane hosts, with a group barrier before each LDS access, and what still stops says why (a group of more than 64 threads, ds_permute across the halves, a whole-wave section).

If you rerun, the numbers that would tell the most are the count per reason on 88cb024 and, for the whole-title run, whether the validator accepts every emitted compute module. I could only check hand-assembled programs: they validate and are exact on an RTX 5070 and a Radeon iGPU, and I say in the PR that the LDS tests there do not prove the barrier is needed.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 03:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121072977) The follow-up I mentioned is up as #439 (head `88cb024`, on top of #320): programs of one console wave per group that share LDS now take the console flow on 32-lane hosts, with a group barrier before each LDS access, and what still stops says why (`a group of more than 64 threads`, `ds_permute across the halves`, `a whole-wave section`). If you rerun, the numbers that would tell the most are the count per reason on `88cb024` and, for the whole-title run, whether the validator accepts every emitted compute module. I could only check hand-assembled programs: they validate and are exact on an RTX 5070 and a Radeon iGPU, and I say in the PR that the LDS tests there do not prove the barrier is needed. No game data used on my side. AI-assisted.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 03:34 UTC · original

Thank you. That answers all three, and the second table is a real finding against #320: its head adds 20 modules that fail validation and still create a pipeline. They are the programs the exit-mask fix (4c197a0) let into the console flow, so the console flow emits something for them that the per-lane form on main does not.

What I could and could not find. The message is the one the validator gives when the entry function itself calls an operation the stage or the entry's properties do not allow; with the call in the entry there is no second message naming it, which matches what you saw. I could not reproduce it:

  • every hand-assembled console-flow program I have validates here (dxil.dll from the 10.0.26100 SDK), now including the same programs in groups of 64x1x1, 8x8x1, 4x4x4, 16x4x1, 32x2x1, 1x64x1, 2x2x16, 8x4x1, 6x6x1 and 48x1x1, so it is not the group's shape;
  • none of the stage-limited operations the translator can emit (discard, quadReadLaneAt, mesh output) is reachable for a compute program;
  • texture sampling is lowered the same way with and without the console flow's guards.

So it is something real programs do that mine do not, and I would rather measure than keep guessing.

A diagnostic to settle it. 9745f35 (the head of #439, which contains #320) makes translate --validate add to each validator failure what our own module declares and calls: thread-group size, wave size and its dx.op operations. For example:

validator: Function: main: error: Entry function performs ... [threads 8x8x1, wave size 32; ops: annotateHandle, barrier, cbufferLoadLegacy, createHandleFromHeap, flattenedThreadIdInGroup, rawBufferStore, waveGetLaneIndex, waveReadLaneAt, waveReadLaneFirst]

Nothing of the console program is in that line. If you can rerun translate --validate on 9745f35, the validator reasons with their counts (they are in the summary without --list) would show what the refused modules have in common, on main's 22 as well as the new 20.

Until then I have marked #320 and #439 as drafts and put this at the top of both descriptions. #233 itself adds no such module by your first table, so I have left it as it is.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 03:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121220358) Thank you. That answers all three, and the second table is a real finding against #320: its head adds 20 modules that fail validation and still create a pipeline. They are the programs the exit-mask fix (`4c197a0`) let into the console flow, so the console flow emits something for them that the per-lane form on `main` does not. **What I could and could not find.** The message is the one the validator gives when the entry function itself calls an operation the stage or the entry's properties do not allow; with the call in the entry there is no second message naming it, which matches what you saw. I could not reproduce it: - every hand-assembled console-flow program I have validates here (`dxil.dll` from the 10.0.26100 SDK), now including the same programs in groups of 64x1x1, 8x8x1, 4x4x4, 16x4x1, 32x2x1, 1x64x1, 2x2x16, 8x4x1, 6x6x1 and 48x1x1, so it is not the group's shape; - none of the stage-limited operations the translator can emit (`discard`, `quadReadLaneAt`, mesh output) is reachable for a compute program; - texture sampling is lowered the same way with and without the console flow's guards. So it is something real programs do that mine do not, and I would rather measure than keep guessing. **A diagnostic to settle it.** `9745f35` (the head of #439, which contains #320) makes `translate --validate` add to each validator failure what our own module declares and calls: thread-group size, wave size and its `dx.op` operations. For example: ``` validator: Function: main: error: Entry function performs ... [threads 8x8x1, wave size 32; ops: annotateHandle, barrier, cbufferLoadLegacy, createHandleFromHeap, flattenedThreadIdInGroup, rawBufferStore, waveGetLaneIndex, waveReadLaneAt, waveReadLaneFirst] ``` Nothing of the console program is in that line. If you can rerun `translate --validate` on `9745f35`, the validator reasons with their counts (they are in the summary without `--list`) would show what the refused modules have in common, on `main`'s 22 as well as the new 20. **Until then** I have marked #320 and #439 as drafts and put this at the top of both descriptions. #233 itself adds no such module by your first table, so I have left it as it is. No game data used on my side. AI-assisted.
Author
Owner

@⁠justlovett0 on GitHub · 2026-11-24 03:35 UTC · original

Tested on a real title (the #348 machine): the split works – compute refusals drop from 103 to 1 – but world entry then fails in a new way: a crash inside NVIDIA's shader compiler while creating the large split pipelines, an E_OUTOFMEMORY pipeline refusal, and a hang on a mesh-heavy submission.

Setup: Windows 10 21H2 19044.7846, RTX 3080 10 GB (driver 32.0.15.9649), Ryzen 9 7900X, 32 GB RAM (commit limit ~43 GB, ~21 GB free after the run). This PR's head 3098672 (includes #223) merged locally with #175 (Agility SDK 1.620.2, required on this Win10 box) + #346 + #334. Release build, GTA VI v1.0.2.1 (b99f876b74d4a77f), no input; auto-plays to the opening cutscene.

What improved

without this PR (#175+#346+#334) with it
host pipeline refused 103, all compute (WaveSize(64) on the 32-lane host) 1 – and that one is E_OUTOFMEMORY, not wave size
dispatches run by frame 2048 1,024 1,343
draws run by frame 2048 9,638 11,323 (all of them)

The new failure (frame ~2194, first world frames): a burst of large split compute pipelines binds – DXIL sizes 66,596 / 57,268 / 65,916 / 65,044 B (hashes 6a20509b65f9a5f1, b084beb3ae6e27e3, 2c2cefe06f048390, a0a074e2d868e618) – then:

VIctory: first-chance exception 0xc0000005 at nvgpucomp64.dll+0x2806b21 (read 0x8)
  #0..#13 nvgpucomp64.dll  #14 nvwgf2umx.dll+0x7ec91f
WARN host pipeline refused error=Not enough memory resources… (0x8007000E) shaders=[compute c4183d3cbee28e8e]
…
WARN slow host submission ms=3291 lists=7 pipelines={compute 9146291b38ea9ce1, compute ec982aaadc623a49, mesh 0384efa1b7bcd540/1d96551fdd673db7, mesh 09c742c58e9acb62/9ee9a1b0ecdf7b74, …}
ERROR host GPU device removed after a submission of 7 lists … (0x887A0006)

So the driver's compiler faults on (at least) one of the big split programs, one compute pipeline is refused for memory, and the run ends in a TDR on a 3.3 s mesh-heavy submission – the shape #71 describes. The remaining refusal is c4183d3cbee28e8e (E_OUTOFMEMORY); whether that is VRAM, commit, or a driver-internal limit is not established here.

Possible next steps I can test on this machine if useful: VICTORY_SKIP_PIPELINES for the suspect hashes, a lower DXC optimisation level for the large split programs (XCL uses -O1 for ~1 MB HLSL after driver E_OUTOFMEMORY on big DXIL, ivall/xcl#156), or a diag run with VICTORY_D3D12_DEBUG=1 + DRED to name the faulting command.

Full log kept locally (pr233-run.log, 5,568 lines).

AI use: Qwen Code (underlying model name not disclosed by the tool) built the merged stack, ran the title, extracted the excerpts and drafted this comment at the user's request.

**@⁠justlovett0** on GitHub · 2026-11-24 03:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121243100) Tested on a real title (the #348 machine): **the split works – compute refusals drop from 103 to 1** – but world entry then fails in a new way: a crash inside NVIDIA's shader compiler while creating the large split pipelines, an `E_OUTOFMEMORY` pipeline refusal, and a hang on a mesh-heavy submission. **Setup:** Windows 10 21H2 19044.7846, RTX 3080 10 GB (driver 32.0.15.9649), Ryzen 9 7900X, 32 GB RAM (commit limit ~43 GB, ~21 GB free after the run). This PR's head `3098672` (includes #223) merged locally with #175 (Agility SDK 1.620.2, required on this Win10 box) + #346 + #334. Release build, GTA VI v1.0.2.1 (`b99f876b74d4a77f`), no input; auto-plays to the opening cutscene. **What improved** | | without this PR (#175+#346+#334) | with it | |---|---|---| | `host pipeline refused` | 103, all compute (`WaveSize(64)` on the 32-lane host) | **1** – and that one is `E_OUTOFMEMORY`, not wave size | | dispatches run by frame 2048 | 1,024 | 1,343 | | draws run by frame 2048 | 9,638 | 11,323 (all of them) | **The new failure** (frame ~2194, first world frames): a burst of large split compute pipelines binds – DXIL sizes 66,596 / 57,268 / 65,916 / 65,044 B (hashes `6a20509b65f9a5f1`, `b084beb3ae6e27e3`, `2c2cefe06f048390`, `a0a074e2d868e618`) – then: ``` VIctory: first-chance exception 0xc0000005 at nvgpucomp64.dll+0x2806b21 (read 0x8) #0..#13 nvgpucomp64.dll #14 nvwgf2umx.dll+0x7ec91f WARN host pipeline refused error=Not enough memory resources… (0x8007000E) shaders=[compute c4183d3cbee28e8e] … WARN slow host submission ms=3291 lists=7 pipelines={compute 9146291b38ea9ce1, compute ec982aaadc623a49, mesh 0384efa1b7bcd540/1d96551fdd673db7, mesh 09c742c58e9acb62/9ee9a1b0ecdf7b74, …} ERROR host GPU device removed after a submission of 7 lists … (0x887A0006) ``` So the driver's compiler faults on (at least) one of the big split programs, one compute pipeline is refused for memory, and the run ends in a TDR on a 3.3 s mesh-heavy submission – the shape #71 describes. The remaining refusal is `c4183d3cbee28e8e` (`E_OUTOFMEMORY`); whether that is VRAM, commit, or a driver-internal limit is not established here. Possible next steps I can test on this machine if useful: `VICTORY_SKIP_PIPELINES` for the suspect hashes, a lower DXC optimisation level for the large split programs (XCL uses `-O1` for ~1 MB HLSL after driver `E_OUTOFMEMORY` on big DXIL, ivall/xcl#156), or a diag run with `VICTORY_D3D12_DEBUG=1` + DRED to name the faulting command. Full log kept locally (`pr233-run.log`, 5,568 lines). AI use: Qwen Code (underlying model name not disclosed by the tool) built the merged stack, ran the title, extracted the excerpts and drafted this comment at the user's request.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 03:37 UTC · original

Thank you. This is the first run where the newly accepted pipelines visibly go wrong in the driver, so it matters more than the improved counts.

What I think is going on, and what is only a guess. Before this PR the driver rejected these programs up front for WaveSize(64), so its compiler never saw them. Now it does, and anything wrong with those modules shows for the first time. There is one concrete suspect: a whole-title translate --validate run found that 5 of the 98 compute pipelines this PR gains are created from modules that fail dxil.dll validation (Entry function performs some operation that is incompatible with the shader stage or other entry properties). main already emits 22 such modules, and D3D12 does not validate what we sign ourselves. A module the validator refuses is a plausible cause of a fault inside the driver's compiler, but I have not shown that these are the ones that fault for you. I cannot reproduce the validation failure with hand-assembled programs, so its cause is still open; #439's head (9745f35) adds a diagnostic to find it.

Two checks that would tell, if you have the time:

  1. Whether the hashes around the fault (6a20509b65f9a5f1, b084beb3ae6e27e3, 2c2cefe06f048390, a0a074e2d868e618, and the refused c4183d3cbee28e8e) are among the modules that fail translate --validate. On 9745f35 each validator failure also prints what our module declares and calls (thread-group size, wave size, dx.op operations; nothing of the console program), which is what I need to find the cause.
  2. Your VICTORY_SKIP_PIPELINES idea for those hashes: if the compiler fault and the E_OUTOFMEMORY go away and the run still ends in the mesh-heavy TDR, the hang is #71's and separate from this PR.

One question on the baseline: without this PR, does the same run on that machine also end in a device removal at world entry, or does it get past frame ~2194? Two other title runs (RTX 5070 Ti, RTX 5080, both Windows 11) end in the same device removal with and without this stack, so I do not know yet whether what you see is a regression on your driver or the same hang reached with more work in flight.

On the optimisation level: VIctory writes DXIL itself, there is no DXC step to turn down. The split programs are larger because every vector instruction carries its EXEC guard; if size turns out to matter to this driver, that is where I would look.

I have added this report to the top of the description so nobody merges without seeing it.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 03:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121267887) Thank you. This is the first run where the newly accepted pipelines visibly go wrong in the driver, so it matters more than the improved counts. **What I think is going on, and what is only a guess.** Before this PR the driver rejected these programs up front for `WaveSize(64)`, so its compiler never saw them. Now it does, and anything wrong with those modules shows for the first time. There is one concrete suspect: a [whole-title `translate --validate` run](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233) found that 5 of the 98 compute pipelines this PR gains are created from modules that fail `dxil.dll` validation (`Entry function performs some operation that is incompatible with the shader stage or other entry properties`). `main` already emits 22 such modules, and D3D12 does not validate what we sign ourselves. A module the validator refuses is a plausible cause of a fault inside the driver's compiler, but I have not shown that these are the ones that fault for you. I cannot reproduce the validation failure with hand-assembled programs, so its cause is still open; #439's head (`9745f35`) adds a diagnostic to find it. **Two checks that would tell**, if you have the time: 1. Whether the hashes around the fault (`6a20509b65f9a5f1`, `b084beb3ae6e27e3`, `2c2cefe06f048390`, `a0a074e2d868e618`, and the refused `c4183d3cbee28e8e`) are among the modules that fail `translate --validate`. On `9745f35` each validator failure also prints what our module declares and calls (thread-group size, wave size, `dx.op` operations; nothing of the console program), which is what I need to find the cause. 2. Your `VICTORY_SKIP_PIPELINES` idea for those hashes: if the compiler fault and the `E_OUTOFMEMORY` go away and the run still ends in the mesh-heavy TDR, the hang is #71's and separate from this PR. One question on the baseline: without this PR, does the same run on that machine also end in a device removal at world entry, or does it get past frame ~2194? Two other title runs ([RTX 5070 Ti](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320), [RTX 5080](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320), both Windows 11) end in the same device removal with and without this stack, so I do not know yet whether what you see is a regression on your driver or the same hang reached with more work in flight. On the optimisation level: VIctory writes DXIL itself, there is no DXC step to turn down. The split programs are larger because every vector instruction carries its EXEC guard; if size turns out to matter to this driver, that is where I would look. I have added this report to the top of the description so nobody merges without seeing it. No game data used on my side. AI-assisted.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 03:40 UTC · original

Four follow-ups on the compiler fault report, which would separate "our module is wrong" from "this driver's compiler", mostly without rerunning the title.

For @⁠justlovett0:

  1. Was c4183d3cbee28e8e among the 103 pipelines refused in the baseline run? If it was, no pipeline that worked before is lost: the driver catches its own first-chance exception and refuses that pipeline, and what is left is the device removal.
  2. victory translate --validate --pipelines --list <paths> on that machine creates every compute pipeline offline, without the world. It would name exactly which programs fault or are refused on that driver, and whether they validate.
  3. Your driver is 32.0.15.9649 on Windows 10 with the Agility SDK from #175. The other runs of this PR created every compute pipeline with none refused on newer drivers (an RTX 5070 Ti and an RTX 5080 on 621.24, and the whole-title run below on an RTX 3080). If a current driver is an option on that machine, the same run there would tell a lot.

For @⁠SlopComp:

  1. Which driver was your RTX 3080 on for the whole-title run (1,470 compute pipelines created, 0 refused)? And could you post the hashes of the 5 gained pipelines whose modules fail validation? Compared with the five hashes in the report above, that settles whether the faulting programs are the invalid ones.

Hashes, counts and messages only, please.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 03:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121315835) Four follow-ups on [the compiler fault report](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), which would separate "our module is wrong" from "this driver's compiler", mostly without rerunning the title. For @⁠justlovett0: 1. Was `c4183d3cbee28e8e` among the 103 pipelines refused in the baseline run? If it was, no pipeline that worked before is lost: the driver catches its own first-chance exception and refuses that pipeline, and what is left is the device removal. 2. `victory translate --validate --pipelines --list <paths>` on that machine creates every compute pipeline offline, without the world. It would name exactly which programs fault or are refused on that driver, and whether they validate. 3. Your driver is 32.0.15.9649 on Windows 10 with the Agility SDK from #175. The other runs of this PR created every compute pipeline with none refused on newer drivers (an RTX 5070 Ti and an RTX 5080 on 621.24, and the whole-title run below on an RTX 3080). If a current driver is an option on that machine, the same run there would tell a lot. For @⁠SlopComp: 4. Which driver was your RTX 3080 on for the [whole-title run](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233) (1,470 compute pipelines created, 0 refused)? And could you post the hashes of the 5 gained pipelines whose modules fail validation? Compared with the five hashes in the report above, that settles whether the faulting programs are the invalid ones. Hashes, counts and messages only, please. No game data used on my side. AI-assisted.
Author
Owner

@⁠SlopComp on GitHub · 2026-11-24 04:01 UTC · original

  1. Driver 616.92 (RTX 3080). Run was on 727e884.

The 5 gained pipelines whose modules fail validation:

3e55d5ea47dbcfb1
58eaf4a171102e0a
c4183d3cbee28e8e
cabb87599722e59a
e8f6ae0597846841

Against the report's five: c4183d3cbee28e8e (the refused one) is in this list. The other four (6a20509b65f9a5f1, b084beb3ae6e27e3, 2c2cefe06f048390, a0a074e2d868e618) aren't emitted at all on 727e884 alone: three stop at a select on an untracked mask, one at a descriptor read only as data.

**@⁠SlopComp** on GitHub · 2026-11-24 04:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121637313) 4. Driver 616.92 (RTX 3080). Run was on `727e884`. The 5 gained pipelines whose modules fail validation: ``` 3e55d5ea47dbcfb1 58eaf4a171102e0a c4183d3cbee28e8e cabb87599722e59a e8f6ae0597846841 ``` Against the report's five: `c4183d3cbee28e8e` (the refused one) is in this list. The other four (`6a20509b65f9a5f1`, `b084beb3ae6e27e3`, `2c2cefe06f048390`, `a0a074e2d868e618`) aren't emitted at all on `727e884` alone: three stop at `a select on an untracked mask`, one at `a descriptor read only as data`.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 04:02 UTC · original

Thank you, that comparison settles more than I expected.

What it establishes. c4183d3cbee28e8e is in both lists: the one compute pipeline the Windows 10 machine refuses (E_OUTOFMEMORY, driver 32.0.15.9649) is created from a module that dxil.dll refuses too. Your RTX 3080 on 616.92 takes the same module without complaint, as the 621.x runs do.

What it rules out. The other four hashes in that report do not translate on this PR, and the PRs merged with it there (#175, #346, #334) are GPU-side and lower no shaders. So those four produced no host pipeline in that run. The first bind lines they come from are logged when the title binds a pipeline, whether or not its shaders translate, and the size on them is the console container's, not an emitted module's. They are not "large split pipelines".

The reading I think follows, with its gap. In that log the first-chance exception in nvgpucomp64.dll is immediately followed by the refusal of c4183d3cbee28e8e. The simplest account is that the old driver's compiler faults on the invalid module, catches its own exception and refuses the pipeline. That is not proven (the exception is not tied to a pipeline in the log), but no other newly created pipeline is left to blame. If so, this PR loses nothing on that machine: before it, the same program was refused for WaveSize(64); and the device removal afterwards is the mesh-heavy hang the other runs see with and without this stack. @⁠justlovett0, was c4183d3cbee28e8e among the 103 refused in your baseline? That would close it.

What is left to fix is the module itself. main emits 22 that fail validation with this message, and this PR lets 5 of them reach the driver for the first time. @⁠SlopComp, the most useful thing now would be the validator line for those five on #439's head 9745f35: it carries the thread-group size, wave size and dx.op operations of our module (nothing of the console program), which should show what they have in common.

I have updated the note at the top of the description.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 04:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121657931) Thank you, that comparison settles more than I expected. **What it establishes.** `c4183d3cbee28e8e` is in both lists: the one compute pipeline the Windows 10 machine refuses (`E_OUTOFMEMORY`, driver 32.0.15.9649) is created from a module that `dxil.dll` refuses too. Your RTX 3080 on 616.92 takes the same module without complaint, as the 621.x runs do. **What it rules out.** The other four hashes in [that report](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233) do not translate on this PR, and the PRs merged with it there (#175, #346, #334) are GPU-side and lower no shaders. So those four produced no host pipeline in that run. The `first bind` lines they come from are logged when the title binds a pipeline, whether or not its shaders translate, and the size on them is the console container's, not an emitted module's. They are not "large split pipelines". **The reading I think follows, with its gap.** In that log the first-chance exception in `nvgpucomp64.dll` is immediately followed by the refusal of `c4183d3cbee28e8e`. The simplest account is that the old driver's compiler faults on the invalid module, catches its own exception and refuses the pipeline. That is not proven (the exception is not tied to a pipeline in the log), but no other newly created pipeline is left to blame. If so, this PR loses nothing on that machine: before it, the same program was refused for `WaveSize(64)`; and the device removal afterwards is the mesh-heavy hang the other runs see with and without this stack. @⁠justlovett0, was `c4183d3cbee28e8e` among the 103 refused in your baseline? That would close it. **What is left to fix** is the module itself. `main` emits 22 that fail validation with this message, and this PR lets 5 of them reach the driver for the first time. @⁠SlopComp, the most useful thing now would be the validator line for those five on #439's head `9745f35`: it carries the thread-group size, wave size and `dx.op` operations of our module (nothing of the console program), which should show what they have in common. I have updated the note at the top of the description. No game data used on my side. AI-assisted.
Author
Owner

@⁠SlopComp on GitHub · 2026-11-24 04:07 UTC · original

On 9745f35, same RTX 3080 / 616.92. All five still create a pipeline and fail validation with the same message:

Hash Threads Wave size
3e55d5ea47dbcfb1 8x8x1 32
58eaf4a171102e0a 8x8x1 32
c4183d3cbee28e8e 64x1x1 32
cabb87599722e59a 64x1x1 32
e8f6ae0597846841 64x1x1 32

Ops common to all five: annotateHandle, barrier, binary, bufferLoad, cbufferLoadLegacy, createHandleFromBinding, createHandleFromHeap, flattenedThreadIdInGroup, getDimensions, groupId, rawBufferLoad, sample, tertiary, textureStore, unary, unaryBits, waveActiveBallot, waveGetLaneIndex, waveReadLaneAt, waveReadLaneFirst.

Across the whole title on this head, 43 compute modules fail validation, all with this message, and all 43 call sample. Groups: 32x1x1 ×22, 8x8x1 ×15, 64x1x1 ×3, 4x4x2 ×2, 128x1x1 ×1. Wave size: 32 ×30, any ×13.

**@⁠SlopComp** on GitHub · 2026-11-24 04:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121728480) On `9745f35`, same RTX 3080 / 616.92. All five still create a pipeline and fail validation with the same message: | Hash | Threads | Wave size | |---|---|---| | `3e55d5ea47dbcfb1` | 8x8x1 | 32 | | `58eaf4a171102e0a` | 8x8x1 | 32 | | `c4183d3cbee28e8e` | 64x1x1 | 32 | | `cabb87599722e59a` | 64x1x1 | 32 | | `e8f6ae0597846841` | 64x1x1 | 32 | Ops common to all five: `annotateHandle, barrier, binary, bufferLoad, cbufferLoadLegacy, createHandleFromBinding, createHandleFromHeap, flattenedThreadIdInGroup, getDimensions, groupId, rawBufferLoad, sample, tertiary, textureStore, unary, unaryBits, waveActiveBallot, waveGetLaneIndex, waveReadLaneAt, waveReadLaneFirst`. Across the whole title on this head, 43 compute modules fail validation, all with this message, and all 43 call `sample`. Groups: 32x1x1 ×22, 8x8x1 ×15, 64x1x1 ×3, 4x4x2 ×2, 128x1x1 ×1. Wave size: 32 ×30, any ×13.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 04:15 UTC · original

That table is what it took: "all 43 call sample" gave me something to reproduce, and it turns out to be neither the console flow nor the split.

Cause. A compute program's image_sample (implicit derivatives) is emitted as dx.op.sample. Our modules declare validator version 1.6 (dx.valver), and under 1.6 / 1.7 rules the validator does not allow that operation outside pixel shaders. #180 already says this, and replaces such samples with sampleGrad from quad gradients; #201 tracks the wider class of modules that fail validation. I had not connected them to this message.

Reproduced here with a hand-assembled compute program that loads a texture and a sampler and does one image_sample (dxil.dll 1.8.2502.11, Windows SDK 10.0.26100):

  • It fails with exactly your message in every group shape I tried (64x1x1, 32x1x1, 8x8x1, 4x4x2, 128x1x1, 4x1x1, 2x2x1, 8x8x4), with no declared wave size, with WaveSize(64) and with WaveSize(32), per-lane form included. The second line of the validator's text, which translate does not print, is Function uses features incompatible with the shader stage (cs) of the entry function.
  • With the module declaring validator version 1.8 instead (a local experiment, nothing I am proposing), that complaint is gone. Groups whose dimensions allow derivatives are then left with a packaging mismatch only (PSVRuntimeInfoSize: our PSV0 is the 48-byte layout, 1.8 expects 52), and the others get the real rule: derivatives require NumThreads to be 1D and a multiple of 4, or 2D/3D with X and Y both multiples of 2. Every group in your 43 passes that rule.

What this means for the PRs.

  • #233 and #320 do not emit anything new that is invalid. They let more programs translate, and those that sample this way fail validation as the 22 on main already do: 5 more with #233, 20 more with #320.
  • The Windows 10 report fits: c4183d3cbee28e8e, the pipeline that old driver refuses after its compiler's first-chance exception, is one of those.
  • The fix is #180's, not something in this stack. Until it lands, each of these modules reaches the driver unvalidated, as on main.

So I am taking #320 and #439 out of draft and rewriting the notes at the top of all three descriptions to say this. Thank you both, @⁠SlopComp and @⁠justlovett0: I could not have found it without the counts.

No game data used on my side. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-24 04:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7121852191) That table is what it took: "all 43 call `sample`" gave me something to reproduce, and it turns out to be neither the console flow nor the split. **Cause.** A compute program's `image_sample` (implicit derivatives) is emitted as `dx.op.sample`. Our modules declare validator version 1.6 (`dx.valver`), and under 1.6 / 1.7 rules the validator does not allow that operation outside pixel shaders. #180 already says this, and replaces such samples with `sampleGrad` from quad gradients; #201 tracks the wider class of modules that fail validation. I had not connected them to this message. **Reproduced here** with a hand-assembled compute program that loads a texture and a sampler and does one `image_sample` (`dxil.dll` 1.8.2502.11, Windows SDK 10.0.26100): - It fails with exactly your message in every group shape I tried (64x1x1, 32x1x1, 8x8x1, 4x4x2, 128x1x1, 4x1x1, 2x2x1, 8x8x4), with no declared wave size, with `WaveSize(64)` and with `WaveSize(32)`, per-lane form included. The second line of the validator's text, which `translate` does not print, is `Function uses features incompatible with the shader stage (cs) of the entry function.` - With the module declaring validator version 1.8 instead (a local experiment, nothing I am proposing), that complaint is gone. Groups whose dimensions allow derivatives are then left with a packaging mismatch only (`PSVRuntimeInfoSize`: our `PSV0` is the 48-byte layout, 1.8 expects 52), and the others get the real rule: `derivatives require NumThreads to be 1D and a multiple of 4, or 2D/3D with X and Y both multiples of 2`. Every group in your 43 passes that rule. **What this means for the PRs.** - #233 and #320 do not emit anything new that is invalid. They let more programs translate, and those that sample this way fail validation as the 22 on `main` already do: 5 more with #233, 20 more with #320. - The Windows 10 report fits: `c4183d3cbee28e8e`, the pipeline that old driver refuses after its compiler's first-chance exception, is one of those. - The fix is #180's, not something in this stack. Until it lands, each of these modules reaches the driver unvalidated, as on `main`. So I am taking #320 and #439 out of draft and rewriting the notes at the top of all three descriptions to say this. Thank you both, @⁠SlopComp and @⁠justlovett0: I could not have found it without the counts. No game data used on my side. AI-assisted.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 05:11 UTC · original

Tested 3098672 on main d2a4bae, native Windows 11, RTX 4070 SUPER (lanes 32..32), driver 621.24.

  • cargo test --workspace --locked: 278 passed, 0 failed, 4 ignored; no new warnings. emit::split_tests:: passes 9/9 on hardware, all split true, all exact.
  • #468 reproduced: the in-half program emitted for Target::ANY declares WaveSize(64), and CreateComputePipelineState returns "The parameter is incorrect." (E_INVALIDARG), which is what #468 reports for 114 compute pipelines. Emitted for the host target, it declares WaveSize(32), is created, and is exact. Test on QemmHD/VIctory repro/468-wave64-refusal (b6fd3a7).
  • Nit: the literal at host.rs:482 embeds a run of spaces, and "dispatches are dropped" now only holds for programs neither form handles.

No game data used.

AI-assisted (Claude Code, Claude Opus 5.5).
Discord: bigpeppa.

**@⁠QemmHD** on GitHub · 2026-11-24 05:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7122712064) Tested `3098672` on `main` `d2a4bae`, native Windows 11, RTX 4070 SUPER (lanes 32..32), driver 621.24. - `cargo test --workspace --locked`: 278 passed, 0 failed, 4 ignored; no new warnings. `emit::split_tests::` passes 9/9 on hardware, all `split true`, all exact. - #468 reproduced: the in-half program emitted for `Target::ANY` declares `WaveSize(64)`, and `CreateComputePipelineState` returns "The parameter is incorrect." (E_INVALIDARG), which is what #468 reports for 114 compute pipelines. Emitted for the host target, it declares `WaveSize(32)`, is created, and is exact. Test on [QemmHD/VIctory `repro/468-wave64-refusal`](https://github.com/QemmHD/VIctory/tree/repro/468-wave64-refusal) (`b6fd3a7`). - Nit: the literal at `host.rs:482` embeds a run of spaces, and "dispatches are dropped" now only holds for programs neither form handles. No game data used. AI-assisted (Claude Code, Claude Opus 5.5). Discord: bigpeppa.
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 05:12 UTC · original

A data point from an RTX 5090 (Windows 11, an integration build with this PR). It is not specific to this PR.

In the world, the device is removed as hung (a 2 s TDR timeout, no DRED page fault) at small dispatches (2 to 12 groups) of wave64 compute programs running on the 32-lane host. One of them is an 8x1x1 dispatch of a wave64 compute with v_readfirstlane, which this PR sends to the console flow. With wave64 mesh programs dropped:

  • with this PR: hung after about 95 s at that console-flow dispatch;
  • without this PR (the same programs run unsplit as 32-lane waves): hung after about 2 min at another wave64 compute dispatch;
  • with wave64 mesh and compute both dropped: no device removal in almost 7 minutes.

So the console flow does not fix those hangs, but it does not cause them either. #578 refuses wave64 mesh and compute pipelines on hosts without 64-lane waves as a safe default; the compute part could be relaxed for the forms this PR proves on NVIDIA. #579 adds VICTORY_SKIP_WAVE64=mesh,compute to test it.

🤖 Generated with Claude Code

**@⁠wbkepler** on GitHub · 2026-11-24 05:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7122725152) A data point from an RTX 5090 (Windows 11, an integration build with this PR). It is not specific to this PR. In the world, the device is removed as hung (a 2 s TDR timeout, no DRED page fault) at small dispatches (2 to 12 groups) of wave64 compute programs running on the 32-lane host. One of them is an 8x1x1 dispatch of a wave64 compute with `v_readfirstlane`, which this PR sends to the console flow. With wave64 mesh programs dropped: - with this PR: hung after about 95 s at that console-flow dispatch; - without this PR (the same programs run unsplit as 32-lane waves): hung after about 2 min at another wave64 compute dispatch; - with wave64 mesh and compute both dropped: no device removal in almost 7 minutes. So the console flow does not fix those hangs, but it does not cause them either. #578 refuses wave64 mesh and compute pipelines on hosts without 64-lane waves as a safe default; the compute part could be relaxed for the forms this PR proves on NVIDIA. #579 adds `VICTORY_SKIP_WAVE64=mesh,compute` to test it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-24 05:25 UTC · original

Tested 3098672 with #175 (19aec59) applied on top, on Windows 10 22H2 (19045.6466), RTX 3070, NVIDIA 621.14 (waves 32-32), Ryzen 5 5600X, release build, Agility SDK 1.620.2.

victory translate --pipelines --validate (host waves 32-32):

compute vertex + pixel mesh
emitted / programs 1470 / 2581 12284 / 14013 8191 / 8506
validated 1448 12184 8129
pipelines created 1470 12284 8191
  • 0 host pipelines refused (no E_INVALIDARG, no E_OUTOFMEMORY). Before this PR, #175 alone gave about 100 E_INVALIDARG compute refusals in a game run on this GPU.
  • 282 compute programs now stop at translation with a stated reason instead: 162 "console wave64 lanes on a host without 64-lane waves", 120 "a wave64 group sharing LDS without barriers on a host without 64-lane waves".
  • 22 emitted compute modules fail dxil validation but the driver still creates their pipelines (likewise 100 vertex/pixel and 62 mesh).

In-game run (same build, --execute):

  • The "host has no 64-lane waves" warning is logged once at startup. 0 host pipelines refused during the run; the wave64 programs show up as translation errors with the reasons above.
  • The Rockstar intro plays at about 30 fps with audio. Then the world load runs at 0.2–0.8 fps for about 60 s with nothing rendered except the intro, and the device is removed after a submission of 27 lists (0x887A0006, no breadcrumbs). No title exceptions. That still looks like the known world-rendering failure, not this PR.
  • Unrelated to wave64 but seen in the same run: two 2560x1440 host textures are refused with 0x80070057 (formats 86 and 115), and the host view heap is capped at 1,000,000 descriptors.

cargo test --workspace: only the known Windows 10 failures (net::only_loopback_is_reachable, #118/#152; 7 emit::valu_tests, #362). The split_tests print "no SM 6.6 device; skipped" here, so they did not exercise the GPU on Windows 10.

No game data in this report.

AI-assisted (Claude Code); everything above was run on my machine.

**@⁠walterwallaceson** on GitHub · 2026-11-24 05:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7122941202) Tested 3098672 with #175 (19aec59) applied on top, on Windows 10 22H2 (19045.6466), RTX 3070, NVIDIA 621.14 (waves 32-32), Ryzen 5 5600X, release build, Agility SDK 1.620.2. `victory translate --pipelines --validate` (host waves 32-32): | | compute | vertex + pixel | mesh | |---|---|---|---| | emitted / programs | 1470 / 2581 | 12284 / 14013 | 8191 / 8506 | | validated | 1448 | 12184 | 8129 | | pipelines created | 1470 | 12284 | 8191 | - 0 host pipelines refused (no `E_INVALIDARG`, no `E_OUTOFMEMORY`). Before this PR, #175 alone gave about 100 `E_INVALIDARG` compute refusals in a game run on this GPU. - 282 compute programs now stop at translation with a stated reason instead: 162 "console wave64 lanes on a host without 64-lane waves", 120 "a wave64 group sharing LDS without barriers on a host without 64-lane waves". - 22 emitted compute modules fail dxil validation but the driver still creates their pipelines (likewise 100 vertex/pixel and 62 mesh). In-game run (same build, `--execute`): - The "host has no 64-lane waves" warning is logged once at startup. 0 host pipelines refused during the run; the wave64 programs show up as translation errors with the reasons above. - The Rockstar intro plays at about 30 fps with audio. Then the world load runs at 0.2–0.8 fps for about 60 s with nothing rendered except the intro, and the device is removed after a submission of 27 lists (`0x887A0006`, no breadcrumbs). No title exceptions. That still looks like the known world-rendering failure, not this PR. - Unrelated to wave64 but seen in the same run: two 2560x1440 host textures are refused with `0x80070057` (formats 86 and 115), and the host view heap is capped at 1,000,000 descriptors. `cargo test --workspace`: only the known Windows 10 failures (`net::only_loopback_is_reachable`, #118/#152; 7 `emit::valu_tests`, #362). The `split_tests` print "no SM 6.6 device; skipped" here, so they did not exercise the GPU on Windows 10. No game data in this report. AI-assisted (Claude Code); everything above was run on my machine.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 05:47 UTC · original

Thanks for the three reports since my last note. Short answers:

  • @⁠QemmHD: the nit is fixed in 8876ed3, at the top of the stack (#439): the lost line continuation is back and the warning now says such programs run as two 32-lane waves where there is a form for them. I put it there so the heads people tested on #223, #233 and #320 do not move for a log string; it folds down at the next rebase. Your #468 repro is the clearest statement of what Target::ANY does on these hosts, thank you.
  • @⁠walterwallaceson: 162 + 120 matches the other whole-title run. With #320 and #439 on top, the 120 LDS programs go to 0 in a tester's run on an RTX 5070 Ti. Note for readers: on Windows 10 the split_tests skip, so on that machine only the title run exercised the split forms on the GPU.
  • @⁠wbkepler: answered on #578 in one place, with a timing of console-flow loops run to the iteration limit and the questions about the dispatch that hung: #578. If that dispatch hangs with no loop in its program, it is a defect here and I will treat it as one.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 05:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7123275775) Thanks for the three reports since my last note. Short answers: - @⁠QemmHD: the nit is fixed in `8876ed3`, at the top of the stack (#439): the lost line continuation is back and the warning now says such programs run as two 32-lane waves where there is a form for them. I put it there so the heads people tested on #223, #233 and #320 do not move for a log string; it folds down at the next rebase. Your #468 repro is the clearest statement of what `Target::ANY` does on these hosts, thank you. - @⁠walterwallaceson: 162 + 120 matches the other whole-title run. With #320 and #439 on top, the 120 LDS programs go to 0 in [a tester's run on an RTX 5070 Ti](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439). Note for readers: on Windows 10 the `split_tests` skip, so on that machine only the title run exercised the split forms on the GPU. - @⁠wbkepler: answered on #578 in one place, with a timing of console-flow loops run to the iteration limit and the questions about the dispatch that hung: https://git.gtahub.st/github/Marvisak--VIctory/pulls/578. If that dispatch hangs with no loop in its program, it is a defect here and I will treat it as one. AI-assisted (Claude Code).
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 06:08 UTC · original

Tested PR #233 at 3098672 (base d2a4bae) on Windows 10 Enterprise 22H2, Ryzen 5 3600, GTX 1660 Ti 6 GB, NVIDIA 581.42, Agility SDK 1.620.2, Rust 1.100.0, diagnostic profile. D3D12 reports wave lanes 32–32 and SM 6.6.

  • The nine emit::split_tests passed on the actual GTX 1660 Ti, including cross-half lane reads, divergent loops, DPP row masks and 3D groups. The test executable was locally modified only to export the Agility SDK version/path, so the GPU tests actually ran on Windows 10.
  • In separate title runs with the same starting profile/cache copies, baseline d2a4bae had 61 distinct compute PSOs refused with E_INVALIDARG. With this PR, 16 of those hashes created successfully, 41 stopped at translation, and four were not observed before the run ended. These are observed subsets, not a whole-title census. For example 13dfdd3b1136e407 and 88994c3496045f51 were refused in baseline and created with the PR.
  • The PR run reached the prologue, then ended with DXGI_ERROR_DEVICE_HUNG after roughly 30 seconds in the world. DRED's first unfinished breadcrumb was DispatchMesh, 381/663, associated with mesh 7523e84989803fc7 and pixel 855f2ebd23bbfbbc. Several commands can overlap between barriers, so this does not establish the culprit. The baseline also hung after reaching the prologue, at a different mesh dispatch. No visible 3D scene was confirmed.
  • Synthetic independent PSO creation using SM 6.6 succeeded with WaveSize(32) and failed with WaveSize(64), debug-layer message 622 reporting device maximum 32.

The title runs also had diagnostic counters and the local Agility exports. Shader caches are keyed by the executable, so timing and observed shader counts are not controlled performance comparisons. No game files or dumps are included in this report. AI-assisted testing and report (OpenAI Codex).

**@⁠erLCoder** on GitHub · 2026-11-24 06:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7123627616) Tested PR #233 at 3098672 (base d2a4bae) on Windows 10 Enterprise 22H2, Ryzen 5 3600, GTX 1660 Ti 6 GB, NVIDIA 581.42, Agility SDK 1.620.2, Rust 1.100.0, diagnostic profile. D3D12 reports wave lanes 32–32 and SM 6.6. - The nine emit::split_tests passed on the actual GTX 1660 Ti, including cross-half lane reads, divergent loops, DPP row masks and 3D groups. The test executable was locally modified only to export the Agility SDK version/path, so the GPU tests actually ran on Windows 10. - In separate title runs with the same starting profile/cache copies, baseline d2a4bae had 61 distinct compute PSOs refused with E_INVALIDARG. With this PR, 16 of those hashes created successfully, 41 stopped at translation, and four were not observed before the run ended. These are observed subsets, not a whole-title census. For example 13dfdd3b1136e407 and 88994c3496045f51 were refused in baseline and created with the PR. - The PR run reached the prologue, then ended with DXGI_ERROR_DEVICE_HUNG after roughly 30 seconds in the world. DRED's first unfinished breadcrumb was DispatchMesh, 381/663, associated with mesh 7523e84989803fc7 and pixel 855f2ebd23bbfbbc. Several commands can overlap between barriers, so this does not establish the culprit. The baseline also hung after reaching the prologue, at a different mesh dispatch. No visible 3D scene was confirmed. - Synthetic independent PSO creation using SM 6.6 succeeded with WaveSize(32) and failed with WaveSize(64), debug-layer message 622 reporting device maximum 32. The title runs also had diagnostic counters and the local Agility exports. Shader caches are keyed by the executable, so timing and observed shader counts are not controlled performance comparisons. No game files or dumps are included in this report. AI-assisted testing and report (OpenAI Codex).
The one conflict was in apps/victory/src/main.rs, where main's
`--jobs` became a `NonZeroUsize` and the branch added `--host-lanes`:
`translate::run` takes both, `jobs.map(NonZeroUsize::get)` as main
passes it and the branch's `host_lanes` after it.

The `emit` and `lower::Parts` call sites main added in tests (census,
crosslane, memory, synthetic, `emit::tests`, `resource` and lower.rs's
own) pass `Target::ANY`, as the earlier merge did for the ones before
them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A pure move, so that the merge of main (63bcca4) keeps emit/lower.rs
under the asset policy's 512 KiB limit: the inline `mod tests` becomes
`mod tests;` beside `mod bvh;`, and its body, one indent level less and
otherwise unchanged, is emit/lower/tests.rs. Its `super::` paths still
name `lower`.

Moving the tests out of lower.rs is desplmfao's idea (#2309).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts, resolved with kawaii-shakal's notes on #439:

- emit/host.rs: main's process-wide WARP device (`SharedDevice`,
  `WARP_LOCK`, `lock_warp`, `from_device`) is kept, and its
  `create_device` takes an optional adapter for the branch's
  `VICTORY_ADAPTER` and `Host::on`.
- emit/lower.rs: `console_read_lane` stays beside main's new
  `helpers_read` doc; main's `uniform_join` sits above `never_taken`,
  which keeps the branch's console-flow note.
- Lane-mask joins: main's path for data joined with masks at a uniform
  join (the BVH walks pop masks from memory) stays beside the console
  flow's masks; `lane_bit` now returns a `Result`, so it takes `?`.
  `no_mask_lane_on_edge` is kept out of the console flow, whose lanes go
  along the wave's edges.
- emit/lower/tests.rs (lower.rs's tests, moved out before this merge):
  main's test changes are ported there. Its `lowers` helper calls
  `lower` directly, so it now lowers a program again in the console flow
  when the first try asks for it, as `emit_with` does
  (`a_scalar_result_needs_no_exec`).
- The `lower::Parts` sites main added in tests (crosslane, memory,
  synthetic, lower's) pass `console_cf: false`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's view-mark test builds emit::Options by hand; this branch adds a
target field to Options, so the test now fills the rest from Default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's placed-UAV diagnostics test calls emit::emit with the six arguments
it had before this branch added the target.

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

@⁠oeirughrepuiohg on GitHub · 2026-11-24 06:48 UTC · original

Linux/NVIDIA A/B for the wave64 PRs, same scripted route into the world, 240 s each.

Setup: RTX 4070 Ti 12 GB (driver 620.70.06), Fedora 45 (kernel 7.3), Proton Experimental wine-11.0 with a copy of Proton's default_pfx, vkd3d-proton from GE-Proton11-14 (cae8353e), Series X mode. Base = d2a4bae + #177 + #454 + #151 + #222 + #542, diag build, VICTORY_NO_WATCHDOG=1.

base + #189 + #233
pipelines refused (WaveSize 64 vs 32) 71 0 0
shaders not translated 62 158 139
median draws/frame in world 12 520 315
median fps in world n/a (crashed during world load) 0.5 0.5
crash vkAllocateMemory 0xc0000005 in a Unix call at ~11.9/12.3 GB VRAM none in 240 s none in 240 s
  • Both PRs remove every WaveSize refusal on this card; neither crashed in these runs.
  • With #189 the mission-1 title card and the opening credits render (a later 600 s run: no crash, 0 refused).
  • In-world frame time is dominated by the CPU copies of title memory (up to ~4.5 s of a ~5 s frame); the GPU part is 0.1-0.6 s, so #407/#501 look like the next big lever here.
  • "Not translated" goes up with both PRs, likely because more of the world now gets far enough to request those programs.

Linux note for #222 / #340: Fedora 45's wine-alsa / wine-pulseaudio 11.21 packages ship only the unix .so halves, no PE winealsa.drv / winepulse.drv, so the audio assert fires even with them installed. Proton's wine with a copy of its default_pfx plus an ALSA device (a hinted type null default works when no host audio is wanted) avoids it.

AI-assisted (Claude Code). No game data attached.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 06:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7124314603) Linux/NVIDIA A/B for the wave64 PRs, same scripted route into the world, 240 s each. **Setup:** RTX 4070 Ti 12 GB (driver 620.70.06), Fedora 45 (kernel 7.3), Proton Experimental wine-11.0 with a copy of Proton's `default_pfx`, vkd3d-proton from GE-Proton11-14 (`cae8353e`), Series X mode. Base = `d2a4bae` + #177 + #454 + #151 + #222 + #542, diag build, `VICTORY_NO_WATCHDOG=1`. | | base | + #189 | + #233 | |---|---|---|---| | pipelines refused (WaveSize 64 vs 32) | 71 | 0 | 0 | | shaders not translated | 62 | 158 | 139 | | median draws/frame in world | 12 | 520 | 315 | | median fps in world | n/a (crashed during world load) | 0.5 | 0.5 | | crash | `vkAllocateMemory` 0xc0000005 in a Unix call at ~11.9/12.3 GB VRAM | none in 240 s | none in 240 s | - Both PRs remove every WaveSize refusal on this card; neither crashed in these runs. - With #189 the mission-1 title card and the opening credits render (a later 600 s run: no crash, 0 refused). - In-world frame time is dominated by the CPU copies of title memory (up to ~4.5 s of a ~5 s frame); the GPU part is 0.1-0.6 s, so #407/#501 look like the next big lever here. - "Not translated" goes up with both PRs, likely because more of the world now gets far enough to request those programs. Linux note for #222 / #340: Fedora 45's `wine-alsa` / `wine-pulseaudio` 11.21 packages ship only the unix `.so` halves, no PE `winealsa.drv` / `winepulse.drv`, so the audio assert fires even with them installed. Proton's wine with a copy of its `default_pfx` plus an ALSA device (a hinted `type null` default works when no host audio is wanted) avoids it. *AI-assisted (Claude Code). No game data attached.*
Author
Owner

@⁠iurysf on GitHub · 2026-11-24 07:06 UTC · original

NVIDIA data point, which can't be measured on AMD. RTX 4070 (32-lane waves only), driver 32.0.16.2101, victory translate --list --pipelines over the title's shaders.rpf + executable (26,096 programs), creating a host D3D12 pipeline for every emitted shader. Against main d2a4bae:

pipelines created refused by the driver
main 21,847 322 compute, all E_INVALIDARG
main + this PR 21,945 (+98) 0
  • On main, all 321 of those refusals whose DXIL I checked are WaveSize(64) compute programs, about 19% of the compute programs that emit. In a sample of 150 created compute pipelines, none had WaveSize(64).
  • With this PR, 98 of the 321 become pipelines the driver accepts. The other 223 now stop at emit with "console wave64 lanes on a host without 64-lane waves", an explicit refusal instead of the driver's generic E_INVALIDARG. No other program changes outcome.
  • So on 32-lane hosts this recovers 98 compute programs (and their dispatches). The remaining 223 are the ones still waiting on the console-flow paths.

Offline only: no in-game run of this PR yet. It merges cleanly on main.

AI-assisted.

**@⁠iurysf** on GitHub · 2026-11-24 07:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7124630019) NVIDIA data point, which can't be measured on AMD. RTX 4070 (32-lane waves only), driver 32.0.16.2101, `victory translate --list --pipelines` over the title's `shaders.rpf` + executable (26,096 programs), creating a host D3D12 pipeline for every emitted shader. Against main `d2a4bae`: | | pipelines created | refused by the driver | |---|---:|---:| | main | 21,847 | **322** compute, all `E_INVALIDARG` | | main + this PR | 21,945 (+98) | **0** | - On main, all 321 of those refusals whose DXIL I checked are `WaveSize(64)` compute programs, about 19% of the compute programs that emit. In a sample of 150 created compute pipelines, none had `WaveSize(64)`. - With this PR, **98 of the 321** become pipelines the driver accepts. The other **223** now stop at emit with "console wave64 lanes on a host without 64-lane waves", an explicit refusal instead of the driver's generic `E_INVALIDARG`. No other program changes outcome. - So on 32-lane hosts this recovers 98 compute programs (and their dispatches). The remaining 223 are the ones still waiting on the console-flow paths. Offline only: no in-game run of this PR yet. It merges cleanly on main. AI-assisted.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 07:31 UTC · original

@⁠oeirughrepuiohg thank you for the Linux A/B: the first run of this PR under vkd3d-proton that I know of, and useful that neither PR crashed there in 240 s.

Two notes for reading the table:

  • + #233 is this PR alone. The rest of the stack (#320, #439) takes more of the programs this PR still refuses: in a tester's whole-title count on an RTX 3070 the LDS reason goes from 120 programs to 0 and compute programs emitted from 1,470 to 1,668 at f653ea4; my own offline count over a local copy of the shaders gives 1,691 at the current head. So "315 draws against 520" compares #189 with the bottom of the stack; an RTX 5080 run of the whole stack against #189 had the stack dropping fewer draws (958 against 1,470 per frame). If you rerun, #439's head (e4d899f) is the one to take.
  • Agreed that "not translated" rising with both PRs is most likely more of the world being reached.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 07:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7125078244) @⁠oeirughrepuiohg thank you for the Linux A/B: the first run of this PR under vkd3d-proton that I know of, and useful that neither PR crashed there in 240 s. Two notes for reading the table: - `+ #233` is this PR alone. The rest of the stack (#320, #439) takes more of the programs this PR still refuses: in [a tester's whole-title count on an RTX 3070](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439) the LDS reason goes from 120 programs to 0 and compute programs emitted from 1,470 to 1,668 at `f653ea4`; my own offline count over a local copy of the shaders gives 1,691 at the current head. So "315 draws against 520" compares #189 with the bottom of the stack; [an RTX 5080 run of the whole stack against #189](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439) had the stack dropping fewer draws (958 against 1,470 per frame). If you rerun, #439's head (`e4d899f`) is the one to take. - Agreed that "not translated" rising with both PRs is most likely more of the world being reached. AI-assisted (Claude Code).
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 07:37 UTC · original

@⁠iurysf thank you. 98 of 321 gained and 0 lost on an RTX 4070 is the same split an RTX 3080 run found, now on a second card and driver, and with the pipelines actually created.

On the remaining 223: they are what #320 and #439 (stacked on this) take next. A tester's count at #439 has the LDS reason going from 120 programs to 0 and 198 more compute programs emitted than here, with 43 left for groups of more than 64 threads. If you rerun the same --list --pipelines comparison on #439's head (e4d899f), the pipeline-creation column is the number nobody has for the newer commits there.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 07:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7125184265) @⁠iurysf thank you. 98 of 321 gained and 0 lost on an RTX 4070 is the same split [an RTX 3080 run found](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), now on a second card and driver, and with the pipelines actually created. On the remaining 223: they are what #320 and #439 (stacked on this) take next. [A tester's count at #439](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439) has the LDS reason going from 120 programs to 0 and 198 more compute programs emitted than here, with 43 left for groups of more than 64 threads. If you rerun the same `--list --pipelines` comparison on #439's head (`e4d899f`), the pipeline-creation column is the number nobody has for the newer commits there. AI-assisted (Claude Code).
Author
Owner

@⁠iurysf on GitHub · 2026-11-24 07:48 UTC · original

In-game follow-up to my pipeline numbers above. RTX 4070 (32-lane waves), driver 32.0.16.2101. This PR on top of #493 + #483 (the pair that stops the device removal on this GPU) merges cleanly. Default loop limit, 300 s, VICTORY_D3D12_DRED=1, one run, with the host CPU busy, so ms/frame isn't comparable.

device removed time in world refused host pipelines "does not translate" compute dispatches still dropped
base no (323 s) 220 s 131 424 85 pipelines, ~1,324/frame
base + this PR no (305 s) 225 s 0 514 94 pipelines, ~1,185/frame
  • The driver refusals are gone, as in the offline count. They now show up as explicit translation refusals: 79 "console wave64 lanes on a host without them" and 41 "a wave64 group sharing LDS", plus the general warning about wave64 compute that reads other lanes.
  • The compute dispatches dropped in the scene are about the same; the difference is within run-to-run variation. So in this first mission the 98 recovered programs don't seem to be the heavy hitters, or they aren't reached yet.

AI-assisted.

**@⁠iurysf** on GitHub · 2026-11-24 07:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7125387556) In-game follow-up to my pipeline numbers above. RTX 4070 (32-lane waves), driver 32.0.16.2101. This PR on top of #493 + #483 (the pair that stops the device removal on this GPU) merges cleanly. Default loop limit, 300 s, `VICTORY_D3D12_DRED=1`, one run, with the host CPU busy, so ms/frame isn't comparable. | | device removed | time in world | refused host pipelines | "does not translate" | compute dispatches still dropped | |---|---|---|---|---|---| | base | no (323 s) | 220 s | 131 | 424 | 85 pipelines, ~1,324/frame | | base + this PR | no (305 s) | 225 s | **0** | 514 | 94 pipelines, ~1,185/frame | - The driver refusals are gone, as in the offline count. They now show up as explicit translation refusals: 79 "console wave64 lanes on a host without them" and 41 "a wave64 group sharing LDS", plus the general warning about wave64 compute that reads other lanes. - The compute dispatches dropped in the scene are about the same; the difference is within run-to-run variation. So in this first mission the 98 recovered programs don't seem to be the heavy hitters, or they aren't reached yet. AI-assisted.
Author
Owner

@⁠slint6614-dev on GitHub · 2026-11-24 08:09 UTC · original

AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4) and Ryzen 9600X iGPU (RDNA2, gfx1036).

  • cargo test -p victory-shader --release with VICTORY_ADAPTER set to each GPU: 82 passed, 0 failed on both. Note that on both AMD GPUs every split_tests case reports split false (64-lane waves are native there), so the split path itself is only exercised on 32-lane hosts (NVIDIA/WARP), not on AMD.
  • Full retail shader pack (26,503 containers), victory translate --validate --pipelines on the RX 9070 (host waves 32-64): identical to main 1f858b0 (VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191).
  • Same pack with --host-lanes 32-32 (what an NVIDIA host gets): CS 1470 emitted / 1448 validated instead of 1693 / 1670. 223 compute programs are refused, 162 with "console wave64 lanes on a host without 64-lane waves" and 120 with "a wave64 group sharing LDS without barriers on a host without 64-lane waves" (a program can carry both). VS/PS and MS unchanged.
**@⁠slint6614-dev** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7125793586) AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4) and Ryzen 9600X iGPU (RDNA2, gfx1036). - `cargo test -p victory-shader --release` with `VICTORY_ADAPTER` set to each GPU: 82 passed, 0 failed on both. Note that on both AMD GPUs every `split_tests` case reports `split false` (64-lane waves are native there), so the split path itself is only exercised on 32-lane hosts (NVIDIA/WARP), not on AMD. - Full retail shader pack (26,503 containers), `victory translate --validate --pipelines` on the RX 9070 (host waves 32-64): identical to main 1f858b0 (VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191). - Same pack with `--host-lanes 32-32` (what an NVIDIA host gets): CS **1470** emitted / 1448 validated instead of 1693 / 1670. 223 compute programs are refused, 162 with "console wave64 lanes on a host without 64-lane waves" and 120 with "a wave64 group sharing LDS without barriers on a host without 64-lane waves" (a program can carry both). VS/PS and MS unchanged.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 08:35 UTC · original

Two reports to thank, and a rebase to announce.

Rebased onto main 2e4e280, force-pushed with lease: head is cd4677c, was 3098672. Upstream merged 32 PRs; two of their new tests needed the argument #223 adds (fixed in #223's commit). The six commits of this PR are replayed unchanged and each builds on its own. Details for the whole stack are in the latest comment on #439.

@⁠iurysf thank you for the in-game run. It says the honest thing: refusals 131 → 0, no device removal with or without, and no visible change in dropped compute dispatches. That fits what this PR is, the bottom of the stack: the 79 + 41 programs your log shows stopping with the two reasons are the ones #320 and #439 take (LDS inside one wave, masks and lane reads across the halves in more forms). On an RTX 5070 a tester found six of seven screen-size lighting passes translating with #439 where this PR alone leaves them stopped. If you run again, #439's head is the one that shows what the stack does.

@⁠slint6614-dev thank you for the AMD check on RDNA4 and RDNA2: identical to main on a 32..64 host, which is what the stack promises there, and --host-lanes 32-32 on an AMD machine reproducing the NVIDIA counts (1,470 emitted, 162 / 120 by reason) is a nice confirmation that the translation depends only on the wave range. You are right that the split path itself only runs on 32-lane hosts; on AMD the tests check the 64-lane reference.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 08:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7126324879) Two reports to thank, and a rebase to announce. **Rebased onto `main` `2e4e280`**, force-pushed with lease: head is `cd4677c`, was `3098672`. Upstream merged 32 PRs; two of their new tests needed the argument #223 adds (fixed in #223's commit). The six commits of this PR are replayed unchanged and each builds on its own. [Details for the whole stack](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439) are in the latest comment on #439. @⁠iurysf thank you for the in-game run. It says the honest thing: refusals 131 → 0, no device removal with or without, and no visible change in dropped compute dispatches. That fits what this PR is, the bottom of the stack: the 79 + 41 programs your log shows stopping with the two reasons are the ones #320 and #439 take (LDS inside one wave, masks and lane reads across the halves in more forms). On an RTX 5070 [a tester found six of seven screen-size lighting passes translating with #439](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320) where this PR alone leaves them stopped. If you run again, #439's head is the one that shows what the stack does. @⁠slint6614-dev thank you for the AMD check on RDNA4 and RDNA2: identical to `main` on a 32..64 host, which is what the stack promises there, and `--host-lanes 32-32` on an AMD machine reproducing the NVIDIA counts (1,470 emitted, 162 / 120 by reason) is a nice confirmation that the translation depends only on the wave range. You are right that the split path itself only runs on 32-lane hosts; on AMD the tests check the 64-lane reference. AI-assisted (Claude Code).
Author
Owner

@⁠iurysf on GitHub · 2026-11-24 08:59 UTC · original

Validation follow-up: RTX 4070, this PR on top of #493 + #483, with VICTORY_D3D12_DEBUG=1 + VICTORY_D3D12_GBV=1 + DRED=1. Every validated run ended on the title's own exception before the world, at 131–186 s, so these are counts up to that point.

run id 940 (SRV TEXTURE2D expected, TEXTURE1D at heap index 0) id 941 (UAV TEXTURE3D expected, TEXTURE2D) ids 936 / 538 / 527
base, 2 runs 5, 7 (all draw/pixel) 0, 1 0
base + this PR 8 (4 draw, 4 dispatch/compute) 2 0

No new kind of validation error. The same two messages exist on the base. The compute-stage instances of id 940 may come from wave64 dispatches that now run, but #581 alone shows them too, and the run lengths differ, so I can't attribute them.

AI-assisted.

**@⁠iurysf** on GitHub · 2026-11-24 08:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7126811710) Validation follow-up: RTX 4070, this PR on top of #493 + #483, with `VICTORY_D3D12_DEBUG=1` + `VICTORY_D3D12_GBV=1` + `DRED=1`. Every validated run ended on the title's own exception before the world, at 131–186 s, so these are counts up to that point. | run | id 940 (SRV TEXTURE2D expected, TEXTURE1D at heap index 0) | id 941 (UAV TEXTURE3D expected, TEXTURE2D) | ids 936 / 538 / 527 | |---|---:|---:|---:| | base, 2 runs | 5, 7 (all draw/pixel) | 0, 1 | 0 | | base + this PR | 8 (4 draw, 4 dispatch/compute) | 2 | 0 | **No new kind of validation error.** The same two messages exist on the base. The compute-stage instances of id 940 may come from wave64 dispatches that now run, but #581 alone shows them too, and the run lengths differ, so I can't attribute them. AI-assisted.
Author
Owner

@⁠OHHIM on GitHub · 2026-11-24 09:41 UTC · original

Tested on an RTX 3060 12 GB (driver 621.01, 32-lane waves only), Windows 11, diag build with VICTORY_D3D12_DRED=1. #233 merged cleanly onto main 8e79c80; clippy -D warnings (default and diagnostics) and cargo test --workspace pass. Two 3-minute boots with the same input script, one without #233 and one with it:

main main + #233
host pipeline refused (E_INVALIDARG) 114 0
shader does not translate 389 494
… console wave64 lanes on a host without 64-lane waves – 67
… a wave64 group sharing LDS without barriers on a host without 64-lane waves – 38
Time to device removal 138 s 175 s

So on this card #233 gets rid of the driver refusals, and roughly 9 of the 114 wave64 programs now run; the other ~105 are now dropped at translation with the two reasons above instead of being refused by the driver. Those two reasons are the largest new buckets, if it helps prioritise.

The world still renders black (subtitles only) and the hang is unchanged: both runs end in DXGI_ERROR_DEVICE_HUNG at the same indirect mesh draws ([mesh f9c79a2d484bd75a, pixel a144abbc586fa5b2] and others) reading null heap slots, so that hang does not look wave64-related.

**@⁠OHHIM** on GitHub · 2026-11-24 09:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7127751835) Tested on an RTX 3060 12 GB (driver 621.01, 32-lane waves only), Windows 11, `diag` build with `VICTORY_D3D12_DRED=1`. #233 merged cleanly onto main `8e79c80`; clippy `-D warnings` (default and diagnostics) and `cargo test --workspace` pass. Two 3-minute boots with the same input script, one without #233 and one with it: | | main | main + #233 | |---|---|---| | `host pipeline refused` (E_INVALIDARG) | 114 | **0** | | `shader does not translate` | 389 | 494 | | … `console wave64 lanes on a host without 64-lane waves` | – | 67 | | … `a wave64 group sharing LDS without barriers on a host without 64-lane waves` | – | 38 | | Time to device removal | 138 s | 175 s | So on this card #233 gets rid of the driver refusals, and roughly 9 of the 114 wave64 programs now run; the other ~105 are now dropped at translation with the two reasons above instead of being refused by the driver. Those two reasons are the largest new buckets, if it helps prioritise. The world still renders black (subtitles only) and the hang is unchanged: both runs end in `DXGI_ERROR_DEVICE_HUNG` at the same indirect mesh draws (`[mesh f9c79a2d484bd75a, pixel a144abbc586fa5b2]` and others) reading null heap slots, so that hang does not look wave64-related.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 11:02 UTC · original

@⁠SlopComp, your opcode list answers my question. All five call sample, and the 43 failing modules span several group shapes and both wave-size settings. That matches the implicit-derivative compute sampling case tracked in #201. #180 changes the lowering to sampleGrad. I’ve linked the diagnosis and the independent validation census in the PR description. Your five hashes give us a concrete set for comparing driver behavior separately.

AI-assisted (Codex).

**@⁠r4tedx** on GitHub · 2026-11-24 11:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7129576601) @⁠SlopComp, your opcode list answers my question. All five call `sample`, and the 43 failing modules span several group shapes and both wave-size settings. That matches the implicit-derivative compute sampling case tracked in #201. #180 changes the lowering to `sampleGrad`. I’ve linked the diagnosis and the independent validation census in the PR description. Your five hashes give us a concrete set for comparing driver behavior separately. AI-assisted (Codex).
Author
Owner

@⁠HrHd on GitHub · 2026-11-24 11:08 UTC · original

Rebased onto current main (ffe310e, the per-lane descriptor waterfall series) on top of #704 and ran it here. Posting the rebase notes because the conflicts are all in the descriptor path, plus the one measurement I have.

What had to change to rebase (12 files, three real conflicts):

  • structure.rs: execs field and structure_console had to be added on top of main's finish(&execs, &cond); Lanes::new now takes the console flag.
  • lower.rs: main added a v_readfirstlane_b32 arm for waterfall descriptor reads before the plain one. The console arm has to go after the waterfall arm, otherwise console mode shadows the waterfall read and a waterfall loop gets the first lane's dword of whatever, not its own.
  • emit/mod.rs: emit grew a target argument in this PR; every call in the tree (including the waterfall tests) has to pass one, and Target::ANY in tests.
  • The test helpers compute/compute_of/emit_for are used by split_tests.rs, so they have to be pub(super) in emit::tests, not private to the module.

One merge hazard worth naming: main's rewrite of heap_slot into lane_heap_index dropped the Source::Phi arm, so with #704 on top the stride-table path refuses a descriptor chosen across an if/else (a structured buffer of unknown stride at the first use, not at the join). Add the Phi-of-Loaded arm back to lane_heap_index and the #704 test passes again. Phi of anything else can stay refused.

Result here: 135 victory-shader tests pass. On the retail pack (translate, 26,084 programs) the emit counts are flat with the PR — 1,479 of 2,582 compute — but the run got measurably further: 5,569 draws/frame against 3,066 without it, then died at the first bind of a new pipeline (submission of 11 lists, no breadcrumbs), on WARP and on a real 4060 Ti alike. That is the semantics, not the count, doing the work.

Measured with the title's four fail-fast writes NOPed and TdrDelay/TdrDdiDelay at 300; per-build offsets and counts only, no assets.

**@⁠HrHd** on GitHub · 2026-11-24 11:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7129705105) Rebased onto current `main` (`ffe310e`, the per-lane descriptor waterfall series) on top of #704 and ran it here. Posting the rebase notes because the conflicts are all in the descriptor path, plus the one measurement I have. **What had to change to rebase** (12 files, three real conflicts): - `structure.rs`: `execs` field and `structure_console` had to be added on top of main's `finish(&execs, &cond)`; `Lanes::new` now takes the console flag. - `lower.rs`: main added a `v_readfirstlane_b32` arm for waterfall descriptor reads *before* the plain one. The console arm has to go after the waterfall arm, otherwise console mode shadows the waterfall read and a waterfall loop gets the first lane's dword of whatever, not its own. - `emit/mod.rs`: `emit` grew a `target` argument in this PR; every call in the tree (including the waterfall tests) has to pass one, and `Target::ANY` in tests. - The test helpers `compute`/`compute_of`/`emit_for` are used by `split_tests.rs`, so they have to be `pub(super)` in `emit::tests`, not private to the module. **One merge hazard worth naming:** main's rewrite of `heap_slot` into `lane_heap_index` dropped the `Source::Phi` arm, so with #704 on top the stride-table path refuses a descriptor chosen across an if/else (`a structured buffer of unknown stride` at the first *use*, not at the join). Add the `Phi`-of-`Loaded` arm back to `lane_heap_index` and the #704 test passes again. `Phi` of anything else can stay refused. **Result here:** 135 `victory-shader` tests pass. On the retail pack (`translate`, 26,084 programs) the emit counts are flat with the PR — 1,479 of 2,582 compute — but the run got measurably further: **5,569 draws/frame against 3,066 without it**, then died at the first bind of a new pipeline (`submission of 11 lists`, no breadcrumbs), on WARP and on a real 4060 Ti alike. That is the semantics, not the count, doing the work. Measured with the title's four fail-fast writes NOPed and `TdrDelay`/`TdrDdiDelay` at 300; per-build offsets and counts only, no assets.
Author
Owner

@⁠desplmfao on GitHub · 2026-11-24 10:29 UTC · original · edited 2026-11-24 11:56 UTC

Data point from NVIDIA (RTX 5080, 32-lane waves only), in case it helps with the remaining wave64 cases. Two world compute programs, fdd56d97a806bcca and 17af15c4015cb4b6, both have 64 threads per group, wave64, and 300+ cross-lane operations including v_readfirstlane. They are among the most-read dropped producers in the world here. With VICTORY_PRODUCERS=1 from #638, running draws and dispatches read their outputs at 558 and 468 reader pairs. I haven't checked whether the other top producers are wave64 as well. After #704 (via aycow/VIctory#6) they translate, but every route to a host pipeline stops:

on #185 + main + #704 result
as is vkd3d-proton: Required WaveSize range [64, 64], but supported range is [32, 32], pipeline refused (0x80070057)
+ this PR (dd3c08c) emit: console wave64 lanes on a host without 64-lane waves (programs with v_readfirstlane aren't split in halves)
+ #189 instead emit: a cross-lane wave operation in divergent control flow at 0x724 / 0x2ab4
+ #439 instead both translate in the console flow and validate (WaveSize 32); 17af15c4015cb4b6 makes a host pipeline; fdd56d97a806bcca does not (see below)

So on 32-lane hosts these need v_readfirstlane (and other cross-lane reads) inside divergent control flow. I checked them offline with victory translate --pipelines on the containers from shaders.rpf, so they're quick to reproduce without a game run.

Update with #439: this PR excludes them because each has 56 whole-wave sections (the compiler's WaveActiveSum and prefix expansions with DPP8, row_shr, v_permlanex16, v_readlane 32), and the split form can't take its v_readfirstlane: lanes 32–63 would read lane 32's value instead of the console's first lane. #439 handles both.

fdd56d97a806bcca then fails inside vkd3d-proton (3.2.0): CreateComputePipelineState overflows the stack while converting the DXIL to SPIR-V and the thread hangs. No SPIR-V is written with VKD3D_SHADER_DUMP_PATH, and it still overflows with 64 MiB and 1 GiB thread stacks. The module is large (1,074 blocks, 429 barriers, 921 phis, seven s_getpc_b64 table loops), so on that host it would need a skip or a split until the converter copes.

On #439 I also wrote four extra GPU tests in its split_tests style, run on the odd lanes of a 64-lane wave so both halves are active: v_readfirstlane, the s_ff1 + v_mbcnt + v_cmpx first-active-lane pattern followed by v_readfirstlane, and the title's exact WaveActiveSum and exclusive-prefix sequences. All 32 split_tests pass on NVIDIA under vkd3d-proton (expected values computed by hand, since I have no 64-lane adapter). Happy to share them if useful.

AI-assisted (Claude Code).

**@⁠desplmfao** on GitHub · 2026-11-24 10:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7128852320) · edited 2026-11-24 11:56 UTC Data point from NVIDIA (RTX 5080, 32-lane waves only), in case it helps with the remaining wave64 cases. Two world compute programs, `fdd56d97a806bcca` and `17af15c4015cb4b6`, both have 64 threads per group, wave64, and 300+ cross-lane operations including `v_readfirstlane`. They are among the most-read dropped producers in the world here. With `VICTORY_PRODUCERS=1` from #638, running draws and dispatches read their outputs at 558 and 468 reader pairs. I haven't checked whether the other top producers are wave64 as well. After #704 (via aycow/VIctory#6) they translate, but every route to a host pipeline stops: | on #185 + `main` + #704 | result | |---|---| | as is | vkd3d-proton: `Required WaveSize range [64, 64], but supported range is [32, 32]`, pipeline refused (`0x80070057`) | | + this PR (`dd3c08c`) | `emit: console wave64 lanes on a host without 64-lane waves` (programs with `v_readfirstlane` aren't split in halves) | | + #189 instead | `emit: a cross-lane wave operation in divergent control flow` at `0x724` / `0x2ab4` | | + #439 instead | both translate in the console flow and validate (WaveSize 32); `17af15c4015cb4b6` makes a host pipeline; `fdd56d97a806bcca` does not (see below) | So on 32-lane hosts these need `v_readfirstlane` (and other cross-lane reads) inside divergent control flow. I checked them offline with `victory translate --pipelines` on the containers from `shaders.rpf`, so they're quick to reproduce without a game run. **Update with #439:** this PR excludes them because each has 56 whole-wave sections (the compiler's WaveActiveSum and prefix expansions with DPP8, `row_shr`, `v_permlanex16`, `v_readlane 32`), and the split form can't take its `v_readfirstlane`: lanes 32–63 would read lane 32's value instead of the console's first lane. #439 handles both. `fdd56d97a806bcca` then fails inside vkd3d-proton (3.2.0): `CreateComputePipelineState` overflows the stack while converting the DXIL to SPIR-V and the thread hangs. No SPIR-V is written with `VKD3D_SHADER_DUMP_PATH`, and it still overflows with 64 MiB and 1 GiB thread stacks. The module is large (1,074 blocks, 429 barriers, 921 phis, seven `s_getpc_b64` table loops), so on that host it would need a skip or a split until the converter copes. On #439 I also wrote four extra GPU tests in its `split_tests` style, run on the odd lanes of a 64-lane wave so both halves are active: `v_readfirstlane`, the `s_ff1` + `v_mbcnt` + `v_cmpx` first-active-lane pattern followed by `v_readfirstlane`, and the title's exact WaveActiveSum and exclusive-prefix sequences. All 32 `split_tests` pass on NVIDIA under vkd3d-proton (expected values computed by hand, since I have no 64-lane adapter). Happy to share them if useful. AI-assisted (Claude Code).
Author
Owner

@⁠Ilokaxt on GitHub · 2026-11-24 12:16 UTC · original

Tested on an RTX 3070 Ti Laptop (wave lanes 32..32, NVIDIA driver 610.88, Windows 11 build 26300), merged onto main ffe310e, plus a local fix that creates the device on the high-performance adapter. Scripted run into the world, as in my note on #439.

  • wave64 compute programs refused by the driver: 124 → 0
  • shaders not translated: 399 on main, 417 with this PR
  • device hung (TDR) at 100 s in a Dispatch, at command 3628 of 3640 of its list: the very position #439 hangs at. On #439, DRED named that dispatch as compute 42683eebec081520 (Dispatch(128, 64, 1)). Here it is not named (debug layer on), so it is most likely, but not proven, the same program.
**@⁠Ilokaxt** on GitHub · 2026-11-24 12:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7131204452) Tested on an **RTX 3070 Ti Laptop** (wave lanes 32..32, NVIDIA driver 610.88, Windows 11 build 26300), merged onto `main` `ffe310e`, plus a local fix that creates the device on the high-performance adapter. Scripted run into the world, as in my note on #439. - wave64 compute programs refused by the driver: **124 → 0** - shaders not translated: 399 on `main`, 417 with this PR - **device hung (TDR) at 100 s in a `Dispatch`**, at command 3628 of 3640 of its list: the very position #439 hangs at. On #439, DRED named that dispatch as compute `42683eebec081520` (`Dispatch(128, 64, 1)`). Here it is not named (debug layer on), so it is most likely, but not proven, the same program.
Author
Owner

@⁠konradbeck on GitHub · 2026-11-24 13:08 UTC · original

Independent synthetic A/B on an NVIDIA RTX A4500 (driver 32.0.16.2124, D3D12 wave range 32..32). Windows 11 build 26300.9974, Rust 1.98.1 GNU target.

I tested v_readfirstlane_b32 in a 48-thread wave64 group with EXEC set only for lanes 41–47. The reference selects lane 41 and counts seven active lanes. Four companion variants cover a first active lane of 31, 32, or 47, plus empty EXEC. Each variant dispatched two groups with distinct inputs.

Revision DXIL wave size Result
main ffe310eb2098e52169f4c44db5ffdabf43a72622 64 All five variants passed DXIL validation. D3D12 refused all five pipelines with E_INVALIDARG (0x80070057).
#233 d1fecaa1ef231f8ad24736d58e9d8e1e149938bd 32 All five variants passed DXIL validation and dispatched. 480/480 GPU readback values matched the CPU reference per run (96/96 per variant).

The A/B results repeated across three serial runs. Both revisions passed the wave32 control (64/64 per run), and all nine existing split_tests passed on the A4500. The test used hand-assembled synthetic shaders. AI-assisted testing and report.

**@⁠konradbeck** on GitHub · 2026-11-24 13:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7132408561) Independent synthetic A/B on an **NVIDIA RTX A4500** (driver 32.0.16.2124, D3D12 wave range 32..32). Windows 11 build 26300.9974, Rust 1.98.1 GNU target. I tested `v_readfirstlane_b32` in a 48-thread wave64 group with EXEC set only for lanes 41–47. The reference selects lane 41 and counts seven active lanes. Four companion variants cover a first active lane of 31, 32, or 47, plus empty EXEC. Each variant dispatched two groups with distinct inputs. | Revision | DXIL wave size | Result | | --- | --- | --- | | `main` `ffe310eb2098e52169f4c44db5ffdabf43a72622` | 64 | All five variants passed DXIL validation. D3D12 refused all five pipelines with `E_INVALIDARG` (`0x80070057`). | | #233 `d1fecaa1ef231f8ad24736d58e9d8e1e149938bd` | 32 | All five variants passed DXIL validation and dispatched. **480/480** GPU readback values matched the CPU reference per run (96/96 per variant). | The A/B results repeated across three serial runs. Both revisions passed the wave32 control (64/64 per run), and all nine existing `split_tests` passed on the A4500. The test used hand-assembled synthetic shaders. AI-assisted testing and report.
Author
Owner

@⁠felicienradio on GitHub · 2026-11-24 14:10 UTC · original

<html>

Tested on NVIDIA GeForce RTX 3060 (Ampere, 32-lane waves), driver 610.88, Windows 11

victory translate shaders.rpf --validate --pipelines, compute programs (2,582 in the pack):

  | main (ffe310e) | #233 -- | -- | -- emitted | 1,441 | 1,219 validated | 1,417 | 1,196 pipelines | 1,121 | 1,214 refused by the driver (E_INVALIDARG) | 320 | 5

Net +93 compute pipelines on a 32-lane GPU, and the driver refusals are almost gone (320 → 5).

The programs that emitted on main and no longer do are now refused at translation, with the new reasons:

  • 162 × console wave64 lanes on a host without 64-lane waves (e.g. cascadeshadows_classify:CS_ShadowUnifiedClearRT)
  • 120 × a wave64 group sharing LDS without barriers on a host without 64-lane waves (e.g. ambient_map:CS_AmbientMapSkyCB32). This looks like what #439 covers, so I can test the two together if useful.

Small side gains: a select on an untracked mask 288 → 284, a lane mask holding lanes elsewhere read as data 272 → 266.

No game files attached; happy to rerun on newer pushes.

</html>
**@⁠felicienradio** on GitHub · 2026-11-24 14:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7133945516) <html> <body> <!--StartFragment--><p dir="ltr"><strong>Tested on NVIDIA GeForce RTX 3060 (Ampere, 32-lane waves), driver 610.88, Windows 11</strong></p> <p dir="ltr"><code dir="ltr">victory translate shaders.rpf --validate --pipelines</code>, compute programs (2,582 in the pack):</p> <div dir="ltr">   | main (ffe310e) | #233 -- | -- | -- emitted | 1,441 | 1,219 validated | 1,417 | 1,196 pipelines | 1,121 | 1,214 refused by the driver (E_INVALIDARG) | 320 | 5 </div> <p dir="ltr">Net <strong>+93 compute pipelines</strong> on a 32-lane GPU, and the driver refusals are almost gone (320 → 5).</p> <p dir="ltr">The programs that emitted on main and no longer do are now refused at translation, with the new reasons:</p> <ul dir="ltr"> <li>162 × <code dir="ltr">console wave64 lanes on a host without 64-lane waves</code> (e.g. <code dir="ltr">cascadeshadows_classify:CS_ShadowUnifiedClearRT</code>)</li> <li>120 × <code dir="ltr">a wave64 group sharing LDS without barriers on a host without 64-lane waves</code> (e.g. <code dir="ltr">ambient_map:CS_AmbientMapSkyCB32</code>). This looks like what #439 covers, so I can test the two together if useful.</li> </ul> <p dir="ltr">Small side gains: <code dir="ltr">a select on an untracked mask</code> 288 → 284, <code dir="ltr">a lane mask holding lanes elsewhere read as data</code> 272 → 266.</p> <p dir="ltr">No game files attached; happy to rerun on newer pushes.</p><!--EndFragment--> </body> </html>
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 14:40 UTC · original

@⁠felicienradio, thank you. I ran the same command at the same head (1a8a3ed) on an RTX 5070 (driver 616.92, 32-lane waves) to compare. Local title data was used for this one offline run (translation, validation and pipeline creation only, no title launch; counts only).

compute, #233 1a8a3ed your RTX 3060, 610.88 RTX 5070, 616.92
emitted 1,219 1,219
validated 1,196 1,196
pipelines 1,214 1,219
refused by the driver 5 0

The translator side agrees to the program: the same 162 and 120 for the two new reasons, 284 and 266 for the two mask reasons.

The 5. They do not reproduce here: every emitted compute module gets a pipeline on the RTX 5070. So this is the 3060 or its driver refusing five modules the newer card accepts, and I cannot name them from this machine. Could you run it once more with --list and post the lines that end in a pipeline error (hash, reason and the driver's message)? --list prints one line per program; nothing in those lines is game data beyond the shader's name. If the message is the wave-size one, that is a bug in this PR and I want it; run() is meant to stop any module that declares a wave size the host lacks.

The 320 on main. main declares the console's WaveSize(64) for every wave64 program that reads other lanes or shares LDS within one wave, whatever the host runs, so a 32-lane driver refuses the pipeline. This PR checks the host's range and stops such a program at translation with its reason, unless it can run as two 32-lane waves. That is why emitted falls (1,441 → 1,219) while pipelines rise (1,121 → 1,214): 282 programs moved from "refused by the driver" to "refused by the translator, by name", and the rest of the 320 now run.

The 120 with LDS are exactly what #439 takes (one console wave sharing LDS, in the console flow), and most of the 162 go with #320 and #439 too. A run of the two together would be useful; the head is bf0f951. Other testers' 32-lane counts on #439 had no pipeline refused.

Pipelines above validated (1,219 against 1,196). The tool creates a pipeline for every emitted module, validated or not, and both cards accept the 23 that dxil.dll refuses ("Entry function performs some operation that is incompatible with the shader stage"). On #439, where the tool also lists what a refused module calls, every compute module refused that way calls sample (35 of 35 at c153b21): implicit derivatives in a compute shader, tracked in #201, lowered by #180. I have not listed the operations of these 23 at this head.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 14:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7134766041) @⁠felicienradio, thank you. I ran the same command at the same head (`1a8a3ed`) on an RTX 5070 (driver 616.92, 32-lane waves) to compare. Local title data was used for this one offline run (translation, validation and pipeline creation only, no title launch; counts only). | compute, #233 `1a8a3ed` | your RTX 3060, 610.88 | RTX 5070, 616.92 | |---|---|---| | emitted | 1,219 | 1,219 | | validated | 1,196 | 1,196 | | pipelines | 1,214 | 1,219 | | refused by the driver | 5 | 0 | The translator side agrees to the program: the same 162 and 120 for the two new reasons, 284 and 266 for the two mask reasons. **The 5.** They do not reproduce here: every emitted compute module gets a pipeline on the RTX 5070. So this is the 3060 or its driver refusing five modules the newer card accepts, and I cannot name them from this machine. Could you run it once more with `--list` and post the lines that end in a pipeline error (hash, reason and the driver's message)? `--list` prints one line per program; nothing in those lines is game data beyond the shader's name. If the message is the wave-size one, that is a bug in this PR and I want it; `run()` is meant to stop any module that declares a wave size the host lacks. **The 320 on `main`.** `main` declares the console's `WaveSize(64)` for every wave64 program that reads other lanes or shares LDS within one wave, whatever the host runs, so a 32-lane driver refuses the pipeline. This PR checks the host's range and stops such a program at translation with its reason, unless it can run as two 32-lane waves. That is why emitted falls (1,441 → 1,219) while pipelines rise (1,121 → 1,214): 282 programs moved from "refused by the driver" to "refused by the translator, by name", and the rest of the 320 now run. **The 120 with LDS** are exactly what #439 takes (one console wave sharing LDS, in the console flow), and most of the 162 go with #320 and #439 too. A run of the two together would be useful; the head is `bf0f951`. Other testers' 32-lane counts on #439 had no pipeline refused. **Pipelines above validated (1,219 against 1,196).** The tool creates a pipeline for every emitted module, validated or not, and both cards accept the 23 that `dxil.dll` refuses ("Entry function performs some operation that is incompatible with the shader stage"). On #439, where the tool also lists what a refused module calls, every compute module refused that way calls `sample` (35 of 35 at `c153b21`): implicit derivatives in a compute shader, tracked in #201, lowered by #180. I have not listed the operations of these 23 at this head. AI-assisted (Claude Code).
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 14:52 UTC · original

GTX 1660 Ti retest (Windows 10 22H2, NVIDIA 581.42, Rust 1.98.1, Agility SDK 1.620.2). On 1a8a3ed, emit::split_tests passed 10/10, including saveexec_scc_tests_new_exec_not_saved_exec: the console-flow hardware readback was exact on NVIDIA (64 threads, split wave). This exercises the SCC0 branch when the new EXEC becomes empty; it is not a general proof for all saveexec forms.

The PR advanced to b623fd33943087076cc413820c41bc5dd93d3e1b during the retest. On that head split tests again passed 10/10 and waterfall tests 6/6; WARP-dependent paths reported no SM 6.6 device and skipped internally. The new descriptor-join refusal is covered by a translator test, not a hardware descriptor-output comparison. The separate lane_read_loop_tests module is not present on this #233 head; it belongs to the later stack and was tested there. Local Agility exports were added to the test binary. The independent D3D12 probe identifies the physical NVIDIA adapter as LUID 00000000:00017c52, software flag 0, 32–32 lanes.

No title comparison is attributed to #233 alone. Codex prepared the worktrees, ran the tests and drafted this report.

**@⁠erLCoder** on GitHub · 2026-11-24 14:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7135078628) GTX 1660 Ti retest (Windows 10 22H2, NVIDIA 581.42, Rust 1.98.1, Agility SDK 1.620.2). On `1a8a3ed`, `emit::split_tests` passed 10/10, including `saveexec_scc_tests_new_exec_not_saved_exec`: the console-flow hardware readback was exact on NVIDIA (64 threads, split wave). This exercises the SCC0 branch when the new EXEC becomes empty; it is not a general proof for all saveexec forms. The PR advanced to `b623fd33943087076cc413820c41bc5dd93d3e1b` during the retest. On that head split tests again passed 10/10 and waterfall tests 6/6; WARP-dependent paths reported no SM 6.6 device and skipped internally. The new descriptor-join refusal is covered by a translator test, not a hardware descriptor-output comparison. The separate `lane_read_loop_tests` module is not present on this #233 head; it belongs to the later stack and was tested there. Local Agility exports were added to the test binary. The independent D3D12 probe identifies the physical NVIDIA adapter as LUID `00000000:00017c52`, software flag 0, 32–32 lanes. No title comparison is attributed to #233 alone. Codex prepared the worktrees, ran the tests and drafted this report.
Author
Owner

@⁠465d6a0eac on GitHub · 2026-11-24 16:29 UTC · original · edited 2026-11-24 17:20 UTC

Thank you for this, @⁠r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/29. It includes #223, which this pull request builds on. You're credited as the author there. This pull request stays the original.

Test results

  • Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): cargo clippy (both variants) and cargo test --workspace pass (358 passed, 0 failed).
  • victory translate over the 26,148 shader programs in my own copy of the game with --host-lanes 32-32: 1,221 of 2,582 compute programs emit DXIL for a 32-lane host (any wave size: 1,443). The remaining wave64 blockers there were "console wave64 lanes" (162) and "a wave64 group sharing LDS without barriers" (120); your #320/#439 take both to 0.
  • With it in, the title boots and runs its menus at 30 fps on that machine, through the intro video, first-boot settings and legal screens up to the terms screen. I haven't reached the world yet.
**@⁠465d6a0eac** on GitHub · 2026-11-24 16:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7137736023) · edited 2026-11-24 17:20 UTC Thank you for this, @⁠r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to [465d6a0eac/AgentRecompVI](https://github.com/465d6a0eac/AgentRecompVI), a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/29. It includes #223, which this pull request builds on. You're credited as the author there. This pull request stays the original. **Test results** - Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): `cargo clippy` (both variants) and `cargo test --workspace` pass (358 passed, 0 failed). - `victory translate` over the 26,148 shader programs in my own copy of the game with `--host-lanes 32-32`: 1,221 of 2,582 compute programs emit DXIL for a 32-lane host (any wave size: 1,443). The remaining wave64 blockers there were "console wave64 lanes" (162) and "a wave64 group sharing LDS without barriers" (120); your #320/#439 take both to 0. - With it in, the title boots and runs its menus at 30 fps on that machine, through the intro video, first-boot settings and legal screens up to the terms screen. I haven't reached the world yet.
Author
Owner

@⁠bvtterbroot on GitHub · 2026-11-24 17:54 UTC · original

AMD check at ededb1b (base ffe310e), on an RDNA3 and an RDNA2 GPU:

  • Windows 11, Rust 1.98.1. Radeon RX 7900 XTX (RDNA3, driver 32.0.32029.2010) and the Ryzen 7 7800X3D's iGPU (RDNA2, gfx1036, driver 32.0.21045.29003). I picked each as the hardware device of run_cases with a local adapter-selection patch that is not part of this PR. WARP runs in each pass as well.
  • cargo test -p victory-shader -p victory-gpu --locked: 186 passed, 0 failed, 2 ignored, on both GPUs. That includes its 14 new tests (console_flow_is_for_one_console_wave_per_group, console_lanes_translate_only_for_hosts_with_that_wave_size, dpp_row_masks_name_console_rows, exchanges_inside_a_branch_one_half_skips, first_lane_reads_are_the_console_waves, in_half_lane_reads_match_the_console_on_every_adapter, ...).

Synthetic tests only, no game files. Tested with AI assistance (Claude Code).

**@⁠bvtterbroot** on GitHub · 2026-11-24 17:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7139878092) AMD check at `ededb1b` (base `ffe310e`), on an RDNA3 and an RDNA2 GPU: - Windows 11, Rust 1.98.1. Radeon RX 7900 XTX (RDNA3, driver 32.0.32029.2010) and the Ryzen 7 7800X3D's iGPU (RDNA2, gfx1036, driver 32.0.21045.29003). I picked each as the hardware device of `run_cases` with a local adapter-selection patch that is not part of this PR. WARP runs in each pass as well. - `cargo test -p victory-shader -p victory-gpu --locked`: **186 passed, 0 failed**, 2 ignored, on both GPUs. That includes its 14 new tests (`console_flow_is_for_one_console_wave_per_group`, `console_lanes_translate_only_for_hosts_with_that_wave_size`, `dpp_row_masks_name_console_rows`, `exchanges_inside_a_branch_one_half_skips`, `first_lane_reads_are_the_console_waves`, `in_half_lane_reads_match_the_console_on_every_adapter`, ...). Synthetic tests only, no game files. _Tested with AI assistance (Claude Code)._
Author
Owner

@⁠justlovett0 on GitHub · 2026-11-24 18:12 UTC · original

Follow-up to the earlier hang report here. Re-stacked #233 on main ffe310e + the descriptor/copy-storm stack (#175/#994/#747/#302/#193/#704/#309/#953/#1067/#986/#1260/#1267/#1254/#1276), RTX 3080 10 GB / Win10 21H2 / driver 621.24:

  • #233 regressed to an early pre-cutscene TDR (~96 s, mesh-heavy 8-list submission, DEVICE_HUNG); the user saw no cutscene. Many wave64 computes were still refused (the console flow refuses per-lane-descriptor shaders), so the split was not clearing the class either.
  • Removing #233 restored a stable ~3.5-min world run.
  • #189's emulation (different technique — group-shared ballot exchange, not lane-splitting) is stable on the same hardware: ~9 min, 0 device removals, wave64 refusals 119 → 0.

This re-confirms the nvgpucomp64 AV + mesh TDR reported earlier and suggests emulation is the safer wave64 path on NVIDIA than the split. The split is parked locally pending the root-SRV / worker-stack fixes.

AI use: Qwen Code; local measurements, user-confirmed visuals.

**@⁠justlovett0** on GitHub · 2026-11-24 18:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7140322464) Follow-up to the earlier hang report here. Re-stacked #233 on main `ffe310e` + the descriptor/copy-storm stack (#175/#994/#747/#302/#193/#704/#309/#953/#1067/#986/#1260/#1267/#1254/#1276), RTX 3080 10 GB / Win10 21H2 / driver 621.24: - #233 regressed to an **early pre-cutscene TDR** (~96 s, mesh-heavy 8-list submission, `DEVICE_HUNG`); the user saw no cutscene. Many wave64 computes were *still* refused (the console flow refuses per-lane-descriptor shaders), so the split was not clearing the class either. - Removing #233 restored a stable ~3.5-min world run. - **#189's emulation** (different technique — group-shared ballot exchange, not lane-splitting) is **stable** on the same hardware: ~9 min, 0 device removals, wave64 refusals 119 → 0. This re-confirms the nvgpucomp64 AV + mesh TDR reported earlier and suggests emulation is the safer wave64 path on NVIDIA than the split. The split is parked locally pending the root-SRV / worker-stack fixes. AI use: Qwen Code; local measurements, user-confirmed visuals.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 18:14 UTC · original

@⁠justlovett0, thank you for rerunning on 621.24. I cannot reproduce a title hang here (no Ampere card, and the title is not launched on this machine), so what I can do is say what the stack's other runs show and ask for the two things that would separate the causes.

What the run shows and what it does not yet. With #233 the device hung at about 96 s in a mesh-heavy submission; without it the run was stable. That #233 makes the difference is clear. Which program hangs is not: the earlier report from this machine also ended in a mesh-heavy submission, and the culling compute programs this stack lets run are what give the mesh draws non-zero counts. Other runs see exactly that step (on an RTX 3070 and an RTX 4070, scenery reaches the G-buffer for the first time once the instance-culling programs run), and wave64 mesh programs hanging 32-lane NVIDIA cards is tracked in #71 and #778. So there are two readings: a compute program of this PR hangs the card, or this PR makes the title draw meshes it did not draw before and one of those hangs. They need different fixes.

What would tell them apart

  1. The slow host submission / device-removed line of the hung run with its pipeline list, and the DRED breadcrumb if the build had it: is the last operation a dispatch or a mesh draw, and which hashes.
  2. One run with #578 added (it refuses wave64 mesh programs on a 32-lane host), or with the mesh pipelines of that submission in VICTORY_SKIP_PIPELINES. If that run is stable with #233 in, the hang is the mesh class and not this PR's compute.

Two corrections to the picture, both checked here

  • "Many wave64 computes were still refused" is expected for #233 on its own: it is the bottom of the stack. Offline for a 32-lane host it stops 162 programs with console wave64 lanes on a host without 64-lane waves and 120 with a wave64 group sharing LDS without barriers; #320 and #439 take those. The run to compare with #189 is #439 (28aca3b), which contains #233.
  • The console flow's refusal of per-lane descriptor joins (added at b623fd3) stops no program in the shader pack: 0 at both a 32-lane and a 32-64 host, and @⁠supidooo's and @⁠Sil3ntGam3r's runs saw none either. The refusals you see with that wording, if any, would be worth their hashes.

For comparison on Ampere: an RTX 3070 on 621.14 ran #439 with #334 for about 10 minutes in the world without a removal (it was removed twice before #334, which clears the buffer-state errors of #548), and an RTX 3070 Ti Laptop hung at the first world dispatch of one compute program with #439, which is still open and the reason I take your report seriously. If your hung submission names a compute hash, that is the lead I most want.

No objection to #189 running where it runs well; the two take different programs, and the comparison is useful either way.

The title was not used in these tests. AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 18:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7140363137) @⁠justlovett0, thank you for rerunning on 621.24. I cannot reproduce a title hang here (no Ampere card, and the title is not launched on this machine), so what I can do is say what the stack's other runs show and ask for the two things that would separate the causes. **What the run shows and what it does not yet.** With #233 the device hung at about 96 s in a mesh-heavy submission; without it the run was stable. That #233 makes the difference is clear. Which program hangs is not: the earlier report from this machine also ended in a mesh-heavy submission, and the culling compute programs this stack lets run are what give the mesh draws non-zero counts. Other runs see exactly that step (on an RTX 3070 and an RTX 4070, scenery reaches the G-buffer for the first time once the instance-culling programs run), and wave64 *mesh* programs hanging 32-lane NVIDIA cards is tracked in #71 and #778. So there are two readings: a compute program of this PR hangs the card, or this PR makes the title draw meshes it did not draw before and one of those hangs. They need different fixes. **What would tell them apart** 1. The `slow host submission` / device-removed line of the hung run with its pipeline list, and the DRED breadcrumb if the build had it: is the last operation a dispatch or a mesh draw, and which hashes. 2. One run with #578 added (it refuses wave64 mesh programs on a 32-lane host), or with the mesh pipelines of that submission in `VICTORY_SKIP_PIPELINES`. If that run is stable with #233 in, the hang is the mesh class and not this PR's compute. **Two corrections to the picture, both checked here** - "Many wave64 computes were still refused" is expected for #233 on its own: it is the bottom of the stack. Offline for a 32-lane host it stops 162 programs with `console wave64 lanes on a host without 64-lane waves` and 120 with `a wave64 group sharing LDS without barriers`; #320 and #439 take those. The run to compare with #189 is #439 (`28aca3b`), which contains #233. - The console flow's refusal of per-lane descriptor joins (added at `b623fd3`) stops no program in the shader pack: 0 at both a 32-lane and a 32-64 host, and @⁠supidooo's and @⁠Sil3ntGam3r's runs saw none either. The refusals you see with that wording, if any, would be worth their hashes. **For comparison on Ampere:** an RTX 3070 on 621.14 ran #439 with #334 for about 10 minutes in the world without a removal (it was removed twice before #334, which clears the buffer-state errors of #548), and an RTX 3070 Ti Laptop hung at the first world dispatch of one compute program with #439, which is still open and the reason I take your report seriously. If your hung submission names a compute hash, that is the lead I most want. No objection to #189 running where it runs well; the two take different programs, and the comparison is useful either way. The title was not used in these tests. AI-assisted (Claude Code).
Author
Owner

@⁠adnanoos on GitHub · 2026-11-24 19:10 UTC · original

Combined with #160 (merged cleanly) on the same RTX 5060 Laptop GPU: 0 driver refusals and 1,229 compute pipelines, i.e. #233's +98 and #160's +10 with no overlap or losses. Every one of main's 320 refused programs is either created (98) or tagged wave64 by this PR (116 + 106 with LDS). Details and the per-program trace: #71

**@⁠adnanoos** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7141701392) Combined with #160 (merged cleanly) on the same RTX 5060 Laptop GPU: 0 driver refusals and 1,229 compute pipelines, i.e. #233's +98 and #160's +10 with no overlap or losses. Every one of main's 320 refused programs is either created (98) or tagged wave64 by this PR (116 + 106 with LDS). Details and the per-program trace: https://git.gtahub.st/github/Marvisak--VIctory/issues/71
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 19:35 UTC · original

An Ampere data point for the first reading (a compute program of this PR hangs the card), using synthetic programs only:

RTX 3070 8 GB, driver 616.56, Windows 11, #233 at ededb1b. cargo test -p victory-shader: 135 passed, 0 failed. All 10 split_tests take the console flow (split true) and are exact.

The construct most likely to deadlock is the loop where the halves leave at different iterations (loops_run_while_any_lane_of_the_console_wave_does: the lower half is done after 31 iterations, the upper half runs to 63, with a lane read across halves every iteration). That test dispatches 2 groups, so I also ran its program locally at full occupancy:

threads × groups lanes wrong time
64 × 8192 524,288 0 31 ms
48 × 8192 (partial upper half) 393,216 0 28–35 ms
64 × 65535 4,194,240 0 31 ms

No hang and no timeout. This doesn't rule out a specific program from the pack, or driver 621.24. It does make a deadlock in the halves' meeting itself less likely on Ampere, which fits the mesh reading (#71/#778). The DRED breadcrumb or the #578 run r4tedx asked for would still settle it.

No game files were used. AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 19:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7142321830) An Ampere data point for the first reading (a compute program of this PR hangs the card), using synthetic programs only: RTX 3070 8 GB, driver 616.56, Windows 11, #233 at `ededb1b`. `cargo test -p victory-shader`: 135 passed, 0 failed. All 10 `split_tests` take the console flow (`split true`) and are exact. The construct most likely to deadlock is the loop where the halves leave at different iterations (`loops_run_while_any_lane_of_the_console_wave_does`: the lower half is done after 31 iterations, the upper half runs to 63, with a lane read across halves every iteration). That test dispatches 2 groups, so I also ran its program locally at full occupancy: | threads × groups | lanes | wrong | time | |---|---|---|---| | 64 × 8192 | 524,288 | 0 | 31 ms | | 48 × 8192 (partial upper half) | 393,216 | 0 | 28–35 ms | | 64 × 65535 | 4,194,240 | 0 | 31 ms | No hang and no timeout. This doesn't rule out a specific program from the pack, or driver 621.24. It does make a deadlock in the halves' meeting itself less likely on Ampere, which fits the mesh reading (#71/#778). The DRED breadcrumb or the #578 run r4tedx asked for would still settle it. No game files were used. AI-assisted (Claude Code).
Author
Owner

@⁠Zmirzz on GitHub · 2026-11-24 19:41 UTC · original

Another 32-lane data point for this stack, on an NVIDIA GeForce RTX 5060 (Windows 11, 32-32 lanes): whole-corpus translate --pipelines over all 26,503 shaders.rpf containers gives 1,121 compute pipelines on main (ffe310e, 320 refused for WaveSize(64)) and 1,458 with the top of the stack (#1433 at b3efa1c), with no compute pipeline refused. Details and the lighting passes involved: #1433. No title run yet.

**@⁠Zmirzz** on GitHub · 2026-11-24 19:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7142448316) Another 32-lane data point for this stack, on an NVIDIA GeForce RTX 5060 (Windows 11, 32-32 lanes): whole-corpus `translate --pipelines` over all 26,503 `shaders.rpf` containers gives 1,121 compute pipelines on `main` (`ffe310e`, 320 refused for `WaveSize(64)`) and 1,458 with the top of the stack (#1433 at `b3efa1c`), with no compute pipeline refused. Details and the lighting passes involved: https://git.gtahub.st/github/Marvisak--VIctory/pulls/1433. No title run yet.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 20:57 UTC · original

A correction to my RTX 3070 note above, where I said the synthetic result "fits the mesh reading". A fork that runs this code in the world has since pinned its device loss on compute programs in this PR's console flow, not on mesh programs: fxceless/victory-gta6@e9765a7 (RTX 4070).

From its commit message and code comment:

  • the console-flow form "puts group barriers inside branches and loops";
  • runs 121–124 lost the card in a submission of two programs that had just moved to it: ptfx_CS_lightAtlas_Sprite and _Trail;
  • the fork now turns that form off unless VICTORY_WAVE_WIDE=1, keeping the barrier-free 32-lane form. It also adds the wave switches to the shader cache key: without them, a run with the form off was served translations cached by an earlier run with it on.

That answers @⁠r4tedx's question of which program hangs: it is this PR's compute programs, which fits @⁠justlovett0's RTX 3080 report. My synthetic tests (divergent loops, exchanges in branches one half skips, 4 M lanes) did not hang, so whatever makes the two halves reach a different number of barriers in those programs is not covered by the tests here yet. A program shape from the particle light atlas would be the test to write.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 20:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7144275867) A correction to my RTX 3070 note above, where I said the synthetic result "fits the mesh reading". A fork that runs this code in the world has since pinned its device loss on compute programs in this PR's console flow, not on mesh programs: [fxceless/victory-gta6@e9765a7](https://github.com/fxceless/victory-gta6/commit/e9765a73a68a75536b1c10ad5ef746d7f6ec0bcc) (RTX 4070). From its commit message and code comment: - the console-flow form "puts group barriers inside branches and loops"; - runs 121–124 lost the card in a submission of two programs that had just moved to it: `ptfx_CS_lightAtlas_Sprite` and `_Trail`; - the fork now turns that form off unless `VICTORY_WAVE_WIDE=1`, keeping the barrier-free 32-lane form. It also adds the wave switches to the shader cache key: without them, a run with the form off was served translations cached by an earlier run with it on. That answers @⁠r4tedx's question of which program hangs: it is this PR's compute programs, which fits @⁠justlovett0's RTX 3080 report. My synthetic tests (divergent loops, exchanges in branches one half skips, 4 M lanes) did not hang, so whatever makes the two halves reach a different number of barriers in those programs is not covered by the tests here yet. A program shape from the particle light atlas would be the test to write. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:22 UTC · original · edited 2026-11-26 07:21 UTC

Automated triage for the maintainers.

Needs work: needs the maintainer's decision. Thanks for the follow-up. Head 87d1f42 differs from the triaged df48a5e only by the placed_uav_tests.rs fix merged up from #223, and CI check now passes. The description is updated and no longer points to the removed doc.

What stays open is not something you can fix alone:

  • The branch carries #223's commits, so it lands after #223 (now a merge candidate) or together with it.
  • It overlaps #2176 and #2925, another way to run wave64 programs on 32-lane hosts. A maintainer needs to choose one approach.
  • The moved tests (19f6319, emit/lower/tests.rs) are most of the diff. Splitting the move into its own PR would make the translator change readable. Whether that's wanted is the maintainer's call, as you say.

The semantics are backed by hand-assembled tests run on 32-lane hardware (upipibi's RTX 3070 runs) and in-game A/Bs (GTX 1650, RTX 5090) with driver refusals going to 0.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7148439139) · edited 2026-11-26 07:21 UTC <!-- victory-triage v1 head=87d1f42316f2614fc187b4af92d8d3214b81b586 verdict=needs-work at=2026-11-26T07:21:13Z --> Automated triage for the maintainers. **Needs work: needs the maintainer's decision.** Thanks for the follow-up. Head `87d1f42` differs from the triaged `df48a5e` only by the `placed_uav_tests.rs` fix merged up from #223, and CI `check` now passes. The description is updated and no longer points to the removed doc. What stays open is not something you can fix alone: - The branch carries #223's commits, so it lands after #223 (now a merge candidate) or together with it. - It overlaps #2176 and #2925, another way to run wave64 programs on 32-lane hosts. A maintainer needs to choose one approach. - The moved tests (`19f6319`, `emit/lower/tests.rs`) are most of the diff. Splitting the move into its own PR would make the translator change readable. Whether that's wanted is the maintainer's call, as you say. The semantics are backed by hand-assembled tests run on 32-lane hardware (upipibi's RTX 3070 runs) and in-game A/Bs (GTX 1650, RTX 5090) with driver refusals going to 0. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠slatefield on GitHub · 2026-11-25 01:07 UTC · original

Rebased onto current main (4118f33) since it has the needs-rebase label: 11 of the 13 commits kept with authors and messages unchanged (the two Merge main commits are flattened by the rebase, their resolution content re-derived), 19 conflict hunks over 4 commits, main's newer ballots/lane_bit_of/helper-lane code and the waterfall arm kept where they touch the console flow. Windows-target workspace clippy clean both CI variants and on every commit individually, Linux tests green (shader 146), asset policy ok.

One thing worth reading in review: main's newer translate --cache warm path calls shader_cache::host_shader, so it now passes a target (device if one can be made, ANY otherwise). Without that, warm entries would be keyed ANY while a 32-lane run keys 32-32, and the warm cache would silently miss on exactly the hosts this PR is for.

It is open as #1929 so the maintainer can take a ready branch. If you would rather update this PR yourself, reset shader/wave64-console-flow to 090465839a007d20fc6509ae09386a9adfd5bd25 and I will close mine. The first commit is #223's plumbing, which this is stacked on; #578 (rebased separately as #1922) is the safety valve for the programs this one cannot run yet, and the two are meant to land together.

**@⁠slatefield** on GitHub · 2026-11-25 01:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7149235411) Rebased onto current `main` (`4118f33`) since it has the needs-rebase label: 11 of the 13 commits kept with authors and messages unchanged (the two `Merge main` commits are flattened by the rebase, their resolution content re-derived), 19 conflict hunks over 4 commits, main's newer ballots/`lane_bit_of`/helper-lane code and the waterfall arm kept where they touch the console flow. Windows-target workspace clippy clean both CI variants and on every commit individually, Linux tests green (shader 146), asset policy ok. One thing worth reading in review: main's newer `translate --cache` warm path calls `shader_cache::host_shader`, so it now passes a target (device if one can be made, `ANY` otherwise). Without that, warm entries would be keyed `ANY` while a 32-lane run keys `32-32`, and the warm cache would silently miss on exactly the hosts this PR is for. It is open as #1929 so the maintainer can take a ready branch. If you would rather update this PR yourself, reset `shader/wave64-console-flow` to `090465839a007d20fc6509ae09386a9adfd5bd25` and I will close mine. The first commit is #223's plumbing, which this is stacked on; #578 (rebased separately as #1922) is the safety valve for the programs this one cannot run yet, and the two are meant to land together.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 04:28 UTC · original

@⁠upipibi, @⁠justlovett0: thank you for following that through; the fork's commit named the programs, and that gave me something I could check. Here is what I found, what I am changing, and what is still open.

The two programs. ptfx_CS_lightAtlas_Sprite and _Trail are 2561af9577c47289 and c06aa62112ffba4c. Looked up in my offline listings (local title data, CPU only, 32-lane host):

  • On main neither runs: the translator stops both (a lane-mask join of an untracked mask).
  • On this stack (#439) both are emitted in the console flow in two 32-lane waves, with group barriers, and both modules fail DXIL validation: "Entry function performs some operation that is incompatible with the shader stage". They call sample, a sample with implicit derivatives, which has no valid form in a compute shader under the validator version these modules declare (#201; #180 gives it quad gradients). The runtime creates the pipeline anyway, the driver accepts it, and it runs.

So what the fork saw hang is not a valid module that deadlocked at a barrier. It is an invalid module, derivatives across a thread group that is also being stopped and restarted at group barriers inside loops and branches. I can believe a driver gets that wrong. I cannot prove it is the cause from here (no title run on this machine, and nothing may dispatch on its NVIDIA card at the moment), but the fit is close:

  • 12 compute programs in the pack have exactly this combination on a 32-lane host (fail validation with that message, group barriers, wave size 32): 2561af9577c47289 3e55d5ea47dbcfb1 58eaf4a171102e0a 5b2ce592c3a5dd09 a53a7977fe762268 a893b565f10994b2 be14e72d86362031 c06aa62112ffba4c c4183d3cbee28e8e cabb87599722e59a e4a9f58e3acfcf7b e8f6ae0597846841.
  • The two the fork lost its card in are among them. So is c4183d3cbee28e8e, the program @⁠justlovett0's first report tied to the nvgpucomp64.dll exception and the E_OUTOFMEMORY refusal on the RTX 3080.
  • None of the 12 runs on a 32-lane card with main: 5 are stopped by main's translator, and the other 7 are emitted for 64-lane waves, which the driver refuses. So this stack is what first put them on such a card.

The change. A compute program's implicit-derivative sample now stops the console flow in halves at translation, with its own reason (an implicit-derivative sample in the console flow on a host without 64-lane waves). Measured offline over the pack: exactly those 12 change, from "emitted, fails validation" to refused; compute emitted goes 1,420 → 1,408 and validated stays 1,385, so no program that validates is lost, and nothing is lost against main. It will be in #233 and up with the update to current main that the maintainer's triage asked for (in progress; I will post the heads). Until then, anyone running the current heads on a 32-lane card can keep those programs off it with VICTORY_SKIP_PIPELINES and the 12 hashes above; a run that still hangs with them skipped would tell me this is not the whole story.

What this does not explain. 42683eebec081520, where @⁠Ilokaxt's RTX 3070 Ti Laptop hung at its first world dispatch, is a module that validates, so the guard does not touch it, and that report stays open. @⁠upipibi's result (the divergent-loop program exact at 4 million lanes on an RTX 3070) and the other 30-series runs argue against barriers in loops being wrong as such; they do not rule out a specific program.

On "barriers inside branches and loops". That is what the console flow is: both halves of a console wave take every branch the same way (the branch is decided by the wave's exchanged ballot), so every thread of the group reaches each barrier the same number of times. The tests that cover it (loops lanes leave at different iterations, exchanges inside a branch one half skips, a partial upper half) pass on every card reported here. If a program exists where the halves disagree on a branch, that is a bug I want, and the hash is all I need to look at it offline.

@⁠slatefield, thank you for #1929; I am using your resolution as the reference for bringing #233 up to main and will say on #1929 which head to compare when it is pushed. This stack is updated by merging main in, not by rebasing, because testers quote its commit hashes.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-25 04:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7152882269) @⁠upipibi, @⁠justlovett0: thank you for following that through; the fork's commit named the programs, and that gave me something I could check. Here is what I found, what I am changing, and what is still open. **The two programs.** `ptfx_CS_lightAtlas_Sprite` and `_Trail` are `2561af9577c47289` and `c06aa62112ffba4c`. Looked up in my offline listings (local title data, CPU only, 32-lane host): - On `main` neither runs: the translator stops both (`a lane-mask join of an untracked mask`). - On this stack (#439) both are emitted in the console flow in two 32-lane waves, with group barriers, **and both modules fail DXIL validation**: "Entry function performs some operation that is incompatible with the shader stage". They call `sample`, a sample with implicit derivatives, which has no valid form in a compute shader under the validator version these modules declare (#201; #180 gives it quad gradients). The runtime creates the pipeline anyway, the driver accepts it, and it runs. So what the fork saw hang is not a valid module that deadlocked at a barrier. It is an invalid module, derivatives across a thread group that is also being stopped and restarted at group barriers inside loops and branches. I can believe a driver gets that wrong. I cannot prove it is the cause from here (no title run on this machine, and nothing may dispatch on its NVIDIA card at the moment), but the fit is close: - 12 compute programs in the pack have exactly this combination on a 32-lane host (fail validation with that message, group barriers, wave size 32): `2561af9577c47289 3e55d5ea47dbcfb1 58eaf4a171102e0a 5b2ce592c3a5dd09 a53a7977fe762268 a893b565f10994b2 be14e72d86362031 c06aa62112ffba4c c4183d3cbee28e8e cabb87599722e59a e4a9f58e3acfcf7b e8f6ae0597846841`. - The two the fork lost its card in are among them. So is `c4183d3cbee28e8e`, the program @⁠justlovett0's first report tied to the `nvgpucomp64.dll` exception and the `E_OUTOFMEMORY` refusal on the RTX 3080. - None of the 12 runs on a 32-lane card with `main`: 5 are stopped by `main`'s translator, and the other 7 are emitted for 64-lane waves, which the driver refuses. So this stack is what first put them on such a card. **The change.** A compute program's implicit-derivative sample now stops the console flow in halves at translation, with its own reason (`an implicit-derivative sample in the console flow on a host without 64-lane waves`). Measured offline over the pack: exactly those 12 change, from "emitted, fails validation" to refused; compute emitted goes 1,420 → 1,408 and validated stays 1,385, so no program that validates is lost, and nothing is lost against `main`. It will be in #233 and up with the update to current `main` that the maintainer's triage asked for (in progress; I will post the heads). Until then, anyone running the current heads on a 32-lane card can keep those programs off it with `VICTORY_SKIP_PIPELINES` and the 12 hashes above; a run that still hangs with them skipped would tell me this is not the whole story. **What this does not explain.** `42683eebec081520`, where @⁠Ilokaxt's RTX 3070 Ti Laptop hung at its first world dispatch, is a module that validates, so the guard does not touch it, and that report stays open. @⁠upipibi's result (the divergent-loop program exact at 4 million lanes on an RTX 3070) and the other 30-series runs argue against barriers in loops being wrong as such; they do not rule out a specific program. **On "barriers inside branches and loops".** That is what the console flow is: both halves of a console wave take every branch the same way (the branch is decided by the wave's exchanged ballot), so every thread of the group reaches each barrier the same number of times. The tests that cover it (loops lanes leave at different iterations, exchanges inside a branch one half skips, a partial upper half) pass on every card reported here. If a program exists where the halves disagree on a branch, that is a bug I want, and the hash is all I need to look at it offline. @⁠slatefield, thank you for #1929; I am using your resolution as the reference for bringing #233 up to `main` and will say on #1929 which head to compare when it is pushed. This stack is updated by merging `main` in, not by rebasing, because testers quote its commit hashes. AI-assisted (Claude Code).
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 07:08 UTC · original

Updated for the needs-rebase triage: main (940d32f) is merged in, head 7147671: a merge commit and three fixes on top, no rebase (testers quote this stack's hashes). @⁠slatefield, thank you for #1929; I used it as the reference for the conflicts, and you can compare it with this head and close or keep yours as you prefer.

Resolutions: main's waterfall and spilled-SGPR arms stay before the console arms; its helper-lane read, lane_bit_of, mask_number and heap clamps are untouched; emit retries the console flow and main's structure::killing as separate arms. One place I departed from #1929: there the split-form refusal in mask_dword sits before the console-flow branch, which refuses every mask read whole in the console flow (the console flow sets split); here the console ballot comes first.

Three fixes on top

  • 1e247b1: main's v_cndmask_b32 now takes masks held as numbers, which reached lane_bit in a wave64 program split in halves, where lanes 32-63 would test the low word (a debug assertion, or wrong bits without assertions). It is now a refusal by name. Test: selects_on_numeric_masks_are_refused_in_halves.
  • 1aade1f: a compute sample with implicit derivatives stops the console flow in halves (the hang report above: those modules fail validation and carry group barriers). Offline, exactly 12 programs change, none that validates. Test: implicit_samples_stop_the_console_flow_in_halves (CPU only; fails without the guard).
  • 7147671: a mask copied dword by dword made the console flow recurse until the stack overflowed, which ends the process. I reproduced it at this head and backported #439's guard and test (a_mask_copied_dword_by_dword_stops_instead_of_recursing).

Checks: both CI clippy commands clean. The victory-shader suite (265 passed, 0 failed, 3 ignored) ran on an AMD Radeon iGPU only, single-threaded, every adapter line naming the Radeon. Not run: the two-halves console flow on a 32-lane card. The Radeon runs 64-lane waves, the software renderer 4-lane ones, and the machine's NVIDIA card is off limits today. Covered instead: a differential of every test program's emitted module before and after the merge, identical apart from main's heap-index clamp. @⁠upipibi or anyone with a 32-lane card: cargo test -p victory-shader --lib split_tests lane_read_loop_tests -- --test-threads=1 on this head would close that gap.

Offline (local title data, CPU only, counts only; --host-lanes 32-32 --validate, program by program against main): 279 compute programs that main emits are refused here by name (160 console wave64 lanes on a host without 64-lane waves, 119 a wave64 group sharing LDS without barriers ...). On main all 279 declare 64-lane waves, which a 32-lane driver refuses anyway; #320 and #439 take them. Nothing else changes.

New in this head, for anyone running on a card with narrow waves: VICTORY_TEST_ADAPTERS=<part of a name> (or VICTORY_ADAPTER) keeps the every-adapter tests on that adapter, and VICTORY_WARP=1 keeps them off all hardware (d8921a5).

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-25 07:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7155539757) Updated for the needs-rebase triage: `main` (`940d32f`) is merged in, head **`7147671`**: a merge commit and three fixes on top, no rebase (testers quote this stack's hashes). @⁠slatefield, thank you for #1929; I used it as the reference for the conflicts, and you can compare it with this head and close or keep yours as you prefer. **Resolutions:** `main`'s waterfall and spilled-SGPR arms stay before the console arms; its helper-lane read, `lane_bit_of`, `mask_number` and heap clamps are untouched; `emit` retries the console flow and `main`'s `structure::killing` as separate arms. One place I departed from #1929: there the split-form refusal in `mask_dword` sits before the console-flow branch, which refuses every mask read whole in the console flow (the console flow sets `split`); here the console ballot comes first. **Three fixes on top** - `1e247b1`: `main`'s `v_cndmask_b32` now takes masks held as numbers, which reached `lane_bit` in a wave64 program split in halves, where lanes 32-63 would test the low word (a debug assertion, or wrong bits without assertions). It is now a refusal by name. Test: `selects_on_numeric_masks_are_refused_in_halves`. - `1aade1f`: a compute sample with implicit derivatives stops the console flow in halves (the hang report above: those modules fail validation and carry group barriers). Offline, exactly 12 programs change, none that validates. Test: `implicit_samples_stop_the_console_flow_in_halves` (CPU only; fails without the guard). - `7147671`: a mask copied dword by dword made the console flow recurse until the stack overflowed, which ends the process. I reproduced it at this head and backported #439's guard and test (`a_mask_copied_dword_by_dword_stops_instead_of_recursing`). **Checks:** both CI clippy commands clean. The `victory-shader` suite (265 passed, 0 failed, 3 ignored) ran on an AMD Radeon iGPU only, single-threaded, every adapter line naming the Radeon. **Not run:** the two-halves console flow on a 32-lane card. The Radeon runs 64-lane waves, the software renderer 4-lane ones, and the machine's NVIDIA card is off limits today. Covered instead: a differential of every test program's emitted module before and after the merge, identical apart from `main`'s heap-index clamp. @⁠upipibi or anyone with a 32-lane card: `cargo test -p victory-shader --lib split_tests lane_read_loop_tests -- --test-threads=1` on this head would close that gap. **Offline** (local title data, CPU only, counts only; `--host-lanes 32-32 --validate`, program by program against `main`): 279 compute programs that `main` emits are refused here by name (160 `console wave64 lanes on a host without 64-lane waves`, 119 `a wave64 group sharing LDS without barriers ...`). On `main` all 279 declare 64-lane waves, which a 32-lane driver refuses anyway; #320 and #439 take them. Nothing else changes. New in this head, for anyone running on a card with narrow waves: `VICTORY_TEST_ADAPTERS=<part of a name>` (or `VICTORY_ADAPTER`) keeps the every-adapter tests on that adapter, and `VICTORY_WARP=1` keeps them off all hardware (`d8921a5`). AI-assisted (Claude Code).
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 07:40 UTC · original

@⁠r4tedx Run on a 32-lane card as you asked: RTX 3070 (Ampere, driver 616.56, Windows 11), head 7147671, VICTORY_TEST_ADAPTERS=RTX so the every-adapter tests stay on the NVIDIA card. Command: cargo test -p victory-shader --lib split_tests lane_read_loop_tests -- --test-threads=1 (as -- split_tests lane_read_loop_tests --test-threads=1, since cargo takes one filter).

  • 12 passed, 0 failed, all in emit::split_tests, including lane_reads_cross_halves, masks_read_whole_count_both_halves, exchanges_inside_a_branch_one_half_skips, loops_run_while_any_lane_of_the_console_wave_does, saveexec_scc_tests_new_exec_not_saved_exec and selects_on_numeric_masks_are_refused_in_halves.
  • With --nocapture, in_half_lane_reads_match_the_console_on_every_adapter prints NVIDIA GeForce RTX 3070: 32 / 64 / 128 threads per group exact (split true), so the two-halves form did run on the 32-lane card.
  • lane_read_loop_tests matched no test at this head (grep -rn lane_read_loop crates/victory-shader/src finds nothing). If those tests live under another name, tell me and I'll run them.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-25 07:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7156132064) @⁠r4tedx Run on a 32-lane card as you asked: RTX 3070 (Ampere, driver 616.56, Windows 11), head `7147671`, `VICTORY_TEST_ADAPTERS=RTX` so the every-adapter tests stay on the NVIDIA card. Command: `cargo test -p victory-shader --lib split_tests lane_read_loop_tests -- --test-threads=1` (as `-- split_tests lane_read_loop_tests --test-threads=1`, since cargo takes one filter). - **12 passed, 0 failed**, all in `emit::split_tests`, including `lane_reads_cross_halves`, `masks_read_whole_count_both_halves`, `exchanges_inside_a_branch_one_half_skips`, `loops_run_while_any_lane_of_the_console_wave_does`, `saveexec_scc_tests_new_exec_not_saved_exec` and `selects_on_numeric_masks_are_refused_in_halves`. - With `--nocapture`, `in_half_lane_reads_match_the_console_on_every_adapter` prints `NVIDIA GeForce RTX 3070: 32 / 64 / 128 threads per group exact (split true)`, so the two-halves form did run on the 32-lane card. - `lane_read_loop_tests` matched no test at this head (`grep -rn lane_read_loop crates/victory-shader/src` finds nothing). If those tests live under another name, tell me and I'll run them. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 07:41 UTC · original

@⁠upipibi thank you, that is the run this PR was missing. 12 passed is every test in emit::split_tests at 7147671 (the file has 12 #[test]s there), and the 32 / 64 / 128 threads per group exact (split true) line shows the two-halves form ran on the 32-lane card.

You are right about lane_read_loop_tests: my mistake in the request. That file comes with #320, not with this PR. At #320's head eb12838 it holds one test, lane_reads_in_a_loop_lanes_leave_at_different_iterations, and split_tests has 15 there. If you have time for one more run, the same command at eb12838 (with VICTORY_TEST_ADAPTERS=RTX) covers both; --test-threads=1 as before.

The two-halves form now has a pass on a 32-lane card at this head. The other point of the triage, docs/wave64-on-wave32.md, is being cut down; I'll post the new head when it's pushed. Checked here only by reading the two heads' test files; no title data used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-25 07:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7156144880) @⁠upipibi thank you, that is the run this PR was missing. 12 passed is every test in `emit::split_tests` at `7147671` (the file has 12 `#[test]`s there), and the `32 / 64 / 128 threads per group exact (split true)` line shows the two-halves form ran on the 32-lane card. You are right about `lane_read_loop_tests`: my mistake in the request. That file comes with #320, not with this PR. At #320's head `eb12838` it holds one test, `lane_reads_in_a_loop_lanes_leave_at_different_iterations`, and `split_tests` has 15 there. If you have time for one more run, the same command at `eb12838` (with `VICTORY_TEST_ADAPTERS=RTX`) covers both; `--test-threads=1` as before. The two-halves form now has a pass on a 32-lane card at this head. The other point of the triage, `docs/wave64-on-wave32.md`, is being cut down; I'll post the new head when it's pushed. Checked here only by reading the two heads' test files; no title data used. AI-assisted
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 07:50 UTC · original

@⁠r4tedx #320 at eb12838, same card and setup (RTX 3070, driver 616.56, VICTORY_TEST_ADAPTERS=RTX), cargo test -p victory-shader --lib --locked -- split_tests lane_read_loop_tests --test-threads=1 --nocapture:

  • 16 passed, 0 failed: the 15 emit::split_tests and emit::lane_read_loop_tests::lane_reads_in_a_loop_lanes_leave_at_different_iterations.
  • The adapter lines all name the 3070. The split tests print 32 / 64 / 128 threads per group exact (split true) and DPP and v_readfirstlane, 64 threads exact (split true); the lane-read-loop test prints wave32 exact.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-25 07:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7156319485) @⁠r4tedx #320 at `eb12838`, same card and setup (RTX 3070, driver 616.56, `VICTORY_TEST_ADAPTERS=RTX`), `cargo test -p victory-shader --lib --locked -- split_tests lane_read_loop_tests --test-threads=1 --nocapture`: - **16 passed, 0 failed**: the 15 `emit::split_tests` and `emit::lane_read_loop_tests::lane_reads_in_a_loop_lanes_leave_at_different_iterations`. - The adapter lines all name the 3070. The split tests print `32 / 64 / 128 threads per group exact (split true)` and `DPP and v_readfirstlane, 64 threads exact (split true)`; the lane-read-loop test prints `wave32 exact`. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 07:51 UTC · original

@⁠upipibi thank you. 16 is the full set at #320's head eb12838: split_tests.rs has 15 #[test]s there and lane_read_loop_tests.rs has one. The wave32 exact line shows the loop test ran on the 32-lane card. #320 now has a pass on a 32-lane card at its current head too.

I checked this only by counting the tests in the two files at eb12838. No title data used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-25 07:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7156333741) @⁠upipibi thank you. 16 is the full set at #320's head `eb12838`: `split_tests.rs` has 15 `#[test]`s there and `lane_read_loop_tests.rs` has one. The `wave32 exact` line shows the loop test ran on the 32-lane card. #320 now has a pass on a 32-lane card at its current head too. I checked this only by counting the tests in the two files at `eb12838`. No title data used. AI-assisted
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 10:21 UTC · original

docs/wave64-on-wave32.md is removed in 691ff20; docs/architecture.md gets seven lines instead: eligible wave64 compute programs run as two 32-lane halves on a 32-lane host, a single-wave group can use the console's control flow with group-shared memory and barriers when the halves exchange masks or lane values, LDS and whole-wave sections can prevent splitting, and programs whose wave size the host cannot run are refused by name. The design notes stay in the PR description. main's wave-size warning fix from #223 is merged in. For the hardware point: upipibi's RTX 3070 run at 7147671 passed all 12 emit::split_tests with the two-halves form active (split true). The RTX 3070 Ti Laptop hang report is still not explained. AI-assisted.

**@⁠r4tedx** on GitHub · 2026-11-25 10:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7159589910) `docs/wave64-on-wave32.md` is removed in `691ff20`; `docs/architecture.md` gets seven lines instead: eligible wave64 compute programs run as two 32-lane halves on a 32-lane host, a single-wave group can use the console's control flow with group-shared memory and barriers when the halves exchange masks or lane values, LDS and whole-wave sections can prevent splitting, and programs whose wave size the host cannot run are refused by name. The design notes stay in the PR description. `main`'s wave-size warning fix from #223 is merged in. For the hardware point: upipibi's RTX 3070 run at `7147671` passed all 12 `emit::split_tests` with the two-halves form active (`split true`). The RTX 3070 Ti Laptop hang report is still not explained. AI-assisted.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 10:47 UTC · original

@⁠r4tedx Same command at the current head 691ff20 on the RTX 3070 (VICTORY_TEST_ADAPTERS=RTX): 12 passed, 0 failed, split_tests printing 32 / 64 / 128 threads per group exact (split true), the same as at 7147671.

**@⁠upipibi** on GitHub · 2026-11-25 10:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7160178678) @⁠r4tedx Same command at the current head `691ff20` on the RTX 3070 (`VICTORY_TEST_ADAPTERS=RTX`): **12 passed, 0 failed**, `split_tests` printing `32 / 64 / 128 threads per group exact (split true)`, the same as at `7147671`.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 10:49 UTC · original

@⁠upipibi thank you. 12 is every test in split_tests.rs at 691ff20 (the file has 12 #[test]s there). Over 7147671, 691ff20 changes the docs (docs/wave64-on-wave32.md removed, seven lines added to docs/architecture.md) and the spacing of one warning message in victory-gpu (merged up from #223), nothing in victory-shader, so matching your 7147671 result is what we expected.

I checked this only by counting the tests at 691ff20 and diffing the two commits. No title data used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-25 10:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7160228078) @⁠upipibi thank you. 12 is every test in `split_tests.rs` at `691ff20` (the file has 12 `#[test]`s there). Over `7147671`, `691ff20` changes the docs (`docs/wave64-on-wave32.md` removed, seven lines added to `docs/architecture.md`) and the spacing of one warning message in `victory-gpu` (merged up from #223), nothing in `victory-shader`, so matching your `7147671` result is what we expected. I checked this only by counting the tests at `691ff20` and diffing the two commits. No title data used. AI-assisted
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-25 14:37 UTC · original

In-game A/B on a GTX 1650 (Turing, 4 GB, 32-lane waves, driver 32.0.16.2124), diag build, --console series-s, same save and input, 18 min each. Base: 940d32f + #2016 #1775 #454 #1731 #1997. This PR at 691ff20.

base + this PR
pipelines refused by the driver 106 0
shaders that don't translate 11 61
device removed no no
in the world black HUD visible, scene still black

The 61 remaining: 34 × "console wave64 lanes on a host without 64-lane waves", 25 × "a wave64 group sharing LDS without barriers", and 2 others. One run each.

AI-assisted (Claude Code); measured on my own machine.

**@⁠crissuper20** on GitHub · 2026-11-25 14:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7165567352) In-game A/B on a GTX 1650 (Turing, 4 GB, 32-lane waves, driver 32.0.16.2124), diag build, `--console series-s`, same save and input, 18 min each. Base: `940d32f` + #2016 #1775 #454 #1731 #1997. This PR at `691ff20`. | | base | + this PR | |---|---:|---:| | pipelines refused by the driver | 106 | **0** | | shaders that don't translate | 11 | 61 | | device removed | no | no | | in the world | black | HUD visible, scene still black | The 61 remaining: 34 × "console wave64 lanes on a host without 64-lane waves", 25 × "a wave64 group sharing LDS without barriers", and 2 others. One run each. AI-assisted (Claude Code); measured on my own machine.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 14:40 UTC · original

@⁠crissuper20 thank you. It's the first in-game A/B of this PR on a 32-lane card, and it shows what the PR is meant to change.

  • 106 refused by the driver → 0: with #223 under it, a program whose wave size the host can't run is refused by name at translation, instead of reaching pipeline creation and being refused by the driver. That's why the "doesn't translate" count goes up: the programs are no longer silently missing.
  • The 61 that remain: both big reasons come from the same check (Lower::run in emit/lower.rs at 691ff20). Those programs have no form on a 32-lane host at this level yet.
    • The 25 × "a wave64 group sharing LDS without barriers" are the case #439 adds (one console wave sharing LDS, run in the console flow). Its head is 3fab5a19, stacked on #320, which is stacked on this PR. At that head, programs it still can't take give a more specific reason.
    • The 34 × "console wave64 lanes" include groups of more than one console wave. Those stay refused through #439 too; in our offline count that kind made up most of what #439 still refuses.
  • Scene still black: that matches main, where the world is drawn unlit. This PR isn't expected to change it.

If you have time for one more run, the same A/B at 3fab5a19 would show how many of the 25 LDS programs #439 brings in on Turing.

This reply is based on reading the code at the two heads only; no title data was used here.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-25 14:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7165645735) @⁠crissuper20 thank you. It's the first in-game A/B of this PR on a 32-lane card, and it shows what the PR is meant to change. - **106 refused by the driver → 0:** with #223 under it, a program whose wave size the host can't run is refused by name at translation, instead of reaching pipeline creation and being refused by the driver. That's why the "doesn't translate" count goes up: the programs are no longer silently missing. - **The 61 that remain:** both big reasons come from the same check (`Lower::run` in `emit/lower.rs` at `691ff20`). Those programs have no form on a 32-lane host at this level yet. - The **25 × "a wave64 group sharing LDS without barriers"** are the case #439 adds (one console wave sharing LDS, run in the console flow). Its head is `3fab5a19`, stacked on #320, which is stacked on this PR. At that head, programs it still can't take give a more specific reason. - The **34 × "console wave64 lanes"** include groups of more than one console wave. Those stay refused through #439 too; in our offline count that kind made up most of what #439 still refuses. - **Scene still black:** that matches `main`, where the world is drawn unlit. This PR isn't expected to change it. If you have time for one more run, the same A/B at `3fab5a19` would show how many of the 25 LDS programs #439 brings in on Turing. This reply is based on reading the code at the two heads only; no title data was used here. AI-assisted
Author
Owner

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

Tested 691ff20 (with #223) on an RTX 5090 (driver 620.73.04, 32-lane waves) under Linux: Wine 11.22, vkd3d-proton 3.1-83, diagnostics build.

Base: main at 13f91ca, plus #2723, #1129, the one-line #747 heap change, and a constant-table fix equivalent to #2143. The only conflict was in lower.rs; I resolved it the same way #2651 resolves #233 against main.

Pipelines on the 5090:

  • Without this PR, main emits 164 compute programs from a game run with WaveSize(64), and vkd3d-proton refuses all of them (Required WaveSize range [64, 64], but supported range is [32, 32], E_INVALIDARG).
  • With it, 33 of the 164 build a pipeline; the other 131 are now refused at translation, with a reason:
Refusal Programs
console wave64 lanes on a host without 64-lane waves (groups of more than 64 threads) 83
a wave64 group sharing LDS 44
an implicit-derivative sample in the console flow 4

Whole-pack census (26,084 programs):

  • With a 32–64 host range, the emitted lists are identical to main.
  • With 32–32, compute goes from 2,658 to 2,365 emitted. All 293 programs lost are ones main emitted with WaveSize(64), which a 32-lane host refuses anyway. Vertex, pixel and mesh are unchanged.

Barriers: I instrumented the translator over the whole shader pack and XboxBvhBuilder.dll. It made 168 console-flow lowerings with 9,066 swaps between halves, and none was emitted inside a per-lane guard. This matters on NVIDIA: a group barrier reached by only some lanes hangs the GPU (Xid 109), as I saw with #1433's multi-wave groups.

In game: two 7-minute runs, one cold cache and one warm, with no hang or fault. Dropped draws and dispatches without a host pipeline went from about 555–562 to 518 per frame. Frame time went from 630–670 ms to 570–600 ms.

Tests under Wine on the 5090: the 12 split tests pass with exact results. The remaining Wine failures (22 in victory-gpu, 4 in victory-shader) are the same list as on main.

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

**@⁠neonbyte1** on GitHub · 2026-11-25 22:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7176557439) Tested `691ff20` (with #223) on an RTX 5090 (driver 620.73.04, 32-lane waves) under Linux: Wine 11.22, vkd3d-proton 3.1-83, diagnostics build. Base: `main` at `13f91ca`, plus #2723, #1129, the one-line #747 heap change, and a constant-table fix equivalent to #2143. The only conflict was in `lower.rs`; I resolved it the same way #2651 resolves #233 against `main`. **Pipelines on the 5090:** - Without this PR, `main` emits 164 compute programs from a game run with `WaveSize(64)`, and vkd3d-proton refuses all of them (`Required WaveSize range [64, 64], but supported range is [32, 32]`, `E_INVALIDARG`). - With it, 33 of the 164 build a pipeline; the other 131 are now refused at translation, with a reason: | Refusal | Programs | |---|---:| | console wave64 lanes on a host without 64-lane waves (groups of more than 64 threads) | 83 | | a wave64 group sharing LDS | 44 | | an implicit-derivative sample in the console flow | 4 | **Whole-pack census (26,084 programs):** - With a 32–64 host range, the emitted lists are identical to `main`. - With 32–32, compute goes from 2,658 to 2,365 emitted. All 293 programs lost are ones `main` emitted with `WaveSize(64)`, which a 32-lane host refuses anyway. Vertex, pixel and mesh are unchanged. **Barriers:** I instrumented the translator over the whole shader pack and `XboxBvhBuilder.dll`. It made 168 console-flow lowerings with 9,066 swaps between halves, and none was emitted inside a per-lane guard. This matters on NVIDIA: a group barrier reached by only some lanes hangs the GPU (Xid 109), as I saw with #1433's multi-wave groups. **In game:** two 7-minute runs, one cold cache and one warm, with no hang or fault. Dropped draws and dispatches without a host pipeline went from about 555–562 to 518 per frame. Frame time went from 630–670 ms to 570–600 ms. **Tests under Wine on the 5090:** the 12 split tests pass with exact results. The remaining Wine failures (22 in `victory-gpu`, 4 in `victory-shader`) are the same list as on `main`. _AI-assisted (Claude); measured on my machine, no game data shared._
Author
Owner

@⁠r4tedx on GitHub · 2026-11-26 05:07 UTC · original

Merged current main (63bcca4) in, with no rebase or force-push. Head now 1c74ab4, and it merges cleanly with main. The PRs above (#320,#439) are merged from this head in turn. Details, conflict notes and the per-level checks are on #439 (policy ok, clippy clean, the WARP shader suite has only main's own 4 failures). This head also moves lower.rs's inline tests into emit/lower/tests.rs, unchanged, so lower.rs stays under the 512 KiB file-size limit with main merged in.

Synthetic tests only; no title data used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-26 05:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7183205459) Merged current `main` (`63bcca4`) in, with no rebase or force-push. Head now **`1c74ab4`**, and it merges cleanly with `main`. The PRs above (#320,#439) are merged from this head in turn. Details, conflict notes and the per-level checks are on #439 (policy ok, clippy clean, the WARP shader suite has only `main`'s own 4 failures). This head also moves lower.rs's inline tests into `emit/lower/tests.rs`, unchanged, so lower.rs stays under the 512 KiB file-size limit with `main` merged in. Synthetic tests only; no title data used. AI-assisted
Author
Owner

@⁠r4tedx on GitHub · 2026-11-26 05:14 UTC · original

Correction to my last comment: CI's clippy failed on the previous head. Main's view-mark draw test (crates/victory-gpu/src/draw.rs) builds emit::Options { view_marks: true } by hand, and this stack adds a target field to Options. My local clippy run left out the test targets, so I missed it. New head df48a5e8 has the fix merged up from #223: the test fills the remaining fields with ..Options::default(). Nothing else changed.

Verified on #223 0f6dec04 and #439 8a320556: cargo clippy --workspace --all-targets --locked -- -D warnings is clean, and cargo xtask policy passes. No title data was used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-26 05:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7183301956) Correction to my last comment: CI's clippy failed on the previous head. Main's view-mark draw test (`crates/victory-gpu/src/draw.rs`) builds `emit::Options { view_marks: true }` by hand, and this stack adds a `target` field to `Options`. My local clippy run left out the test targets, so I missed it. New head `df48a5e8` has the fix merged up from #223: the test fills the remaining fields with `..Options::default()`. Nothing else changed. Verified on #223 `0f6dec04` and #439 `8a320556`: `cargo clippy --workspace --all-targets --locked -- -D warnings` is clean, and `cargo xtask policy` passes. No title data was used. AI-assisted
Author
Owner

@⁠r4tedx on GitHub · 2026-11-26 05:18 UTC · original

Second follow-up: CI's diagnostics clippy (--all-features) found one more call from main that this stack's Target argument breaks. In crates/victory-gpu/src/pipeline/placed_uav_tests.rs:77, emit::emit was called with six arguments. New head 87d1f423 has the fix merged up from #223: the call passes emit::Target::ANY, the same default the other callers use.

Verified on #223 fbfd3c67 and #439 13be4c2c: both CI clippy commands are clean, cargo clippy --workspace --all-targets --locked -- -D warnings and the same command with --all-features. I didn't run the CI cargo test --workspace step on this PC, so CI will be the first to run it on this head. No title data was used.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-26 05:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7183373569) Second follow-up: CI's diagnostics clippy (`--all-features`) found one more call from main that this stack's `Target` argument breaks. In `crates/victory-gpu/src/pipeline/placed_uav_tests.rs:77`, `emit::emit` was called with six arguments. New head `87d1f423` has the fix merged up from #223: the call passes `emit::Target::ANY`, the same default the other callers use. Verified on #223 `fbfd3c67` and #439 `13be4c2c`: both CI clippy commands are clean, `cargo clippy --workspace --all-targets --locked -- -D warnings` and the same command with `--all-features`. I didn't run the CI `cargo test --workspace` step on this PC, so CI will be the first to run it on this head. No title data was used. AI-assisted
Author
Owner

@⁠r4tedx on GitHub · 2026-11-26 05:49 UTC · original

On the triage at df48a5e:

  • CI: check passed on the current head 87d1f423 (the placed-UAV test fix, see the comment above).
  • Description: the top note now names 87d1f423 and main 63bcca4, and the reference to the removed docs/wave64-on-wave32.md points to the summary in docs/architecture.md.
  • Merge order: yes, this is stacked on #223 and goes in after it (or together with it).
  • The test move (19f63196): it moves lower.rs's inline tests into emit/lower/tests.rs unchanged. I can open it as its own PR on main first if the maintainers prefer that; I'll wait for a yes before opening it.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-26 05:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7183840295) On the triage at `df48a5e`: - CI: `check` passed on the current head `87d1f423` (the placed-UAV test fix, see the comment above). - Description: the top note now names `87d1f423` and `main` `63bcca4`, and the reference to the removed `docs/wave64-on-wave32.md` points to the summary in `docs/architecture.md`. - Merge order: yes, this is stacked on #223 and goes in after it (or together with it). - The test move (`19f63196`): it moves lower.rs's inline tests into `emit/lower/tests.rs` unchanged. I can open it as its own PR on `main` first if the maintainers prefer that; I'll wait for a yes before opening it. AI-assisted
Author
Owner

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

I adapted the single-wave console control flow from this PR to the native Linux runtime's shared-memory emulation. The retry covers both console Wave32 and Wave64 with one logical wave per workgroup. It keeps EXEC on vector instructions and uses the whole logical wave to decide scalar branches.

On an eight-lane Lavapipe device, matching compute shader identities across two Series S loading runs showed 179 previously rejected shaders created host pipelines. All 419 previously working compute keys still created pipelines. The native shader suite passed 99 tests. The new readbacks cover inactive-lane sources, first-active-lane selection, and a loop that ends when its last lane finishes. Native test commit

Tested-on: Fedora Linux 45, Xeon E5-2670 v3, Mesa Lavapipe 26.2.7 with eight-lane subgroups, native VKD3D-Proton
Assisted-by: gpt-6.2 sol xhigh

**@⁠gmankab** on GitHub · 2026-11-26 07:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7185124561) I adapted the single-wave console control flow from this PR to the native Linux runtime's shared-memory emulation. The retry covers both console Wave32 and Wave64 with one logical wave per workgroup. It keeps EXEC on vector instructions and uses the whole logical wave to decide scalar branches. On an eight-lane Lavapipe device, matching compute shader identities across two Series S loading runs showed 179 previously rejected shaders created host pipelines. All 419 previously working compute keys still created pipelines. The native shader suite passed 99 tests. The new readbacks cover inactive-lane sources, first-active-lane selection, and a loop that ends when its last lane finishes. [Native test commit](https://github.com/gmankab/marvisak-victory/commit/36c0981edd1cd234394ea2720e5ab5eb4ec7cc7d) Tested-on: Fedora Linux 45, Xeon E5-2670 v3, Mesa Lavapipe 26.2.7 with eight-lane subgroups, native VKD3D-Proton Assisted-by: gpt-6.2 sol xhigh
This pull request can be merged automatically.
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/233/head:github-bot/gh-233'
git switch 'github-bot/gh-233'

Merge

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