GPU: refuse wave64 mesh and compute programs on hosts without 64-lane waves #578

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

@⁠wbkepler on GitHub · 2026-11-24 05:11 UTC · original
wbkepler:gpu/refuse-wave64-on-32-lane-hosts → main · +300 −5 · 3 files · 5 commits · open

What

On hosts whose waves have fewer than 64 lanes (NVIDIA: D3D12 WaveLaneCountMin = Max = 32, in-box WARP: 4), pipelines whose shaders require unsupported wave widths are refused early so their draws and dispatches are dropped instead of hanging the GPU or hitting driver E_INVALIDARG.

  • Host::wave_lanes(): queries (WaveLaneCountMin, WaveLaneCountMax) from D3D12_OPTIONS1 once (defaults to (32, 64) if the query fails, so nothing is refused). Logs both bounds at startup and explicitly calls out narrow/software adapters (max < 32, e.g. 4-lane WARP).
  • Shader::wave64(): whether the container's native program runs in 64-lane console waves (cached per container).
  • HostPipeline::new:
    • Refuses console wave64 mesh shaders before translation on < 64-lane hosts.
    • Inspects the emitted DXIL container's PSV0 runtime info (MinimumExpectedWaveLaneCount / MaximumExpectedWaveLaneCount) against the host's [min, max] range.
    • Allows wave64 compute shaders explicitly lowered to a supported PSV0 range (such as WaveSize(32) split emulation in #233/#439) on 32-lane hosts, while refusing console wave64 compute shaders that declare WaveSize(64) or no PSV0 wave-lane range on < 64-lane hosts (preventing unsized wave64 compute hangs while keeping per-lane wave32 compute and vertex/pixel shaders running).
    • Refuses wider-wave shaders on 4-lane WARP with an explicit warning mentioning narrow/WARP hosts; unconstrained per-lane wave32 shaders continue to run on WARP.

Why

On 32-lane NVIDIA hosts (RTX 3090 / 4060 Ti / 4070 SUPER / 4090 / 5070 Ti / 5090), world runs without this check hit DXGI_ERROR_DEVICE_HUNG (TDR) in wave64 mesh or wave64 compute dispatches. Refusing wave64 mesh and unsized/64-lane wave64 compute shaders on < 64-lane hosts serves as a safe default until translator-side fixes (wave64 compute splitting, descriptor/loop fixes) make those programs safe on 32-lane waves.

Tests

  • Unit tests in victory-gpu: emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds.
  • cargo clippy -p victory-gpu --all-targets, cargo clippy -p victory --features diagnostics --all-targets, cargo test -p victory-gpu, and cargo xtask policy pass.
**@⁠wbkepler** on GitHub · 2026-11-24 05:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/578) `wbkepler:gpu/refuse-wave64-on-32-lane-hosts` → `main` · +300 −5 · 3 files · 5 commits · open ## What On hosts whose waves have fewer than 64 lanes (NVIDIA: D3D12 `WaveLaneCountMin = Max = 32`, in-box WARP: `4`), pipelines whose shaders require unsupported wave widths are refused early so their draws and dispatches are dropped instead of hanging the GPU or hitting driver `E_INVALIDARG`. - `Host::wave_lanes()`: queries `(WaveLaneCountMin, WaveLaneCountMax)` from `D3D12_OPTIONS1` once (defaults to `(32, 64)` if the query fails, so nothing is refused). Logs both bounds at startup and explicitly calls out narrow/software adapters (`max < 32`, e.g. 4-lane WARP). - `Shader::wave64()`: whether the container's native program runs in 64-lane console waves (cached per container). - `HostPipeline::new`: - Refuses console `wave64` mesh shaders before translation on `< 64`-lane hosts. - Inspects the emitted DXIL container's `PSV0` runtime info (`MinimumExpectedWaveLaneCount` / `MaximumExpectedWaveLaneCount`) against the host's `[min, max]` range. - Allows wave64 compute shaders explicitly lowered to a supported `PSV0` range (such as `WaveSize(32)` split emulation in `#233`/`#439`) on 32-lane hosts, while refusing console `wave64` compute shaders that declare `WaveSize(64)` or no `PSV0` wave-lane range on `< 64`-lane hosts (preventing unsized wave64 compute hangs while keeping per-lane wave32 compute and vertex/pixel shaders running). - Refuses wider-wave shaders on 4-lane WARP with an explicit warning mentioning narrow/WARP hosts; unconstrained per-lane wave32 shaders continue to run on WARP. ## Why On 32-lane NVIDIA hosts (RTX 3090 / 4060 Ti / 4070 SUPER / 4090 / 5070 Ti / 5090), world runs without this check hit `DXGI_ERROR_DEVICE_HUNG` (TDR) in wave64 mesh or wave64 compute dispatches. Refusing wave64 mesh and unsized/64-lane wave64 compute shaders on `< 64`-lane hosts serves as a safe default until translator-side fixes (wave64 compute splitting, descriptor/loop fixes) make those programs safe on 32-lane waves. ## Tests - Unit tests in `victory-gpu`: `emitted_wave_size_checked_against_host_range` and `dxil_wave_lanes_reads_psv0_bounds`. - `cargo clippy -p victory-gpu --all-targets`, `cargo clippy -p victory --features diagnostics --all-targets`, `cargo test -p victory-gpu`, and `cargo xtask policy` pass.
A console mesh or compute program written for 64-lane waves reads lanes
and wave-wide masks as the 64-lane wave has them. Run as 32-lane waves
(NVIDIA's D3D12 range is 32..32) such programs hang the GPU in the world:
the device is removed as hung after a 2 s timeout, at a dispatch of one
of them, every run. Their pipelines are now refused there, so their draws
and dispatches are dropped instead of hanging the host.

Vertex and pixel programs run per lane and are kept; hosts with 64-lane
waves are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Console wave64 compute programs whose emitted DXIL declares no PSV0
wave-lane range (or an upper bound wider than the host) can still rely
on 64-lane wave semantics and hang 32-lane hosts.

On hosts with max wave lanes < 64, refuse console wave64 compute
programs unless the emitted DXIL PSV0 explicitly bounds the wave size
within the host's supported range (max_lanes <= host_max), preserving
Wave32-split compute translations (PSV0 WaveSize(32)) and 64-lane hosts
while refusing unconstrained wave64 compute like wave64 mesh.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:09:03 +00:00
Author
Owner

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

Tested 07508ab (on main d2a4bae) on another 32-lane NVIDIA host.

Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 x86_64-pc-windows-msvc, debug.

What the adapters report. From a throwaway test (not pushed) calling host().wave_lanes_max() and CheckFeatureSupport(D3D12_OPTIONS1) on each adapter:

adapter WaveLaneCountMin WaveLaneCountMax
RTX 3060 32 32
WARP (Microsoft Basic Render Driver) 4 4

host().wave_lanes_max() returns 32 here, so the refusal applies to this GPU as intended.

One question, about WARP. With VICTORY_D3D12_WARP=1 the host reports 4 lanes, so every wave64 mesh and compute program is refused there as well, on AMD hosts too. The README points to WARP as the way to look further in the world, and WARP is also the one device that can't hang the driver, which is this PR's reason for refusing. Should the refusal be limited to hardware adapters, or is it intended on WARP (if those programs are also wrong on 4-lane waves)? Either way, a note in the refusal message or the README would help, since a WARP run would otherwise lose those draws and dispatches without the reason being obvious.

Tested

  • cargo test --locked -p victory-gpu --lib: 44 passed, 0 failed, 1 ignored, including wave64_mesh_and_compute_need_64_lane_hosts
  • cargo test --locked --workspace: 265 passed, 0 failed, 4 ignored
  • cargo build -p victory --features diagnostics: builds
  • cargo xtask policy: 151 files ok; git diff --check: clean
  • clippy and cargo fmt --check show the same as main (host.rs:267 safety comment; the same per-file fmt counts), nothing new
  • Checked that the stage names match: needs_wave64 compares against "mesh"/"compute", which are the names pipeline.rs gives these shaders.

Not tested: the world, or any title pipeline (no game data); whether the refused programs hang this GPU too.

AI-assisted (Claude Code) ran the checks and drafted this comment.

**@⁠fromthemoonx** on GitHub · 2026-11-24 05:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7123154258) Tested `07508ab` (on `main` `d2a4bae`) on another 32-lane NVIDIA host. **Environment:** Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 `x86_64-pc-windows-msvc`, debug. **What the adapters report.** From a throwaway test (not pushed) calling `host().wave_lanes_max()` and `CheckFeatureSupport(D3D12_OPTIONS1)` on each adapter: | adapter | `WaveLaneCountMin` | `WaveLaneCountMax` | |---|---|---| | RTX 3060 | 32 | 32 | | WARP (Microsoft Basic Render Driver) | **4** | **4** | `host().wave_lanes_max()` returns 32 here, so the refusal applies to this GPU as intended. **One question, about WARP.** With `VICTORY_D3D12_WARP=1` the host reports 4 lanes, so every wave64 mesh and compute program is refused there as well, on AMD hosts too. The README points to WARP as the way to look further in the world, and WARP is also the one device that can't hang the driver, which is this PR's reason for refusing. Should the refusal be limited to hardware adapters, or is it intended on WARP (if those programs are also wrong on 4-lane waves)? Either way, a note in the refusal message or the README would help, since a WARP run would otherwise lose those draws and dispatches without the reason being obvious. **Tested** - `cargo test --locked -p victory-gpu --lib`: 44 passed, 0 failed, 1 ignored, including `wave64_mesh_and_compute_need_64_lane_hosts` - `cargo test --locked --workspace`: 265 passed, 0 failed, 4 ignored - `cargo build -p victory --features diagnostics`: builds - `cargo xtask policy`: 151 files ok; `git diff --check`: clean - clippy and `cargo fmt --check` show the same as `main` (`host.rs:267` safety comment; the same per-file fmt counts), nothing new - Checked that the stage names match: `needs_wave64` compares against `"mesh"`/`"compute"`, which are the names `pipeline.rs` gives these shaders. **Not tested:** the world, or any title pipeline (no game data); whether the refused programs hang this GPU too. AI-assisted (Claude Code) ran the checks and drafted this comment.
Author
Owner

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

From the side of the wave64 stack (#223 / #233 / #320 / #439, which I maintain), since this PR and that stack decide the same thing for compute on these hosts. Thank you for the runs: a hang at a console-flow dispatch is exactly the report that stack needs. Three points.

1. Which compute programs were running "as 32-lane waves". On main, a wave64 compute program that needs the console's lanes (reads other lanes, reads a mask as a number, shares LDS inside one wave) declares WaveSize(64), and NVIDIA refuses its pipeline with E_INVALIDARG (#468; reproduced on an RTX 4070 SUPER). So without #233 or a similar PR in the build, the wave64 compute programs that do run there are the ones translated per lane, whose results do not depend on the host's wave size. If your "without #233" build had none of #189 / #192 / #116 either, the compute dispatch that hung after about 2 min was such a program, and for it the wave size is probably not the cause. Which of those were in that build?

2. A measurement on how a correct form can still hang. The stack's forms are lane-by-lane exact on hardware for hand-assembled programs (RTX 5070 here; others ran them on an RTX 4070 SUPER, an RTX 5080 and an RTX 5090). That is correctness on synthetic input. It does not say a title program meets its loop exits on the data it is given, and when earlier passes are dropped that data is not what the console had. Translated loops are cut after 2^20 iterations per entry. I timed a synthetic console-flow loop on an RTX 5070 (driver 621.24), 8 groups of 64 threads, an empty body and one exchange between the halves per iteration:

iterations time over a 1-iteration dispatch
65,536 about 5 ms
262,144 about 14 ms
1,048,575 about 53 ms
4,000,000 (cut by the limit) about 49 ms

So an empty loop that runs to the limit costs about 6 ms per group. Alone that is far from 2 s, but the limit is per entry, so a loop nested in another, or one with buffer reads in its body, gets there. The runs in #71 that stayed in the world for 7 to 14 min with VICTORY_SHADER_LOOP_LIMIT=32 (RTX 5080, RTX 3080, RTX 3070) point the same way, though those builds differ in other PRs too. This is a hypothesis from one card and a trivial loop body, not a diagnosis.

For the dispatch you have (8x1x1, wave64, v_readfirstlane), these would settle it without any shader content: its container hash, its thread-group size, whether it has a loop inside a loop, and whether the same build still hangs there with VICTORY_SHADER_LOOP_LIMIT=32. If it hangs with no loop at all, that is a defect in the console flow and I will take it as one.

3. How the two PRs fit. As written, the refusal goes by the console program's wave size, so with both merged every compute program the stack translates is refused before it runs. With the stack, no compute program reaches the driver in a form that needs 64 lanes: it is split (the module declares WaveSize(32)), or translated per lane, or stopped at translation with a reason. A compute test on the emitted module's wave size against the host's range would keep your default for everything else. If you would rather refuse all of it until the hang is explained, that is a fair default too; an opt-out next to #579's switch would keep the stack measurable. I will do the rebase on my side whichever lands first. The mesh half of this PR is outside the stack and I have nothing against it.

Synthetic programs only on my side; no title data. AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 05:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7123272096) From the side of the wave64 stack (#223 / #233 / #320 / #439, which I maintain), since this PR and that stack decide the same thing for compute on these hosts. Thank you for the runs: a hang at a console-flow dispatch is exactly the report that stack needs. Three points. **1. Which compute programs were running "as 32-lane waves".** On `main`, a wave64 compute program that needs the console's lanes (reads other lanes, reads a mask as a number, shares LDS inside one wave) declares `WaveSize(64)`, and NVIDIA refuses its pipeline with `E_INVALIDARG` (#468; [reproduced on an RTX 4070 SUPER](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233)). So without #233 or a similar PR in the build, the wave64 compute programs that do run there are the ones translated per lane, whose results do not depend on the host's wave size. If your "without #233" build had none of #189 / #192 / #116 either, the compute dispatch that hung after about 2 min was such a program, and for it the wave size is probably not the cause. Which of those were in that build? **2. A measurement on how a correct form can still hang.** The stack's forms are lane-by-lane exact on hardware for hand-assembled programs (RTX 5070 here; others ran them on an [RTX 4070 SUPER](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233), an [RTX 5080](https://git.gtahub.st/github/Marvisak--VIctory/pulls/320) and an [RTX 5090](https://git.gtahub.st/github/Marvisak--VIctory/pulls/180)). That is correctness on synthetic input. It does not say a title program meets its loop exits on the data it is given, and when earlier passes are dropped that data is not what the console had. Translated loops are cut after 2^20 iterations per entry. I timed a synthetic console-flow loop on an RTX 5070 (driver 621.24), 8 groups of 64 threads, an empty body and one exchange between the halves per iteration: | iterations | time over a 1-iteration dispatch | |---|---| | 65,536 | about 5 ms | | 262,144 | about 14 ms | | 1,048,575 | about 53 ms | | 4,000,000 (cut by the limit) | about 49 ms | So an empty loop that runs to the limit costs about 6 ms per group. Alone that is far from 2 s, but the limit is per entry, so a loop nested in another, or one with buffer reads in its body, gets there. The runs in #71 that stayed in the world for 7 to 14 min with `VICTORY_SHADER_LOOP_LIMIT=32` ([RTX 5080](https://git.gtahub.st/github/Marvisak--VIctory/issues/71), [RTX 3080](https://git.gtahub.st/github/Marvisak--VIctory/issues/71), [RTX 3070](https://git.gtahub.st/github/Marvisak--VIctory/issues/71)) point the same way, though those builds differ in other PRs too. This is a hypothesis from one card and a trivial loop body, not a diagnosis. For the dispatch you have (8x1x1, wave64, `v_readfirstlane`), these would settle it without any shader content: its container hash, its thread-group size, whether it has a loop inside a loop, and whether the same build still hangs there with `VICTORY_SHADER_LOOP_LIMIT=32`. If it hangs with no loop at all, that is a defect in the console flow and I will take it as one. **3. How the two PRs fit.** As written, the refusal goes by the console program's wave size, so with both merged every compute program the stack translates is refused before it runs. With the stack, no compute program reaches the driver in a form that needs 64 lanes: it is split (the module declares `WaveSize(32)`), or translated per lane, or stopped at translation with a reason. A compute test on the emitted module's wave size against the host's range would keep your default for everything else. If you would rather refuse all of it until the hang is explained, that is a fair default too; an opt-out next to #579's switch would keep the stack measurable. I will do the rebase on my side whichever lands first. The mesh half of this PR is outside the stack and I have nothing against it. Synthetic programs only on my side; no title data. AI-assisted (Claude Code).
Author
Owner

@⁠Nixitov on GitHub · 2026-11-24 06:09 UTC · original

RTX 5070, native Windows D3D12 — confirms the wave64 part here, and there is a remaining wave32 compute hang.

Setup: Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818; cargo build --release -p victory at d2a4bae + #581 + this PR (nothing else except #636's one-line policy change). Host reports host wave lanes at most lanes=32, and the run logs the refusal: no host pipeline: a mesh or compute program written for 64-lane waves, on a host without them.

build where it ends
d2a4bae + #581 submission of 11 lists takes 10.97 s; device removed (0x887A0006 after 0x887A0004), before a numbered world frame
+ this PR world runs at 4.8-5.0 fps, 256-300 draws/frame, past frame 1024; ends after ~2.5 min in the world

So the wave64 mesh/compute part holds on this card too.

Remaining hang with this PR: a 1-list submission of 12 compute pipelines takes 11.34 s and the device goes away, again 0x887A0006. Those programs are not refused by this PR, so on this run they are wave32:

010a50ce68d02c16, 1ea7e2dbf731c8dc, 25c5ee5063e1a41f, 5b6eed17c131f881, 5da83868971acee9, 8080af82aaac33df, 9aa3629668b8e7ab, a68c4b8fc7bc4b5c, ae83305f523f4b1b, e35b7de6a9d2bfd4, ee26678cdf63cf32, f5f5e06abea6e83a.

They were first bound at frames 1504-1518, and the hang is at ~06:08:18 after the last frame log at 06:08:04. Not breadcrumbed (release build, no DRED). If a wave32 run is expected to survive, these hashes are the next thing to look at; I can rerun with the diagnostics build and DRED if that helps.

No game files are included; only log lines and shader hashes.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠Nixitov** on GitHub · 2026-11-24 06:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7123642713) RTX 5070, native Windows D3D12 — confirms the wave64 part here, and there is a remaining wave32 compute hang. **Setup:** Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818; `cargo build --release -p victory` at `d2a4bae` + #581 + this PR (nothing else except #636's one-line policy change). Host reports `host wave lanes at most lanes=32`, and the run logs the refusal: `no host pipeline: a mesh or compute program written for 64-lane waves, on a host without them`. | build | where it ends | |---|---| | `d2a4bae` + #581 | submission of 11 lists takes 10.97 s; device removed (`0x887A0006` after `0x887A0004`), before a numbered world frame | | + this PR | world runs at **4.8-5.0 fps, 256-300 draws/frame**, past frame 1024; ends after ~2.5 min in the world | So the wave64 mesh/compute part holds on this card too. **Remaining hang with this PR:** a **1-list submission of 12 compute pipelines** takes 11.34 s and the device goes away, again `0x887A0006`. Those programs are not refused by this PR, so on this run they are wave32: `010a50ce68d02c16`, `1ea7e2dbf731c8dc`, `25c5ee5063e1a41f`, `5b6eed17c131f881`, `5da83868971acee9`, `8080af82aaac33df`, `9aa3629668b8e7ab`, `a68c4b8fc7bc4b5c`, `ae83305f523f4b1b`, `e35b7de6a9d2bfd4`, `ee26678cdf63cf32`, `f5f5e06abea6e83a`. They were first bound at frames 1504-1518, and the hang is at ~06:08:18 after the last frame log at 06:08:04. Not breadcrumbed (release build, no DRED). If a wave32 run is expected to survive, these hashes are the next thing to look at; I can rerun with the diagnostics build and DRED if that helps. No game files are included; only log lines and shader hashes. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

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

A data point for the compute half of this PR, from a tester's run posted on #439: #439

On an RTX 5080, main + #493 #483 #89 #205 #206 #469 #459 #454 with the wave64 stack (#439 at f653ea4) and VICTORY_SHADER_LOOP_LIMIT=32 ran 7 minutes, about 6 in the world, with no device removal, 0 pipelines refused, and wave64 compute running in the split forms. The same set with #189 in the stack's place also stayed up. In the dumped frame the G-buffer is 67.9% covered with coherent geometry on the stack's build against 10.5% on the other.

So on that card wave64 compute in those forms does not hang the device when the loop limit is 32, which fits the loop-limit reading above and is one run, not a proof. It suggests the compute refusal here would cost geometry on NVIDIA once those forms are in, and that a lower default loop limit may be the safer guard for compute. The default limit with the stack is still untested in the world, and your 8x1x1 dispatch is still the one concrete counter-example, so its hash and group size would still help.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 06:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7123843066) A data point for the compute half of this PR, from a tester's run posted on #439: https://git.gtahub.st/github/Marvisak--VIctory/pulls/439 On an RTX 5080, `main` + #493 #483 #89 #205 #206 #469 #459 #454 with the wave64 stack (#439 at `f653ea4`) and `VICTORY_SHADER_LOOP_LIMIT=32` ran 7 minutes, about 6 in the world, with no device removal, 0 pipelines refused, and wave64 compute running in the split forms. The same set with #189 in the stack's place also stayed up. In the dumped frame the G-buffer is 67.9% covered with coherent geometry on the stack's build against 10.5% on the other. So on that card wave64 compute in those forms does not hang the device when the loop limit is 32, which fits the loop-limit reading [above](https://git.gtahub.st/github/Marvisak--VIctory/pulls/578) and is one run, not a proof. It suggests the compute refusal here would cost geometry on NVIDIA once those forms are in, and that a lower default loop limit may be the safer guard for compute. The default limit with the stack is still untested in the world, and your 8x1x1 dispatch is still the one concrete counter-example, so its hash and group size would still help. AI-assisted (Claude Code).
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 06:58 UTC · original

Thanks @⁠fromthemoonx, @⁠r4tedx, and @⁠Nixitov for the feedback and test data — pushed a follow-up commit addressing both design points:

  1. Emitted DXIL PSV0 wave-lane check (for @⁠r4tedx):
    • Host::wave_lanes() now queries the full (WaveLaneCountMin, WaveLaneCountMax) range from D3D12_FEATURE_D3D12_OPTIONS1 instead of only WaveLaneCountMax.
    • For compute (and vertex/pixel) stages, HostPipeline::new now inspects the emitted DXIL container's PSV0 runtime info (MinimumExpectedWaveLaneCount / MaximumExpectedWaveLaneCount) against the host's [min, max] range rather than unconditionally refusing every console-wave64 compute program.
    • This keeps the default refusal for modules that emit WaveSize(64) on 32-lane hosts, while allowing per-lane translations (unconstrained PSV0) and the wave64 compute stack (#223/#233/#320/#439, which emits WaveSize(32)) to run cleanly on 32-lane hosts with zero conflict.
    • Console wave64 mesh shaders do not emit PSV0 WaveSize(64) metadata and remain refused early on < 64-lane hosts.
    • (Re: the 8x1x1 v_readfirstlane hang shader details you asked for: I don't have the local title shader dumps in this environment to pull its hash / loop structure, so I'll leave that follow-up to whoever has the capture.)
  2. Explicit WARP 4-lane logging (for @⁠fromthemoonx):
    • Refusal on WARP (WaveLaneCountMin = WaveLaneCountMax = 4) is intentional for shaders that require wider waves (both wave64 mesh and compute modules emitting WaveSize(32)/WaveSize(64) — note that per-lane unconstrained compute shaders still run on WARP!).
    • Host::wave_lanes() now logs both min and max and explicitly calls out narrow/software adapters (max < 32) at startup, and the refusal warning explicitly notes (e.g. 4-lane WARP) when host_lanes.1 < 32 so WARP runs never silently lose draws/dispatches without an obvious reason.
  3. For @⁠Nixitov:
    • Thanks for confirming the wave64 refusal on RTX 5070 and sharing the 12 remaining wave32 compute hashes (010a50ce... etc.). A diagnostics build run with VICTORY_D3D12_DRED=1 (and optionally checking VICTORY_SHADER_LOOP_LIMIT=32 as @⁠r4tedx noted) would definitely help narrow which of those 12 dispatches is timing out the driver — a separate issue from wave64 refusal.

Verified: cargo clippy -p victory-gpu --all-targets (0 new warnings), cargo test -p victory-gpu --lib (including emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds), and cargo xtask policy (151 files ok).

**@⁠wbkepler** on GitHub · 2026-11-24 06:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7124486500) Thanks @⁠fromthemoonx, @⁠r4tedx, and @⁠Nixitov for the feedback and test data — pushed a follow-up commit addressing both design points: 1. **Emitted DXIL `PSV0` wave-lane check (for @⁠r4tedx)**: - `Host::wave_lanes()` now queries the full `(WaveLaneCountMin, WaveLaneCountMax)` range from `D3D12_FEATURE_D3D12_OPTIONS1` instead of only `WaveLaneCountMax`. - For compute (and vertex/pixel) stages, `HostPipeline::new` now inspects the **emitted DXIL container's `PSV0` runtime info** (`MinimumExpectedWaveLaneCount` / `MaximumExpectedWaveLaneCount`) against the host's `[min, max]` range rather than unconditionally refusing every console-`wave64` compute program. - This keeps the default refusal for modules that emit `WaveSize(64)` on 32-lane hosts, while allowing per-lane translations (unconstrained `PSV0`) and the wave64 compute stack (`#223`/`#233`/`#320`/`#439`, which emits `WaveSize(32)`) to run cleanly on 32-lane hosts with zero conflict. - Console `wave64` mesh shaders do not emit `PSV0` `WaveSize(64)` metadata and remain refused early on `< 64`-lane hosts. - (Re: the 8x1x1 `v_readfirstlane` hang shader details you asked for: I don't have the local title shader dumps in this environment to pull its hash / loop structure, so I'll leave that follow-up to whoever has the capture.) 2. **Explicit WARP 4-lane logging (for @⁠fromthemoonx)**: - Refusal on WARP (`WaveLaneCountMin = WaveLaneCountMax = 4`) is intentional for shaders that require wider waves (both wave64 mesh and compute modules emitting `WaveSize(32)`/`WaveSize(64)` — note that per-lane unconstrained compute shaders still run on WARP!). - `Host::wave_lanes()` now logs both `min` and `max` and explicitly calls out narrow/software adapters (`max < 32`) at startup, and the refusal warning explicitly notes `(e.g. 4-lane WARP)` when `host_lanes.1 < 32` so WARP runs never silently lose draws/dispatches without an obvious reason. 3. **For @⁠Nixitov**: - Thanks for confirming the wave64 refusal on RTX 5070 and sharing the 12 remaining wave32 compute hashes (`010a50ce...` etc.). A diagnostics build run with `VICTORY_D3D12_DRED=1` (and optionally checking `VICTORY_SHADER_LOOP_LIMIT=32` as @⁠r4tedx noted) would definitely help narrow which of those 12 dispatches is timing out the driver — a separate issue from wave64 refusal. Verified: `cargo clippy -p victory-gpu --all-targets` (0 new warnings), `cargo test -p victory-gpu --lib` (including `emitted_wave_size_checked_against_host_range` and `dxil_wave_lanes_reads_psv0_bounds`), and `cargo xtask policy` (151 files ok).
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 07:10 UTC · original

Thanks. Re-tested d2d26d1 on the same RTX 3060 machine, including what WARP does with the emitted wave sizes.

What the emitter puts in PSV0, and what each adapter accepts. A throwaway test (not pushed) built two one-thread wave32 programs with build_valu_cs, read PSV0's lane range at the offsets dxil_wave_lanes uses, and called compute_pipeline on each adapter:

program PSV0 lanes RTX 3060 WARP
v_mov_b32 (per lane) 0, 0xffffffff (unconstrained) created created
v_mbcnt_lo_u32_b32 (cross-lane, so WaveSize(32)) 32, 32 created refused: E_INVALIDARG

So a 4-lane WARP device already refuses WaveSize(32) (and WaveSize(64)) pipelines itself. The new check doesn't take anything away on WARP that would have run; it refuses early and now names the reason, and unconstrained per-lane programs still run there. That answers my question; thanks for adding the log lines.

Tested

  • cargo test --locked -p victory-gpu --lib: 45 passed, 0 failed, 1 ignored, including emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds
  • cargo test --locked --workspace: 266 passed, 0 failed, 4 ignored
  • cargo build -p victory --features diagnostics: builds; cargo xtask policy: 151 files ok; clippy: only main's host.rs:267 warning
  • one nit: cargo fmt --check wants the first assert_eq! in dxil_wave_lanes_reads_psv0_bounds split over lines. The other fmt output in these files is already on main.

Not tested: title pipelines or the world (no game data).

AI-assisted (Claude Code).

**@⁠fromthemoonx** on GitHub · 2026-11-24 07:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7124694990) Thanks. Re-tested `d2d26d1` on the same RTX 3060 machine, including what WARP does with the emitted wave sizes. **What the emitter puts in PSV0, and what each adapter accepts.** A throwaway test (not pushed) built two one-thread wave32 programs with `build_valu_cs`, read PSV0's lane range at the offsets `dxil_wave_lanes` uses, and called `compute_pipeline` on each adapter: | program | PSV0 lanes | RTX 3060 | WARP | |---|---|---|---| | `v_mov_b32` (per lane) | 0, `0xffffffff` (unconstrained) | created | created | | `v_mbcnt_lo_u32_b32` (cross-lane, so `WaveSize(32)`) | 32, 32 | created | **refused: `E_INVALIDARG`** | So a 4-lane WARP device already refuses `WaveSize(32)` (and `WaveSize(64)`) pipelines itself. The new check doesn't take anything away on WARP that would have run; it refuses early and now names the reason, and unconstrained per-lane programs still run there. That answers my question; thanks for adding the log lines. **Tested** - `cargo test --locked -p victory-gpu --lib`: 45 passed, 0 failed, 1 ignored, including `emitted_wave_size_checked_against_host_range` and `dxil_wave_lanes_reads_psv0_bounds` - `cargo test --locked --workspace`: 266 passed, 0 failed, 4 ignored - `cargo build -p victory --features diagnostics`: builds; `cargo xtask policy`: 151 files ok; clippy: only `main`'s `host.rs:267` warning - one nit: `cargo fmt --check` wants the first `assert_eq!` in `dxil_wave_lanes_reads_psv0_bounds` split over lines. The other fmt output in these files is already on `main`. **Not tested:** title pipelines or the world (no game data). AI-assisted (Claude Code).
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 07:14 UTC · original

Thanks @⁠fromthemoonx for re-testing on RTX 3060 + WARP and catching the rustfmt nit in dxil_wave_lanes_reads_psv0_bounds! Fixed and pushed.

**@⁠wbkepler** on GitHub · 2026-11-24 07:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7124771130) Thanks @⁠fromthemoonx for re-testing on RTX 3060 + WARP and catching the `rustfmt` nit in `dxil_wave_lanes_reads_psv0_bounds`! Fixed and pushed.
Author
Owner

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

Tested on an RTX 4070 (32-lane waves, driver 32.0.16.2101), on top of #493 + #483 (the pair that stops the device removal on this GPU, see #493). Default loop limit, 300 s, VICTORY_D3D12_DRED=1.

  • No device removal. Refused host pipelines go from 131 to 0, and the new warning is logged once up front, as intended.
  • Dynamic-descriptor-slot drops went from 32,768 (logged threshold) to none, and there were no slow submissions. However, this run spent only 117 s in the world (against 220 s for the base), and draws per frame fell from ~1,218 to ~252. So those drops may just reflect less work being done, not a gain. "dropped without a host pipeline" and indirect drops are unchanged. The host CPU was busy with other jobs, so ms/frame isn't comparable.

Overlap with #233: offline pipeline creation on the same GPU (translate --pipelines, all 26,096 programs) shows 321 WaveSize(64) compute programs that the driver refuses on main. This PR refuses all of them up front. #233 instead makes 98 of them run on 32-lane hosts and refuses the other 223 explicitly (numbers on #233). The two could combine: #233's halves where they apply, and this PR's up-front refusal for the rest.

AI-assisted.

**@⁠iurysf** on GitHub · 2026-11-24 07:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7125001763) Tested on an RTX 4070 (32-lane waves, driver 32.0.16.2101), on top of #493 + #483 (the pair that stops the device removal on this GPU, see #493). Default loop limit, 300 s, `VICTORY_D3D12_DRED=1`. - No device removal. Refused host pipelines go from 131 to **0**, and the new warning is logged once up front, as intended. - Dynamic-descriptor-slot drops went from 32,768 (logged threshold) to none, and there were no slow submissions. **However**, this run spent only 117 s in the world (against 220 s for the base), and draws per frame fell from ~1,218 to ~252. So those drops may just reflect less work being done, not a gain. "dropped without a host pipeline" and indirect drops are unchanged. The host CPU was busy with other jobs, so ms/frame isn't comparable. **Overlap with #233:** offline pipeline creation on the same GPU (`translate --pipelines`, all 26,096 programs) shows 321 `WaveSize(64)` compute programs that the driver refuses on main. This PR refuses all of them up front. #233 instead makes **98** of them run on 32-lane hosts and refuses the other 223 explicitly (numbers on #233). The two could combine: #233's halves where they apply, and this PR's up-front refusal for the rest. AI-assisted.
Author
Owner

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

@⁠wbkepler thank you, checking the emitted module's PSV0 wave range against the host's is the right key: it refuses what cannot run and leaves alone what was translated for the host, whichever PR did the translating. I have read your description of the follow-up, not built it with the stack; nothing in the stack should conflict with it.

One thing to know for later, not for this PR: the next branch on top of the stack (shader/wave-per-group, not a PR yet) emits console groups of several wave64 waves as host groups of 64 threads, still WaveSize(32), so it passes the same check.

Understood on the 8x1x1 dispatch; if whoever has that capture can post its hash and group size, I will look at the form it takes.

AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 07:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7125076810) @⁠wbkepler thank you, checking the emitted module's `PSV0` wave range against the host's is the right key: it refuses what cannot run and leaves alone what was translated for the host, whichever PR did the translating. I have read your description of the follow-up, not built it with the stack; nothing in the stack should conflict with it. One thing to know for later, not for this PR: the next branch on top of the stack ([`shader/wave-per-group`](https://github.com/r4tedx/VIctory/tree/shader/wave-per-group), not a PR yet) emits console groups of several wave64 waves as host groups of 64 threads, still `WaveSize(32)`, so it passes the same check. Understood on the 8x1x1 dispatch; if whoever has that capture can post its hash and group size, I will look at the form it takes. AI-assisted (Claude Code).
Author
Owner

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

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

On a host with 64-lane waves nothing is refused, as intended: victory translate --validate --pipelines over the full retail shader pack on the RX 9070 gives the same counts as main 1f858b0 (VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191). cargo test -p victory-shader passes.

**@⁠slint6614-dev** on GitHub · 2026-11-24 08:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7125667869) AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4, 32-64 lane waves) and Ryzen 9600X iGPU (RDNA2, gfx1036). On a host with 64-lane waves nothing is refused, as intended: `victory translate --validate --pipelines` over the full retail shader pack on the RX 9070 gives the same counts as main 1f858b0 (VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191). `cargo test -p victory-shader` passes.
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 10:52 UTC · original

Windows 10 + Pascal data point (no game run, tests only).

Setup: Windows 10 Education 22H2 (19045), GTX 1060 6 GB (driver 582.66), i7-10700K, Rust 1.98.1, debug. I tested main ffe310e, with #486 and this PR merged locally. #486 is there because Windows 10's in-box runtime stops at SM 6.5; the Agility SDK 1.620.2 runtime sits beside the test binaries.

Tests:

  • cargo test -p victory-gpu: 52 passed, 0 failed, including dxil_wave_lanes_reads_psv0_bounds and emitted_wave_size_checked_against_host_range.
  • cargo test -p victory-shader: 120 passed, 0 failed.
  • cargo xtask policy: clean.

What the adapters report (OPTIONS1 and OPTIONS7, from a throwaway test that isn't pushed):

adapter WaveLaneCountMin / Max MeshShaderTier
GTX 1060 (Pascal) 32 / 32 not supported
WARP 1.0.22 (Microsoft.Direct3D.WARP, beside the binary) 4 / 128 1

So on Pascal this PR changes nothing for mesh pipelines today, because they're refused for having no mesh shaders. It does matter for the compute-shader fallback I'm prototyping in #3. Since the mesh check here comes first, wave64 mesh programs would be refused on 32-lane hosts before reaching the fallback. Given the hangs above, that seems right: the compute form keeps the same lane layout. It means the fallback can only help wave32 mesh programs on NVIDIA until wave64 runs on 32-lane hosts (#233's direction).

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

**@⁠EduBertozzi** on GitHub · 2026-11-24 10:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7129368620) Windows 10 + Pascal data point (no game run, tests only). **Setup:** Windows 10 Education 22H2 (19045), GTX 1060 6 GB (driver 582.66), i7-10700K, Rust 1.98.1, debug. I tested `main` `ffe310e`, with #486 and this PR merged locally. #486 is there because Windows 10's in-box runtime stops at SM 6.5; the Agility SDK 1.620.2 runtime sits beside the test binaries. **Tests:** - `cargo test -p victory-gpu`: 52 passed, 0 failed, including `dxil_wave_lanes_reads_psv0_bounds` and `emitted_wave_size_checked_against_host_range`. - `cargo test -p victory-shader`: 120 passed, 0 failed. - `cargo xtask policy`: clean. **What the adapters report** (`OPTIONS1` and `OPTIONS7`, from a throwaway test that isn't pushed): | adapter | WaveLaneCountMin / Max | MeshShaderTier | |---|---|---| | GTX 1060 (Pascal) | 32 / 32 | not supported | | WARP 1.0.22 (Microsoft.Direct3D.WARP, beside the binary) | 4 / 128 | 1 | So on Pascal this PR changes nothing for mesh pipelines today, because they're refused for having no mesh shaders. It does matter for the compute-shader fallback I'm prototyping in #3. Since the mesh check here comes first, wave64 mesh programs would be refused on 32-lane hosts before reaching the fallback. Given the hangs above, that seems right: the compute form keeps the same lane layout. It means the fallback can only help wave32 mesh programs on NVIDIA until wave64 runs on 32-lane hosts (#233's direction). AI-assisted (Claude Code); runs on my machine.
Author
Owner

@⁠justrealyme on GitHub · 2026-11-24 11:26 UTC · original

Tested on NVIDIA RTX 5070 Ti (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, diag build (--profile diag --features diagnostics), VICTORY_D3D12_DRED=1, no debug layer, title 1.0.2.1 (blake3 b99f876b…). Same scripted input in both runs (Enter every 4 s), fresh saves for the first: this PR removes the world hang on this card; the world then renders an empty grey letterboxed frame.

main ffe310e main + this PR (7292690, merged cleanly)
Menus, intro, loading 30 fps 30 fps
World entered yes yes
Time in the world ~1 min 50 s, then device removed (DXGI_ERROR_DEVICE_HUNG) after a 5,184 ms submission 8 min 20 s, no device removal (stopped by me)
Faulting dispatch compute 269b802f878c24e1 (the shader in #468 / #653 / #97) –
host pipeline refused (0x80070057) 120 0
Draws / dropped per frame (world, mean) ~956 / ~995 ~181 / ~1214
Frame time in the world 1.1–1.4 s 0.9–2.0 s
Picture – cutscene letterbox, the rest a flat grey

With the PR the new log lines are no host pipeline: a shader requiring 64-lane waves, on a host without them and the mesh equivalent (each logged once), as described.

So on Blackwell too, the hang is the wave64 programs and refusing them keeps the device alive, matching the RTX 5090 and #778 results; what is left is the missing scene.

Logs stay local (no game data); I can run a narrower check if useful. AI-assisted (Claude Code).

**@⁠justrealyme** on GitHub · 2026-11-24 11:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7130110212) Tested on **NVIDIA RTX 5070 Ti** (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, diag build (`--profile diag --features diagnostics`), `VICTORY_D3D12_DRED=1`, no debug layer, title 1.0.2.1 (blake3 `b99f876b…`). Same scripted input in both runs (Enter every 4 s), fresh saves for the first: **this PR removes the world hang on this card; the world then renders an empty grey letterboxed frame.** | | `main` `ffe310e` | `main` + this PR (`7292690`, merged cleanly) | |---|---|---| | Menus, intro, loading | 30 fps | 30 fps | | World entered | yes | yes | | Time in the world | **~1 min 50 s, then device removed** (`DXGI_ERROR_DEVICE_HUNG`) after a 5,184 ms submission | **8 min 20 s, no device removal** (stopped by me) | | Faulting dispatch | `compute 269b802f878c24e1` (the shader in #468 / #653 / #97) | – | | `host pipeline refused (0x80070057)` | 120 | 0 | | Draws / dropped per frame (world, mean) | ~956 / ~995 | ~181 / ~1214 | | Frame time in the world | 1.1–1.4 s | 0.9–2.0 s | | Picture | – | cutscene letterbox, the rest a flat grey | With the PR the new log lines are `no host pipeline: a shader requiring 64-lane waves, on a host without them` and the mesh equivalent (each logged once), as described. So on Blackwell too, the hang is the wave64 programs and refusing them keeps the device alive, matching the RTX 5090 and #778 results; what is left is the missing scene. Logs stay local (no game data); I can run a narrower check if useful. AI-assisted (Claude Code).
Author
Owner

@⁠ChruutvoLuzi on GitHub · 2026-11-24 11:32 UTC · original

RTX 4090 (driver 621.01, Windows 11), diag build, VICTORY_D3D12_DRED=1. Base: main ffe310e with #646, #454, #439 (so #223, #233 and #320 too) and #160, VICTORY_SHADER_LOOP_LIMIT=256, VICTORY_NO_WATCHDOG=1. This PR at 7292690; its only conflict was in host.rs, where I kept both target() from the #233 stack and this PR's wave_lanes().

With this PR the world ran 19.5 minutes with no device removal, until I stopped it. Without it, the same base hung about 20 s into the world (0x887A0006 after a 4.9 s list), and three close variants (without #160, with #458, plain main) hung after 20 to 53 s.

On this card, though, what it refuses is every mesh program. In that run the title bound 922 mesh programs and the host created 0 mesh pipelines (511 in the 20 s run without it). Draws fell from about 1,900 to 2,200 per frame to about 300, vertex and pixel only, as in the 4070 run above. The reason is that all of the title's mesh programs are wave64: every one of the 9,282 Ms containers in shaders.rpf (1.0.2.1) runs on 64-bit EXEC (s_mov_b64 exec, …, s_and_saveexec_b64). Compute is mixed, 836 of 2,688.

So on NVIDIA, refusing wave64 mesh programs is the same as skipping every mesh draw, and the result can't separate wave64 from anything else about the mesh path. DRED narrows it down to a handful of programs (posted on #71). Skipping only 4adfa13bea1c556a (MSR_VS_CascadeShadows_drawskinned) took the world from about 27 s to 2.5 min before the next stop. Keeping mesh geometry on 32-lane hosts would need a narrower test than "the program is wave64", or a fix in the programs that stop.

AI-assisted (Claude Code).

**@⁠ChruutvoLuzi** on GitHub · 2026-11-24 11:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7130233186) RTX 4090 (driver 621.01, Windows 11), diag build, `VICTORY_D3D12_DRED=1`. Base: `main` `ffe310e` with #646, #454, #439 (so #223, #233 and #320 too) and #160, `VICTORY_SHADER_LOOP_LIMIT=256`, `VICTORY_NO_WATCHDOG=1`. This PR at `7292690`; its only conflict was in `host.rs`, where I kept both `target()` from the #233 stack and this PR's `wave_lanes()`. With this PR the world ran 19.5 minutes with no device removal, until I stopped it. Without it, the same base hung about 20 s into the world (`0x887A0006` after a 4.9 s list), and three close variants (without #160, with #458, plain `main`) hung after 20 to 53 s. On this card, though, what it refuses is every mesh program. In that run the title bound 922 mesh programs and the host created **0** mesh pipelines (511 in the 20 s run without it). Draws fell from about 1,900 to 2,200 per frame to about 300, vertex and pixel only, as in the 4070 run above. The reason is that all of the title's mesh programs are wave64: every one of the 9,282 `Ms` containers in `shaders.rpf` (1.0.2.1) runs on 64-bit EXEC (`s_mov_b64 exec, …`, `s_and_saveexec_b64`). Compute is mixed, 836 of 2,688. So on NVIDIA, refusing wave64 mesh programs is the same as skipping every mesh draw, and the result can't separate wave64 from anything else about the mesh path. DRED narrows it down to a handful of programs (posted on #71). Skipping only `4adfa13bea1c556a` (`MSR_VS_CascadeShadows_drawskinned`) took the world from about 27 s to 2.5 min before the next stop. Keeping mesh geometry on 32-lane hosts would need a narrower test than "the program is wave64", or a fix in the programs that stop. AI-assisted (Claude Code).
Author
Owner

@⁠supidooo on GitHub · 2026-11-24 11:42 UTC · original

Tested head 7292690 merged cleanly onto main (ffe310e) + #175 (19aec59, Windows 10 Agility SDK 1.620.2) on Windows 10 Pro 22H2 (Build 19045), NVIDIA GeForce RTX 4060 Ti 16 GB (driver 32.0.16.2124 / 621.24), Intel Core i7-10700K, 32 GB RAM, Rust 1.98.1.

Unit tests

  • cargo test -p victory-gpu: 52 passed; 0 failed; 1 ignored (benchmark), including pipeline::host::tests::emitted_wave_size_checked_against_host_range and pipeline::host::tests::dxil_wave_lanes_reads_psv0_bounds.

Live title run (diag build, VICTORY_D3D12_DRED=1, fresh cache, Series X mode)

  • Host detection: host wave lanes min=32 max=32, host mesh shader support mesh=true.
  • Baseline without #578 (main ffe310e + #175, two release runs): both hit DXGI_ERROR_DEVICE_HUNG (0x887A0006) on world entry (host GPU device removed after a submission of 30 lists and 4 lists).
  • With #578 (7292690):
    • Entered world loading around frame=1326 (~48 s in) and refused 77 unique Wave64 pipelines logged in the drop summaries (70 mesh, 7 compute).
    • 0 GPU hangs / 0 DXGI_ERROR_DEVICE_HUNG / 0 DRED page faults / no crashes.log created.
    • Survived ~114 s in the world (~162 s total, frame=1326 → frame=1524) at 0.4–1.4 fps, translating 933 shaders and saving 590 host pipelines (36.65 MB library) on a fresh cache.
    • Run ended at ~162 s strictly due to host Windows commit exhaustion (memory allocation of 71303184 bytes failed on 32 GB RAM while compiling world pipelines in parallel), not a GPU failure.
**@⁠supidooo** on GitHub · 2026-11-24 11:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7130451204) Tested head `7292690` merged cleanly onto `main` (`ffe310e`) + `#175` (`19aec59`, Windows 10 Agility SDK `1.620.2`) on **Windows 10 Pro 22H2 (Build 19045)**, **NVIDIA GeForce RTX 4060 Ti 16 GB** (driver `32.0.16.2124` / `621.24`), Intel Core i7-10700K, 32 GB RAM, Rust `1.98.1`. ### Unit tests - `cargo test -p victory-gpu`: **52 passed; 0 failed; 1 ignored** (benchmark), including `pipeline::host::tests::emitted_wave_size_checked_against_host_range` and `pipeline::host::tests::dxil_wave_lanes_reads_psv0_bounds`. ### Live title run (`diag` build, `VICTORY_D3D12_DRED=1`, fresh cache, Series X mode) - Host detection: `host wave lanes min=32 max=32`, `host mesh shader support mesh=true`. - **Baseline without #578** (`main` `ffe310e` + `#175`, two release runs): both hit `DXGI_ERROR_DEVICE_HUNG` (`0x887A0006`) on world entry (`host GPU device removed after a submission of 30 lists` and `4 lists`). - **With #578 (`7292690`):** - Entered world loading around `frame=1326` (~48 s in) and refused **77 unique Wave64 pipelines** logged in the drop summaries (**70 mesh**, **7 compute**). - **0 GPU hangs / 0 `DXGI_ERROR_DEVICE_HUNG` / 0 DRED page faults / no `crashes.log` created.** - Survived **~114 s in the world** (~162 s total, `frame=1326` → `frame=1524`) at **0.4–1.4 fps**, translating 933 shaders and saving 590 host pipelines (36.65 MB library) on a fresh cache. - Run ended at ~162 s strictly due to host Windows commit exhaustion (`memory allocation of 71303184 bytes failed` on 32 GB RAM while compiling world pipelines in parallel), not a GPU failure.
Author
Owner

@⁠justrealyme on GitHub · 2026-11-24 12:03 UTC · original

Correction to my result above: on the RTX 5070 Ti this PR does not reliably remove the world hang. The 8-minute run without a device removal did not reproduce.

Nine more world runs with this PR (7292690) merged onto the same main ffe310e, same machine, build, input script and saves: eight of them also had one other open PR merged (#568, #581, #694, #707, #539, #641, #588, #493), one had this PR alone.

runs device removed (DXGI_ERROR_DEVICE_HUNG) time in the world before removal
main alone (above) 1 1 ~1 min 50 s
main + this PR (above) 1 0 8 min 20 s, stopped by me
main + this PR, ± one other PR 9 9 104–160 s

What this PR does change: the removal moves. On main it was a 1-list submission ending at compute 269b802f878c24e1. With this PR it is a 28-list submission after a 3.5–5.3 s slow submission, with compute aaf7da7a94dc72a9, ebe4e53f031f5249, eeed82b877b44b5f and a133bf0a24aff410 most often among the commands in flight. Those are the programs in #71 (also an RTX 5070 Ti), so the wave64 refusal looks necessary on NVIDIA but not sufficient here. host pipeline refused drops from 120 to 0 in every run.

None of the eight other PRs changed the outcome on this card; their draw counts and frame times were within the run-to-run spread.

Logs stay local (no game data). AI-assisted (Claude Code).

**@⁠justrealyme** on GitHub · 2026-11-24 12:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7130908041) **Correction to my result above: on the RTX 5070 Ti this PR does not reliably remove the world hang.** The 8-minute run without a device removal did not reproduce. Nine more world runs with this PR (`7292690`) merged onto the same `main` `ffe310e`, same machine, build, input script and saves: eight of them also had one other open PR merged (#568, #581, #694, #707, #539, #641, #588, #493), one had this PR alone. | | runs | device removed (`DXGI_ERROR_DEVICE_HUNG`) | time in the world before removal | |---|---|---|---| | `main` alone (above) | 1 | 1 | ~1 min 50 s | | `main` + this PR (above) | 1 | 0 | 8 min 20 s, stopped by me | | `main` + this PR, ± one other PR | 9 | **9** | 104–160 s | What this PR does change: the removal moves. On `main` it was a 1-list submission ending at `compute 269b802f878c24e1`. With this PR it is a **28-list** submission after a 3.5–5.3 s slow submission, with `compute aaf7da7a94dc72a9`, `ebe4e53f031f5249`, `eeed82b877b44b5f` and `a133bf0a24aff410` most often among the commands in flight. Those are the programs in #71 (also an RTX 5070 Ti), so the wave64 refusal looks necessary on NVIDIA but not sufficient here. `host pipeline refused` drops from 120 to 0 in every run. None of the eight other PRs changed the outcome on this card; their draw counts and frame times were within the run-to-run spread. Logs stay local (no game data). AI-assisted (Claude Code).
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 12:21 UTC · original

Clean A/B on an RTX 4090: current main (8e79c80) alone vs. main + this PR only, with nothing else stacked and default loop limit.

Machine: Windows 11 Pro 23H2 (22631), RTX 4090 24 GB (driver 32.0.16.1088), i7-13700K. Title 1.0.2.1, Series X mode, an existing save, so it goes straight into the world load. Diagnostics build, VICTORY_D3D12_DRED=1, the same VICTORY_KEYS each run.

build result
main (5 runs: release; diag with debug layer/DRED/GPU_TIMING; VICTORY_SKIP_PIPELINES of the first stuck mesh shaders; VICTORY_SHADER_LOOP_LIMIT=1024) DXGI_ERROR_DEVICE_HUNG / 0x887A0006 every time, 1.9–3.9 min in. DRED: stopped in one of the first mesh dispatches of the world (direct or indirect, a different mesh shader once the first ones are skipped). The debug layer reports no validation error before it (details in #653).
main + #578 in the world for 15 min, no device removal (killed by my timeout): 0.5–2.4 fps, up to 6181 indirect executions per log interval. Refused, once each: mesh d4111a6e6ea49d91 and compute 13dfdd3b1136e407.

Played it by hand afterwards with the same build. It enters the world and stays there. On screen only text and fades are visible, as expected while most world shaders are not translated yet.

So on Ada too, the world-load hang is the wave64-on-32-lane class, and the loop limit is not the cause: 1024 still hangs. Merged on main: clippy (-D warnings, default and --all-features) is clean and cargo test -p victory-gpu passes (52 / 1 ignored).

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 12:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7131318989) Clean A/B on an RTX 4090: current `main` (`8e79c80`) alone vs. `main` + this PR only, with nothing else stacked and default loop limit. Machine: Windows 11 Pro 23H2 (22631), RTX 4090 24 GB (driver 32.0.16.1088), i7-13700K. Title 1.0.2.1, Series X mode, an existing save, so it goes straight into the world load. Diagnostics build, `VICTORY_D3D12_DRED=1`, the same `VICTORY_KEYS` each run. | build | result | |---|---| | `main` (5 runs: release; diag with debug layer/DRED/`GPU_TIMING`; `VICTORY_SKIP_PIPELINES` of the first stuck mesh shaders; `VICTORY_SHADER_LOOP_LIMIT=1024`) | `DXGI_ERROR_DEVICE_HUNG` / `0x887A0006` every time, 1.9–3.9 min in. DRED: stopped in one of the first mesh dispatches of the world (direct or indirect, a different mesh shader once the first ones are skipped). The debug layer reports no validation error before it (details in #653). | | `main` + #578 | **in the world for 15 min, no device removal** (killed by my timeout): 0.5–2.4 fps, up to 6181 indirect executions per log interval. Refused, once each: `mesh d4111a6e6ea49d91` and `compute 13dfdd3b1136e407`. | Played it by hand afterwards with the same build. It enters the world and stays there. On screen only text and fades are visible, as expected while most world shaders are not translated yet. So on Ada too, the world-load hang is the wave64-on-32-lane class, and the loop limit is not the cause: 1024 still hangs. Merged on `main`: clippy (`-D warnings`, default and `--all-features`) is clean and `cargo test -p victory-gpu` passes (52 / 1 ignored). AI-assisted (Claude Code).
Author
Owner

@⁠undeadhuman37 on GitHub · 2026-11-24 12:28 UTC · original

Tested on an RTX 4070 SUPER (driver 621.01, Windows 11, wave lanes min=32 max=32). Base: main ffe310e plus 2^18 dynamic slots on the capped heap (#747).

  • This PR as it stands (wave64 mesh refused, compute only by emitted WaveSize): the world still hangs. 118 slow submissions (~250-300 ms), then 5.2 s and device removed (0x887A0006) about 8 min in.
  • Also refusing console wave64 compute when host_max < 64 (what 07508ab did): 0 slow submissions and no device removal after 14+ min in the world (~3 fps, ~420 draws/frame).

So on this card the compute half of the original version seems to matter. Wave64 compute translations that don't declare WaveSize still hang here as 32-lane waves. Full numbers in #747.

(Tested with AI help. No game files or game-content logs attached.)

**@⁠undeadhuman37** on GitHub · 2026-11-24 12:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7131495099) Tested on an **RTX 4070 SUPER** (driver 621.01, Windows 11, `wave lanes min=32 max=32`). Base: `main` ffe310e plus 2^18 dynamic slots on the capped heap (#747). - This PR as it stands (wave64 **mesh** refused, compute only by emitted `WaveSize`): the world still hangs. 118 slow submissions (~250-300 ms), then 5.2 s and device removed (0x887A0006) about 8 min in. - Also refusing **console wave64 compute** when `host_max < 64` (what 07508ab did): **0** slow submissions and no device removal after 14+ min in the world (~3 fps, ~420 draws/frame). So on this card the compute half of the original version seems to matter. Wave64 compute translations that don't declare `WaveSize` still hang here as 32-lane waves. Full numbers in #747. *(Tested with AI help. No game files or game-content logs attached.)*
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-24 12:39 UTC · original

Tested on an RTX 3090 (Ampere, 32-lane waves only), driver 32.0.16.2101, Windows 11 26200. Title 1.0.2.1 (b99f876b74d4a77f), diag build, VICTORY_D3D12_DRED=1. Same save and the same VICTORY_KEYS script for both runs.

main ffe310e this PR (7292690) merged onto main ffe310e
reached the world yes yes
outcome DXGI_ERROR_DEVICE_HUNG about 3 min into the world no hang in about 7.5 min in the world, until I stopped the run
where DRED stopped command 68 of 849, op 42 DispatchMesh, mesh c98d45f9c0757861 alone between barriers –

With this PR, c98d45f9c0757861 is bound but no host pipeline is built for it, because it is refused as a 64-lane program. So on this card, the hang on main is the wave64 mesh case this PR describes. The world then runs at about 1–3 fps, with many draws dropped, as expected until wave64 mesh programs can run on 32-lane hosts.

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

**@⁠JFIREonFIRE** on GitHub · 2026-11-24 12:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7131752454) Tested on an **RTX 3090** (Ampere, 32-lane waves only), driver 32.0.16.2101, Windows 11 26200. Title 1.0.2.1 (`b99f876b74d4a77f`), diag build, `VICTORY_D3D12_DRED=1`. Same save and the same `VICTORY_KEYS` script for both runs. | | `main` `ffe310e` | this PR (`7292690`) merged onto `main` `ffe310e` | |---|---|---| | reached the world | yes | yes | | outcome | `DXGI_ERROR_DEVICE_HUNG` about 3 min into the world | **no hang** in about 7.5 min in the world, until I stopped the run | | where DRED stopped | command 68 of 849, op 42 DispatchMesh, `mesh c98d45f9c0757861` alone between barriers | – | With this PR, `c98d45f9c0757861` is bound but no host pipeline is built for it, because it is refused as a 64-lane program. So on this card, the hang on `main` is the wave64 mesh case this PR describes. The world then runs at about 1–3 fps, with many draws dropped, as expected until wave64 mesh programs can run on 32-lane hosts. AI-assisted (Claude Code). Tested on my own machine.
Author
Owner

@⁠ChruutvoLuzi on GitHub · 2026-11-24 12:41 UTC · original · edited 2026-11-24 13:08 UTC

Follow-up on the same RTX 4090: #493 on its own removes the hang and keeps the mesh draws. Plain main ffe310e + #493, with VICTORY_SHADER_LOOP_LIMIT=1024 (at the default limit a pixel loop still hangs), ran 19 minutes in the world with no device removal, 718 mesh pipelines and about 2,000 draws per frame (numbers on #493). So on this card wave64 mesh programs run on 32-lane waves without hanging once their root SRV reads are bounded, and refusing them avoided the hang by not running those reads.

AI-assisted (Claude Code).

**@⁠ChruutvoLuzi** on GitHub · 2026-11-24 12:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7131778278) · edited 2026-11-24 13:08 UTC Follow-up on the same RTX 4090: #493 on its own removes the hang and keeps the mesh draws. Plain `main` `ffe310e` + #493, with `VICTORY_SHADER_LOOP_LIMIT=1024` (at the default limit a pixel loop still hangs), ran 19 minutes in the world with no device removal, 718 mesh pipelines and about 2,000 draws per frame (numbers on #493). So on this card wave64 mesh programs run on 32-lane waves without hanging once their root SRV reads are bounded, and refusing them avoided the hang by not running those reads. AI-assisted (Claude Code).
Author
Owner

@⁠Mumogg on GitHub · 2026-11-24 13:12 UTC · original

Test report under Wine on NVIDIA (32-lane waves): with this PR the world no longer hangs the GPU here.

Setup: RTX 5070 Ti, driver 615.78.08, Nobara 44 (kernel 7.3.4), Wine 11.21 Staging, vkd3d-proton and DXVK dxgi.dll from GE-Proton11-14, diag build cross-compiled on Linux, Series X 1.0.2.1, network off. VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains, VICTORY_NO_WATCHDOG=1, VICTORY_GPU_TIMING=1, VICTORY_D3D12_DRED=1.

Tree: ffe310e + #454 + #177 + #259 + #233 (d1fecaa) + #646 (12eba49) + the region-scan copy fallback from #783 (61474f6), then the same with this PR (7292690) on top. It conflicts with #233 in host.rs (target() against wave_lanes(), same place); keeping both functions resolves it.

Without this PR (ten runs on that tree or its parents): every run ends in Xid 109 … CTX SWITCH TIMEOUT from title-main, 1.3 to 5.5 min after launch. To name the list, I made the per-list wait of VICTORY_GPU_TIMING print a list's notes when it is still on the GPU after 3 s. Three runs:

Skipped by hand (VICTORY_SKIP_PIPELINES) List still running when the Xid came
nothing 39 mesh draws without a pixel stage, 25 of them mesh 4adfa13bea1c556a
4adfa13bea1c556a mesh 37f363f0a5dcd806, c962201cddbdd7dd, 857b2e13c9cc107f (the three of #71), 51ff151f75cd5759, 89036e16fa081505, 0d9d1c59733d6340
those six 21 draws of mesh ceac53a17bd33fec (after 5 min 28 s)

So skipping by hash only moves the stop to the next mesh program.

With this PR, no skips: one run of 590 s, ended by my timeout while still presenting (frame 1999). No Xid in the kernel log, no device removal, and no list on the GPU for 3 s. host wave lanes min=32 max=32 is logged, and the mesh refusal reason once. World frame rate in that run: 1.4 fps on average (0.2 to 6.8), with timing on, so each list is submitted alone.

Not tested: Windows, AMD, cargo test, this PR without #233, more than one run with it.

AI-assisted (Claude Code): it built the trees, ran the tests and wrote this report from the logs. No game data attached.

**@⁠Mumogg** on GitHub · 2026-11-24 13:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7132506968) Test report under Wine on NVIDIA (32-lane waves): with this PR the world no longer hangs the GPU here. **Setup:** RTX 5070 Ti, driver 615.78.08, Nobara 44 (kernel 7.3.4), Wine 11.21 Staging, vkd3d-proton and DXVK `dxgi.dll` from GE-Proton11-14, diag build cross-compiled on Linux, Series X 1.0.2.1, network off. `VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains`, `VICTORY_NO_WATCHDOG=1`, `VICTORY_GPU_TIMING=1`, `VICTORY_D3D12_DRED=1`. **Tree:** `ffe310e` + #454 + #177 + #259 + #233 (`d1fecaa`) + #646 (`12eba49`) + the region-scan copy fallback from #783 (`61474f6`), then the same with this PR (`7292690`) on top. It conflicts with #233 in `host.rs` (`target()` against `wave_lanes()`, same place); keeping both functions resolves it. **Without this PR** (ten runs on that tree or its parents): every run ends in `Xid 109 … CTX SWITCH TIMEOUT` from `title-main`, 1.3 to 5.5 min after launch. To name the list, I made the per-list wait of `VICTORY_GPU_TIMING` print a list's notes when it is still on the GPU after 3 s. Three runs: | Skipped by hand (`VICTORY_SKIP_PIPELINES`) | List still running when the Xid came | |---|---| | nothing | 39 mesh draws without a pixel stage, 25 of them mesh `4adfa13bea1c556a` | | `4adfa13bea1c556a` | mesh `37f363f0a5dcd806`, `c962201cddbdd7dd`, `857b2e13c9cc107f` (the three of #71), `51ff151f75cd5759`, `89036e16fa081505`, `0d9d1c59733d6340` | | those six | 21 draws of mesh `ceac53a17bd33fec` (after 5 min 28 s) | So skipping by hash only moves the stop to the next mesh program. **With this PR, no skips:** one run of 590 s, ended by my timeout while still presenting (frame 1999). No Xid in the kernel log, no device removal, and no list on the GPU for 3 s. `host wave lanes min=32 max=32` is logged, and the mesh refusal reason once. World frame rate in that run: 1.4 fps on average (0.2 to 6.8), with timing on, so each list is submitted alone. **Not tested:** Windows, AMD, `cargo test`, this PR without #233, more than one run with it. AI-assisted (Claude Code): it built the trees, ran the tests and wrote this report from the logs. No game data attached.
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 13:29 UTC · original

Follow-up to my A/B above: with this PR on the RTX 4090 there is a second, independent hang, and it is a single compute shader: compute eeed82b877b44b5f.

Same machine and setup as above. Diagnostics build, VICTORY_D3D12_DRED=1, the same VICTORY_KEYS. main ffe310e + #578 unless noted.

run result
8e79c80 + #578, played by hand (release) device removed 12 s after eeed82b877b44b5f was first bound
ffe310e + #578 removed 6 s after its first bind (4.8 min in)
ffe310e + #439 stack + #578 removed 6 s after its first bind (4.6 min in)
ffe310e + #578, VICTORY_SKIP_PIPELINES=9146291b38ea9ce1,65e969746fffdb7d (its neighbours) still removed, 6 s after its first bind
ffe310e + #578, VICTORY_SKIP_PIPELINES=eeed82b877b44b5f no removal: it is requested at 13:13:47 and skipped, and the world runs 11 more minutes until my 15-min timeout

(My earlier 15-min run without a removal simply never reached this shader.)

DRED, every time: the list stopped at command 3 of 10. That command is dispatch 12x1x1 [compute eeed82b877b44b5f], after dispatch 1x1x1 [compute 37e19ccb4f889f63]. Its bindings include two null heap slots: u4=0xa4d300 [heap 337560: null] and u7=0x40 [heap 64: null]. The container is 6816 bytes, user_data=4. #578 lets it through, so its translation declares no 64-lane wave size. Whether it is a wave64 program running on 32 lanes or something else (the null slots), I can't tell from here. Happy to run a build that dumps it or logs more about it.

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 13:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7132908778) Follow-up to my A/B above: with this PR on the RTX 4090 there is a **second, independent hang**, and it is a single compute shader: **`compute eeed82b877b44b5f`**. Same machine and setup as above. Diagnostics build, `VICTORY_D3D12_DRED=1`, the same `VICTORY_KEYS`. `main` `ffe310e` + #578 unless noted. | run | result | |---|---| | `8e79c80` + #578, played by hand (release) | device removed **12 s after** `eeed82b877b44b5f` was first bound | | `ffe310e` + #578 | removed **6 s after** its first bind (4.8 min in) | | `ffe310e` + #439 stack + #578 | removed **6 s after** its first bind (4.6 min in) | | `ffe310e` + #578, `VICTORY_SKIP_PIPELINES=9146291b38ea9ce1,65e969746fffdb7d` (its neighbours) | still removed, 6 s after its first bind | | `ffe310e` + #578, **`VICTORY_SKIP_PIPELINES=eeed82b877b44b5f`** | **no removal**: it is requested at 13:13:47 and skipped, and the world runs 11 more minutes until my 15-min timeout | (My earlier 15-min run without a removal simply never reached this shader.) DRED, every time: the list stopped at command 3 of 10. That command is **`dispatch 12x1x1 [compute eeed82b877b44b5f]`**, after `dispatch 1x1x1 [compute 37e19ccb4f889f63]`. Its bindings include two **null** heap slots: `u4=0xa4d300 [heap 337560: null]` and `u7=0x40 [heap 64: null]`. The container is 6816 bytes, `user_data=4`. #578 lets it through, so its translation declares no 64-lane wave size. Whether it is a wave64 program running on 32 lanes or something else (the null slots), I can't tell from here. Happy to run a build that dumps it or logs more about it. AI-assisted (Claude Code).
Author
Owner

@⁠Machad3x on GitHub · 2026-11-24 13:46 UTC · original

Result on an NVIDIA RTX 3080 Ti (32-lane waves, Windows 11), fork github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550 (main + #302 #489 #294 #578 #650 #233 #709 #585 #309 #587 #452): wave64 mesh programs are NOT what hangs the GPU. With #578's mesh refusal switched off (a diagnostics-only switch on the fork, VICTORY_ALLOW_WAVE64_MESH=1): without #452 a world frame costs 4.3 s of GPU and the device is removed (even with #587); with VICTORY_SHADER_LOOP_LIMIT=64 the same run stays up (3731 draws per frame, about 90 ms of GPU per frame, no removal, no slow list); with #452 and its defaults (spin limit 4096, no manual limit) the run stays up for 5 minutes, 3900 draws per frame, 441 ms of GPU per frame. So the TDR was loops running to the 2^20 limit, as #452 measured on an RX 7600, and #578's mesh refusal looks unnecessary once #452 is in; only the frame CPU time (about 600 MB of copies per frame) remains very high. Not yet checked: whether the picture is right (the world was still mostly dark on the RX 7600 per #452).

**@⁠Machad3x** on GitHub · 2026-11-24 13:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7133318398) Result on an NVIDIA RTX 3080 Ti (32-lane waves, Windows 11), fork github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550 (main + #302 #489 #294 #578 #650 #233 #709 #585 #309 #587 #452): wave64 mesh programs are NOT what hangs the GPU. With #578's mesh refusal switched off (a diagnostics-only switch on the fork, VICTORY_ALLOW_WAVE64_MESH=1): without #452 a world frame costs 4.3 s of GPU and the device is removed (even with #587); with VICTORY_SHADER_LOOP_LIMIT=64 the same run stays up (3731 draws per frame, about 90 ms of GPU per frame, no removal, no slow list); with #452 and its defaults (spin limit 4096, no manual limit) the run stays up for 5 minutes, 3900 draws per frame, 441 ms of GPU per frame. So the TDR was loops running to the 2^20 limit, as #452 measured on an RX 7600, and #578's mesh refusal looks unnecessary once #452 is in; only the frame CPU time (about 600 MB of copies per frame) remains very high. Not yet checked: whether the picture is right (the world was still mostly dark on the RX 7600 per #452).
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-24 13:58 UTC · original

Follow-up from the RTX 3090 (details in #71: #71).

With this PR, the next hang on this card is a wave64 compute program, eeed82b877b44b5f. native_programs() reports wave64 = true. Its emitted DXIL declares no PSV0 wave range, so wave_lanes_unsupported() lets it through on a 32-lane host. It has a divergent loop whose exit tests a 64-bit mask of lanes still running.

Refusing wave64 compute the way this PR refuses wave64 mesh ((stage == "mesh" || stage == "compute") && console_wave64 && host_max < 64) gave a full 25-minute world run with no hang. The same build without it hung after about 3 minutes, and this PR alone after about 11 minutes (one run each).

That's broader than the doc comment intends ("per-lane or split wave64 compute translations ... run on 32-lane hosts"), and it drops more passes. Perhaps a narrower rule fits better: keep wave64 compute only when the translator knows it doesn't depend on the other 32 lanes, rather than whenever it emits no WaveSize.

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

**@⁠JFIREonFIRE** on GitHub · 2026-11-24 13:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7133626211) Follow-up from the RTX 3090 (details in #71: https://git.gtahub.st/github/Marvisak--VIctory/issues/71). With this PR, the next hang on this card is a wave64 **compute** program, `eeed82b877b44b5f`. `native_programs()` reports `wave64 = true`. Its emitted DXIL declares no PSV0 wave range, so `wave_lanes_unsupported()` lets it through on a 32-lane host. It has a divergent loop whose exit tests a 64-bit mask of lanes still running. Refusing wave64 compute the way this PR refuses wave64 mesh (`(stage == "mesh" || stage == "compute") && console_wave64 && host_max < 64`) gave a full 25-minute world run with no hang. The same build without it hung after about 3 minutes, and this PR alone after about 11 minutes (one run each). That's broader than the doc comment intends ("per-lane or split wave64 compute translations ... run on 32-lane hosts"), and it drops more passes. Perhaps a narrower rule fits better: keep wave64 compute only when the translator knows it doesn't depend on the other 32 lanes, rather than whenever it emits no WaveSize. AI-assisted (Claude Code). Tested on my own machine.
Author
Owner

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

I've put the change from my comment above on a branch, in case you want to take it into this PR:

https://github.com/JFIREonFIRE/VIctory/commits/fix/refuse-unsized-wave64-compute

  • Base: this PR's head (7292690), merged with main ffe310e. The merge is clean.
  • The change: one commit, 6ef8aac, in pipeline/host.rs only. wave_lanes_unsupported now refuses console wave64 compute that declares no wave size, like mesh, when host_max < 64. Programs declaring WaveSize(32) (split emulation) and everything on 64-lane hosts are kept as before.
  • Tests: the doc comment and the emitted_wave_size_checked_against_host_range asserts are updated. The old !wave_lanes_unsupported("compute", true, None, (32, 32)) assert is now the opposite, and there are new asserts for 64-lane hosts and for wave32.
  • Checks: both CI clippy configurations, cargo test --workspace --locked (344 passed) and cargo xtask policy all pass.

Hardware result as before (RTX 3090): no DEVICE_HUNG in a 25-minute world run, against 3 to 11 minutes without the change.

This is a mitigation: those passes are dropped instead of hanging. The real fix is in the translator, which should detect that a program like eeed82b877b44b5f depends on the 64-lane mask and declare WaveSize(64), or emulate it.

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

**@⁠JFIREonFIRE** on GitHub · 2026-11-24 14:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7134066592) I've put the change from my comment above on a branch, in case you want to take it into this PR: https://github.com/JFIREonFIRE/VIctory/commits/fix/refuse-unsized-wave64-compute - **Base:** this PR's head (`7292690`), merged with `main` `ffe310e`. The merge is clean. - **The change:** one commit, `6ef8aac`, in `pipeline/host.rs` only. `wave_lanes_unsupported` now refuses console wave64 **compute** that declares no wave size, like mesh, when `host_max < 64`. Programs declaring `WaveSize(32)` (split emulation) and everything on 64-lane hosts are kept as before. - **Tests:** the doc comment and the `emitted_wave_size_checked_against_host_range` asserts are updated. The old `!wave_lanes_unsupported("compute", true, None, (32, 32))` assert is now the opposite, and there are new asserts for 64-lane hosts and for wave32. - **Checks:** both CI clippy configurations, `cargo test --workspace --locked` (344 passed) and `cargo xtask policy` all pass. Hardware result as before (RTX 3090): no `DEVICE_HUNG` in a 25-minute world run, against 3 to 11 minutes without the change. This is a mitigation: those passes are dropped instead of hanging. The real fix is in the translator, which should detect that a program like `eeed82b877b44b5f` depends on the 64-lane mask and declare `WaveSize(64)`, or emulate it. AI-assisted (Claude Code). Tested on my own machine.
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 14:26 UTC · original

More on compute eeed82b877b44b5f, the second hang on the RTX 4090. What it is not, and one lead.

The program. wave64, 1024 threads per group, dispatched 12x1x1, twice per list (u6 = 0, then 1). Each thread steps through a list of elements by 1024. It tracks a minimum distance (starts at FLT_MAX), then reduces through LDS (512 → 1, s_barrier each step), and lane 0 stores the result. It has two loops (0x2040 → 0x1d8, 0x21a4 → 0x20b8) and no cross-group waits. Its translation: NumThreads=(1024,1,1), no wave-size constraint, --validate passes.

Ruled out:

  • Runaway loop. A local probe logged the title words the loop bound comes from, read when the dispatch is recorded: counts are 235–2122 per group, so each lane loops 1–3 times. VICTORY_SHADER_LOOP_LIMIT=1024 and =64 both still hang at this dispatch.
  • Its translation on 32-lane waves. I ran the dumped container through emit::translate and dispatched it 12x1x1 on this GPU through emit::host::Host::dispatch. It completed in 43–49 ms in every variant:
    • zero counts;
    • the title's counts plus its per-group words, including w4 = 65536, which picks the path at 0x220;
    • those words with the data-chosen descriptors as zero raw buffers;
    • those words with the data-chosen descriptors as 2D texture SRVs (see below).
  • #587. It emits identical DXIL for this program.

The lead. Per element, the program loads two descriptors by index from data (s_load_dwordx4 s[..], s[8:9], w << 5; the index pair is the first two words of each group's 20-byte record). In the hanging run every one of those indices was null in the host heap: 24 of 24, e.g. 58167, 67306, 98680, 34591. Never-made slots hold the null TEXTURE2D SRV from fill_null, and the program reads buffers through them. That fits #754 (views reached through the heap index are never made, refreshed or transitioned). But null or texture descriptors alone did not hang offline. So whatever the title's heap really holds at those indices, or how the host copies of those buffers behave, still has to be matched. I have not tested #413, because it conflicts with main.

My local diagnostics, if they help: dumping containers by hash, a probe that logs a dispatch's user data, record words and heap slots, and the offline dispatch test. I can share them or run variants.

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 14:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7134367077) More on `compute eeed82b877b44b5f`, the second hang on the RTX 4090. What it is not, and one lead. **The program.** wave64, 1024 threads per group, dispatched 12x1x1, twice per list (`u6` = 0, then 1). Each thread steps through a list of elements by 1024. It tracks a minimum distance (starts at `FLT_MAX`), then reduces through LDS (512 → 1, `s_barrier` each step), and lane 0 stores the result. It has two loops (`0x2040 → 0x1d8`, `0x21a4 → 0x20b8`) and no cross-group waits. Its translation: `NumThreads=(1024,1,1)`, no wave-size constraint, `--validate` passes. **Ruled out:** - **Runaway loop.** A local probe logged the title words the loop bound comes from, read when the dispatch is recorded: counts are 235–2122 per group, so each lane loops 1–3 times. `VICTORY_SHADER_LOOP_LIMIT=1024` and `=64` both still hang at this dispatch. - **Its translation on 32-lane waves.** I ran the dumped container through `emit::translate` and dispatched it 12x1x1 on this GPU through `emit::host::Host::dispatch`. It completed in 43–49 ms in every variant: - zero counts; - the title's counts plus its per-group words, including w4 = 65536, which picks the path at `0x220`; - those words with the data-chosen descriptors as zero raw buffers; - those words with the data-chosen descriptors as 2D texture SRVs (see below). - **#587.** It emits identical DXIL for this program. **The lead.** Per element, the program loads two descriptors **by index from data** (`s_load_dwordx4 s[..], s[8:9], w << 5`; the index pair is the first two words of each group's 20-byte record). In the hanging run every one of those indices was **`null` in the host heap**: 24 of 24, e.g. 58167, 67306, 98680, 34591. Never-made slots hold the null `TEXTURE2D` SRV from `fill_null`, and the program reads buffers through them. That fits #754 (views reached through the heap index are never made, refreshed or transitioned). But null or texture descriptors alone did not hang offline. So whatever the title's heap really holds at those indices, or how the host copies of those buffers behave, still has to be matched. I have not tested #413, because it conflicts with `main`. My local diagnostics, if they help: dumping containers by hash, a probe that logs a dispatch's user data, record words and heap slots, and the offline dispatch test. I can share them or run variants. AI-assisted (Claude Code).
Author
Owner

@⁠justrealyme on GitHub · 2026-11-24 14:41 UTC · original

Same hang on an RTX 5070 Ti (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, and some narrowing inside compute eeed82b877b44b5f that may help with the real translator fix @⁠JFIREonFIRE mentions. Diag builds of main ffe310e + this PR (7292690), VICTORY_D3D12_DRED=1, title 1.0.2.1, Enter every 4 s.

@⁠JFIREonFIRE's fix/refuse-unsized-wave64-compute (6ef8aac) on this card: no device removal in 18.7 minutes in the world (20-minute run stopped by my timeout). eeed82b877b44b5f was reached (first bound at frame 2201) and refused as intended, at 0.7 s per frame and 350 draws per frame. Without the change, every run here was removed within 3 minutes. One run.

Where it stops: 11 of 11 runs with this PR were removed (DXGI_ERROR_DEVICE_HUNG) 104–178 s into the world. DRED always stops at the first ever dispatch of eeed82b877b44b5f (12x1x1, u6=0 then u6=1, between the same barriers, after 37e19ccb4f889f63). With VICTORY_SKIP_PIPELINES=eeed82b877b44b5f alone, 2 of 2 runs ran 8+ minutes in the world with no removal, until my timeout. VICTORY_GPU_TIMING=1 shows its 4-command list taking 3.5 s against at most ~145 ms for every other list.

What it is not. Each row is one world run, with only this program changed through local experiment switches. Each switch also used its own cache dir, and the pipeline library keys on the DXIL. The zeroing rows and the CBV row were built with the loop-limit patch from row 5 as well.

Change to eeed82b877b44b5f only Removed?
none yes
its loop counts, read from title memory on the CPU right before the dispatch sane: 235–2122 per group, so ≤ 3 iterations per lane at stride 1024
VICTORY_SHADER_LOOP_LIMIT=16 yes
every s_barrier left out yes
barriers left out and loop limit 16, with a local patch so that a loop at the limit always rets (on main a conditional back edge at the limit takes the loop's other edge, which here enters a duplicated copy of the loop) yes
every vector buffer_load*/buffer_store* reads zero / stores nothing yes
scalar buffer loads after 0x100 (the per-mesh constants read through the two descriptors fetched by data, s[20:23] and s[32:35]) read zero yes
both of the two rows above no (350 s, until timeout)
all scalar buffer loads read zero, including the count (the loop never runs) no (364 s, until timeout)
those 21 scalar loads emitted as raw SRV loads instead of the 64 KiB CBV handle ({13, 65536}) on what the title made an SRV slot yes
MartinIndra02/fix/shader-heap-bounds-clamp (05c681c) yes
#704 (its 7 unknown-stride producers translate) yes

So with every loop bounded and no barriers, the program still never finishes once its per-lane loop runs and reads through the two descriptors it fetches from the heap by data (s_load_dwordx4 s[20:23], s[8:9], s1 at 0x118, s[32:35] at 0x17c, indices from s_buffer_load_dwordx2 s[0:1] at 0x9c). Those two descriptors are read four ways in the DXIL: raw {11,0}, structured {12,48}, typed {10,1033} (3 × buffer_load_format_x through s[32:35]) and the CBV above. That doesn't fit "the loop never ends" alone. A descriptor read as a type other than the slot's is one candidate that remains. I haven't isolated the typed loads.

Logs stay local (no game data). AI-assisted (Claude Code).

**@⁠justrealyme** on GitHub · 2026-11-24 14:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7134797246) Same hang on an **RTX 5070 Ti** (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, and some narrowing inside `compute eeed82b877b44b5f` that may help with the real translator fix @⁠JFIREonFIRE mentions. Diag builds of `main` `ffe310e` + this PR (`7292690`), `VICTORY_D3D12_DRED=1`, title 1.0.2.1, Enter every 4 s. **@⁠JFIREonFIRE's `fix/refuse-unsized-wave64-compute` (`6ef8aac`) on this card:** **no device removal in 18.7 minutes in the world** (20-minute run stopped by my timeout). `eeed82b877b44b5f` was reached (first bound at frame 2201) and refused as intended, at 0.7 s per frame and 350 draws per frame. Without the change, every run here was removed within 3 minutes. One run. **Where it stops:** 11 of 11 runs with this PR were removed (`DXGI_ERROR_DEVICE_HUNG`) 104–178 s into the world. DRED always stops at the first ever dispatch of `eeed82b877b44b5f` (`12x1x1`, `u6=0` then `u6=1`, between the same barriers, after `37e19ccb4f889f63`). With `VICTORY_SKIP_PIPELINES=eeed82b877b44b5f` alone, 2 of 2 runs ran 8+ minutes in the world with no removal, until my timeout. `VICTORY_GPU_TIMING=1` shows its 4-command list taking 3.5 s against at most ~145 ms for every other list. **What it is not.** Each row is one world run, with only this program changed through local experiment switches. Each switch also used its own cache dir, and the pipeline library keys on the DXIL. The zeroing rows and the CBV row were built with the loop-limit patch from row 5 as well. | Change to `eeed82b877b44b5f` only | Removed? | |---|---| | none | yes | | its loop counts, read from title memory on the CPU right before the dispatch | sane: 235–2122 per group, so ≤ 3 iterations per lane at stride 1024 | | `VICTORY_SHADER_LOOP_LIMIT=16` | yes | | every `s_barrier` left out | yes | | barriers left out **and** loop limit 16, with a local patch so that a loop at the limit always `ret`s (on `main` a conditional back edge at the limit takes the loop's other edge, which here enters a duplicated copy of the loop) | yes | | every vector `buffer_load*`/`buffer_store*` reads zero / stores nothing | yes | | scalar buffer loads after `0x100` (the per-mesh constants read through the two descriptors fetched by data, `s[20:23]` and `s[32:35]`) read zero | yes | | **both** of the two rows above | **no** (350 s, until timeout) | | all scalar buffer loads read zero, including the count (the loop never runs) | **no** (364 s, until timeout) | | those 21 scalar loads emitted as raw SRV loads instead of the 64 KiB CBV handle (`{13, 65536}`) on what the title made an SRV slot | yes | | `MartinIndra02/fix/shader-heap-bounds-clamp` (`05c681c`) | yes | | #704 (its 7 unknown-stride producers translate) | yes | So with every loop bounded and no barriers, the program still never finishes once its per-lane loop runs and reads through the two descriptors it fetches from the heap by data (`s_load_dwordx4 s[20:23], s[8:9], s1` at `0x118`, `s[32:35]` at `0x17c`, indices from `s_buffer_load_dwordx2 s[0:1]` at `0x9c`). Those two descriptors are read four ways in the DXIL: raw `{11,0}`, structured `{12,48}`, typed `{10,1033}` (3 × `buffer_load_format_x` through `s[32:35]`) and the CBV above. That doesn't fit "the loop never ends" alone. A descriptor read as a type other than the slot's is one candidate that remains. I haven't isolated the typed loads. Logs stay local (no game data). AI-assisted (Claude Code).
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 15:09 UTC · original

Follow-up on compute eeed82b877b44b5f (RTX 4090): an offline replay and what it rules out.

I dumped the buffers it reads at dispatch time from the running title: the raw "counts" buffer at s0+304 (174 MB), s0+16 (41 MB) and the 112-byte records at s1+0. I replayed both dispatches (u6 = 0 and 1, 12x1x1) on the same GPU through emit::host::Host::dispatch, with the bindings the DXIL expects:

  • annotateHandle 11: records and counts as ByteAddressBuffer;
  • annotateHandle 12/48: s0+16 as StructuredBuffer;
  • annotateHandle 13/65536: the data-indexed descriptors, read as cbuffers.

Results:

  • With the real data, both dispatches complete in 65–75 ms. 16 runs, including the data-chosen descriptor slots as null-resource Texture2D SRVs (what fill_null leaves) and as null raw-buffer SRVs.
  • The hang mechanism, reproduced by accident. With the records bound wrong, s70 (the record offset at records[u6*56+24]) read 0, so group 3's loop bound came from counts byte 68 = 0xbe19999a, about 3.2e9. The per-lane loop then runs into VICTORY_SHADER_LOOP_LIMIT; at the limit the loop is left through ret, before the two group barriers of the LDS reduction, and the GPU hangs. Bisecting the counts buffer down to that one dword confirmed it. So any wrong loop bound on the GPU hangs this program, whatever the limit (that is why the limit=64/1024 runs still hung). It may be worth making a limit exit skip to the loop's exit rather than ret in programs with barriers.
  • In-game, the GPU sees the same data. At the dispatch, the host copies (Shadow) of the records and of the 12 group records are identical to title memory (0 of 28 and 0 of 60 dwords differ). The host heap slot behind u5 names the same records buffer as the title's descriptor.
  • Side finding. In 2 of 8 hanging runs, u5/32 was 1,127,287 / 1,141,475. That is beyond the NVIDIA host view heap cap of 1,000,000, while the title's heap has 1,245,184 descriptors. Those runs read the records through an out-of-heap index. It is not the cause in the other 6.
  • GPU-based validation was no help. With VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1 the title itself crashes before the world (access violation at victory-image…+0x23cf683 ← +0x2215c35, write to 0). It did so twice with the debug layer on; it looks timing-related.

Still not in the replay: the other ~37 descriptors of the u4 table, the real UAV at s1+8 (structured, stride 20), and the resource states in the title's list. One of those must be the difference; I'm adding them next.

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 15:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7135545342) Follow-up on `compute eeed82b877b44b5f` (RTX 4090): an offline replay and what it rules out. I dumped the buffers it reads at dispatch time from the running title: the raw "counts" buffer at s0+304 (174 MB), s0+16 (41 MB) and the 112-byte records at s1+0. I replayed both dispatches (`u6` = 0 and 1, 12x1x1) on the same GPU through `emit::host::Host::dispatch`, with the bindings the DXIL expects: - `annotateHandle` 11: records and counts as ByteAddressBuffer; - `annotateHandle` 12/48: s0+16 as StructuredBuffer; - `annotateHandle` 13/65536: the data-indexed descriptors, read as cbuffers. **Results:** - **With the real data, both dispatches complete in 65–75 ms.** 16 runs, including the data-chosen descriptor slots as null-resource Texture2D SRVs (what `fill_null` leaves) and as null raw-buffer SRVs. - **The hang mechanism, reproduced by accident.** With the records bound wrong, `s70` (the record offset at records[u6*56+24]) read 0, so group 3's loop bound came from counts byte 68 = `0xbe19999a`, about 3.2e9. The per-lane loop then runs into `VICTORY_SHADER_LOOP_LIMIT`; at the limit the loop is left through `ret`, before the two group barriers of the LDS reduction, and the GPU hangs. Bisecting the counts buffer down to that one dword confirmed it. So **any wrong loop bound on the GPU hangs this program**, whatever the limit (that is why the limit=64/1024 runs still hung). It may be worth making a limit exit skip to the loop's exit rather than `ret` in programs with barriers. - **In-game, the GPU sees the same data.** At the dispatch, the host copies (`Shadow`) of the records and of the 12 group records are identical to title memory (0 of 28 and 0 of 60 dwords differ). The host heap slot behind `u5` names the same records buffer as the title's descriptor. - **Side finding.** In 2 of 8 hanging runs, `u5/32` was 1,127,287 / 1,141,475. That is beyond the NVIDIA host view heap cap of 1,000,000, while the title's heap has 1,245,184 descriptors. Those runs read the records through an out-of-heap index. It is not the cause in the other 6. - **GPU-based validation was no help.** With `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1` the title itself crashes before the world (access violation at `victory-image…+0x23cf683` ← `+0x2215c35`, write to 0). It did so twice with the debug layer on; it looks timing-related. **Still not in the replay:** the other ~37 descriptors of the `u4` table, the real UAV at s1+8 (structured, stride 20), and the resource states in the title's list. One of those must be the difference; I'm adding them next. AI-assisted (Claude Code).
Author
Owner

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

GTX 1650 (Turing, 4 GB, 32-lane waves, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build, VICTORY_D3D12_DRED=1, same save and VICTORY_KEYS each run, base main ffe310e, 12-14 min per run:

main + #189 + #189 + #578
world starts 8.5 min after load start 8.2 min –
peak draws/frame 1,746 2,726 44
refused pipelines 14 3 2
device removed in the run no no no

Same as the 4090 and 4070 reports: with #578 the world geometry isn't drawn at all (no host pipeline: a mesh program written for 64-lane waves). Without it, on this card, neither main nor #189 hung within the ~1-2 min each spent in the world, so I can't tell whether #578 is needed here. One run of +#578 also crashed ~30 s after launch (title wrote to address 0 at +0x2215c35); the retry didn't, so I can't reproduce it.

Frame time in the world is dominated by copies of title memory (e.g. 13.1 s of a 15.8 s frame, 223 MB), which matches the copy cost noted above.

**@⁠crissuper20** on GitHub · 2026-11-24 16:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7137093311) GTX 1650 (Turing, 4 GB, 32-lane waves, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build, `VICTORY_D3D12_DRED=1`, same save and `VICTORY_KEYS` each run, base `main` `ffe310e`, 12-14 min per run: | | main | + #189 | + #189 + #578 | |---|---|---|---| | world starts | 8.5 min after load start | 8.2 min | – | | peak draws/frame | 1,746 | 2,726 | 44 | | refused pipelines | 14 | 3 | 2 | | device removed in the run | no | no | no | Same as the 4090 and 4070 reports: with #578 the world geometry isn't drawn at all (`no host pipeline: a mesh program written for 64-lane waves`). Without it, on this card, neither main nor #189 hung within the ~1-2 min each spent in the world, so I can't tell whether #578 is needed here. One run of +#578 also crashed ~30 s after launch (title wrote to address 0 at `+0x2215c35`); the retry didn't, so I can't reproduce it. Frame time in the world is dominated by copies of title memory (e.g. 13.1 s of a 15.8 s frame, 223 MB), which matches the copy cost noted above.
Author
Owner

@⁠justrealyme on GitHub · 2026-11-24 16:21 UTC · original

Follow-up on the RTX 5070 Ti (driver 617.42, Windows 11 build 26300): more runs of @⁠JFIREonFIRE's fix/refuse-unsized-wave64-compute (6ef8aac), diag build, VICTORY_D3D12_DRED=1, the same input script.

11 of 11 world runs with no device removal. That's the 18.7-minute run above, plus 10 runs of about 7 minutes each in the world, stopped by my timeout. Nine of the 10 had one other open PR merged on top: #493, #704 (1f3c184), #694, #539, #581, #641, #588 or #707. On this card, without the change, 11 of 11 runs were removed within 3 minutes.

None of those PRs changed what is visible here: the world frame stays black, with 338–377 draws and about 3,460–3,820 dropped per frame (baseline 340 / 3,542). The one difference above noise is the number of distinct programs that don't translate in the world: #493 gives 427, #694 gives 437, and the baseline 447.

Logs stay local (no game data). AI-assisted (Claude Code).

**@⁠justrealyme** on GitHub · 2026-11-24 16:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7137533415) Follow-up on the RTX 5070 Ti (driver 617.42, Windows 11 build 26300): more runs of @⁠JFIREonFIRE's `fix/refuse-unsized-wave64-compute` (`6ef8aac`), diag build, `VICTORY_D3D12_DRED=1`, the same input script. **11 of 11 world runs with no device removal.** That's the 18.7-minute run above, plus 10 runs of about 7 minutes each in the world, stopped by my timeout. Nine of the 10 had one other open PR merged on top: #493, #704 (`1f3c184`), #694, #539, #581, #641, #588 or #707. On this card, without the change, 11 of 11 runs were removed within 3 minutes. None of those PRs changed what is visible here: the world frame stays black, with 338–377 draws and about 3,460–3,820 dropped per frame (baseline 340 / 3,542). The one difference above noise is the number of distinct programs that don't translate in the world: #493 gives 427, #694 gives 437, and the baseline 447. Logs stay local (no game data). AI-assisted (Claude Code).
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 16:47 UTC · original

Correction to my last comment on eeed82b877b44b5f, plus two new findings. All of it is offline, with the replay on the same RTX 4090.

Corrections:

  • I wrote that "any wrong loop bound on the GPU hangs this program, whatever the limit". That is wrong. A huge bound hangs at the default limit (the lanes run about 2M iterations of a heavy body). With VICTORY_SHADER_LOOP_LIMIT=64 the same data completes in 65–82 ms. The replay that still hung at 64 had a second problem, a wild heap index (below).
  • I wrote "in-game, the GPU sees the same data". That is only shown at record time. The probe compared host copies with title memory when the title records the dispatch, not when the GPU runs it.

Two separate offline triggers:

  1. Huge loop bound (e.g. 3.2e9). It hangs at the default loop limit and completes at limit 64.
  2. Wild descriptor index. A data-chosen heap index of about 1e9 (a 1.0f bit pattern read as an index) hangs at limit 64 as well.

In-game it also hung at limits 64 and 1024, so the in-game hang looks like (2), not (1).

In-game facts (title heap vs host heap). Every group's w0/w1 (the heap indices in its 20-byte record) points at a real buffer descriptor in the title's heap: placed uav=false dim 1, w0 1.5k–2.8k elements, w1 19k–50k. The host heap has null at all 24 of those indices: they are placed descriptors written into title memory, so no API call mirrors them, as #754 describes. The program reads those slots as cbuffers (annotateHandle 13/65536) and computes further heap indices from what it reads.

Mirroring those 24 slots before the dispatch (HostHeap::mirror plus a refresh of their buffers) did not stop the hang. My guess, not shown: a host SRV read as a cbuffer gives NVIDIA undefined words, and those turn into wild derived indices, as in (2). On the console one buffer V# serves both.

If that holds, two fixes come to mind:

  • lower s_buffer_load from data-indexed descriptors as raw-buffer loads instead of cbuffer loads, so a mirrored buffer SRV works;
  • or mirror such slots as CBVs.

Either way #754's mirroring is needed too. And separately: a limit exit that returns before group barriers turns a long loop into a hang. Exiting the loop instead would be safer.

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 16:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7138207556) Correction to my last comment on `eeed82b877b44b5f`, plus two new findings. All of it is offline, with the replay on the same RTX 4090. **Corrections:** - I wrote that "any wrong loop bound on the GPU hangs this program, whatever the limit". **That is wrong.** A huge bound hangs at the default limit (the lanes run about 2M iterations of a heavy body). With `VICTORY_SHADER_LOOP_LIMIT=64` the same data completes in 65–82 ms. The replay that still hung at 64 had a second problem, a wild heap index (below). - I wrote "in-game, the GPU sees the same data". **That is only shown at record time.** The probe compared host copies with title memory when the title records the dispatch, not when the GPU runs it. **Two separate offline triggers:** 1. **Huge loop bound** (e.g. 3.2e9). It hangs at the default loop limit and completes at limit 64. 2. **Wild descriptor index.** A data-chosen heap index of about 1e9 (a `1.0f` bit pattern read as an index) hangs at limit 64 as well. In-game it also hung at limits 64 and 1024, so **the in-game hang looks like (2), not (1)**. **In-game facts (title heap vs host heap).** Every group's w0/w1 (the heap indices in its 20-byte record) points at a **real buffer descriptor in the title's heap**: `placed uav=false dim 1`, w0 1.5k–2.8k elements, w1 19k–50k. The **host heap has `null`** at all 24 of those indices: they are placed descriptors written into title memory, so no API call mirrors them, as #754 describes. The program reads those slots as **cbuffers** (`annotateHandle` 13/65536) and computes further heap indices from what it reads. Mirroring those 24 slots before the dispatch (`HostHeap::mirror` plus a refresh of their buffers) did **not** stop the hang. My guess, not shown: a host SRV read as a cbuffer gives NVIDIA undefined words, and those turn into wild derived indices, as in (2). On the console one buffer V# serves both. **If that holds, two fixes come to mind:** - lower `s_buffer_load` from data-indexed descriptors as raw-buffer loads instead of cbuffer loads, so a mirrored buffer SRV works; - or mirror such slots as CBVs. Either way #754's mirroring is needed too. And separately: a limit exit that returns before group barriers turns a long loop into a hang. Exiting the loop instead would be safer. AI-assisted (Claude Code).
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 16:54 UTC · original

Rebased cleanly onto main (ffe310e) and updated the PR with the unsized console wave64 compute refusal. Thanks everyone for the thorough hardware testing and analysis!

Summary of what is in the updated branch and how each point is addressed:

  • @⁠JFIREonFIRE & @⁠justrealyme: Integrated the unsized console wave64 compute refusal on < 64-lane hosts (matching 6ef8aac and the 11/11 no-TDR world runs on RTX 5070 Ti and 25-minute run on RTX 3090). Console wave64 compute shaders with no PSV0 wave-lane range (or an upper bound wider than host_max) are now refused on < 64-lane hosts, while 64-lane hosts and wave32 compute are unchanged.
  • @⁠r4tedx: Emitted PSV0 wave-lane bounds are still checked first, so compute shaders explicitly lowered to WaveSize(32) by the wave64 split stack (#233/#439 and follow-ups) continue to pass on 32-lane hosts without conflict.
  • @⁠fromthemoonx: Kept explicit startup and refusal logging for narrow/software adapters (e.g. 4-lane WARP), where wider-wave shaders are refused early with a clear reason and unconstrained per-lane wave32 shaders continue to run.
  • @⁠ChruutvoLuzi & @⁠crissuper20 & @⁠Machad3x: Confirmed the trade-off noted in your runs — refusing wave64 mesh on 32-lane hosts drops mesh geometry as a safe TDR mitigation until the underlying translator/loop/bounds fixes (#452, #493, wave64 lowering) land; also rebased cleanly onto main (ffe310e) — note the host.rs target() conflict only occurs when stacking with #233 locally, where keeping both methods resolves it cleanly.
  • @⁠sash2kk: Great root-cause isolation on the hanging compute dispatch (placed descriptor mirroring as in #754, s_buffer_load raw-vs-cbuffer lowering for data-indexed descriptors, and loop-limit exits before group barriers). Keeping PR #578 tightly scoped to the host-side wave-lane guard so those translator and heap-mirroring fixes can land cleanly in their own PRs.

Verified after rebase onto ffe310e: cargo clippy -p victory-gpu --all-targets, cargo clippy -p victory --features diagnostics --all-targets, cargo test -p victory-gpu, and cargo xtask policy all pass.

**@⁠wbkepler** on GitHub · 2026-11-24 16:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7138392633) Rebased cleanly onto `main` (`ffe310e`) and updated the PR with the unsized console `wave64` compute refusal. Thanks everyone for the thorough hardware testing and analysis! Summary of what is in the updated branch and how each point is addressed: - **@⁠JFIREonFIRE & @⁠justrealyme**: Integrated the unsized console `wave64` compute refusal on `< 64`-lane hosts (matching `6ef8aac` and the 11/11 no-TDR world runs on RTX 5070 Ti and 25-minute run on RTX 3090). Console `wave64` compute shaders with no `PSV0` wave-lane range (or an upper bound wider than `host_max`) are now refused on `< 64`-lane hosts, while 64-lane hosts and wave32 compute are unchanged. - **@⁠r4tedx**: Emitted `PSV0` wave-lane bounds are still checked first, so compute shaders explicitly lowered to `WaveSize(32)` by the wave64 split stack (`#233`/`#439` and follow-ups) continue to pass on 32-lane hosts without conflict. - **@⁠fromthemoonx**: Kept explicit startup and refusal logging for narrow/software adapters (e.g. 4-lane WARP), where wider-wave shaders are refused early with a clear reason and unconstrained per-lane wave32 shaders continue to run. - **@⁠ChruutvoLuzi & @⁠crissuper20 & @⁠Machad3x**: Confirmed the trade-off noted in your runs — refusing `wave64` mesh on 32-lane hosts drops mesh geometry as a safe TDR mitigation until the underlying translator/loop/bounds fixes (`#452`, `#493`, wave64 lowering) land; also rebased cleanly onto `main` (`ffe310e`) — note the `host.rs` `target()` conflict only occurs when stacking with `#233` locally, where keeping both methods resolves it cleanly. - **@⁠sash2kk**: Great root-cause isolation on the hanging compute dispatch (placed descriptor mirroring as in `#754`, `s_buffer_load` raw-vs-cbuffer lowering for data-indexed descriptors, and loop-limit exits before group barriers). Keeping PR `#578` tightly scoped to the host-side wave-lane guard so those translator and heap-mirroring fixes can land cleanly in their own PRs. Verified after rebase onto `ffe310e`: `cargo clippy -p victory-gpu --all-targets`, `cargo clippy -p victory --features diagnostics --all-targets`, `cargo test -p victory-gpu`, and `cargo xtask policy` all pass.
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 17:41 UTC · original

@⁠DoubleD17 Thank you for catching that!

Updated the wave-lane refusal diagnostic in crates/victory-gpu/src/pipeline/host.rs:

  • When PSV0 declares an emitted wave-lane range (req_min, req_max) incompatible with the host's (host_min, host_max), the refusal warning now reports the actual PSV0 and host ranges (a <stage> shader declaring PSV0 wave lanes [req_min, req_max] on a host supporting [host_min, host_max]), while retaining the unsized console 64-lane message when PSV0 provides None.
  • Added unit test wave_lanes_refusal_reports_emitted_and_host_ranges covering WaveSize(32) on (64, 64), WaveSize(64) on (32, 32), and unsized console wave64 on (32, 32).

Verified with cargo clippy -p victory-gpu --all-targets, cargo clippy -p victory --features diagnostics --all-targets, cargo test -p victory-gpu (53 passed, 1 ignored), and cargo xtask policy.

AI-assisted.

**@⁠wbkepler** on GitHub · 2026-11-24 17:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7139555680) @⁠DoubleD17 Thank you for catching that! Updated the wave-lane refusal diagnostic in `crates/victory-gpu/src/pipeline/host.rs`: - When `PSV0` declares an emitted wave-lane range `(req_min, req_max)` incompatible with the host's `(host_min, host_max)`, the refusal warning now reports the actual `PSV0` and host ranges (`a <stage> shader declaring PSV0 wave lanes [req_min, req_max] on a host supporting [host_min, host_max]`), while retaining the unsized console 64-lane message when `PSV0` provides `None`. - Added unit test `wave_lanes_refusal_reports_emitted_and_host_ranges` covering `WaveSize(32)` on `(64, 64)`, `WaveSize(64)` on `(32, 32)`, and unsized console `wave64` on `(32, 32)`. Verified with `cargo clippy -p victory-gpu --all-targets`, `cargo clippy -p victory --features diagnostics --all-targets`, `cargo test -p victory-gpu` (53 passed, 1 ignored), and `cargo xtask policy`. AI-assisted.
Author
Owner

@⁠sash2kk on GitHub · 2026-11-24 17:43 UTC · original

RTX 4090 data for @⁠JFIREonFIRE's change (refuse console wave64 compute that declares no wave size when host_max < 64). It confirms what the 3090 and the 5070 Ti showed.

Same machine as my reports above (Windows 11 Pro 23H2, RTX 4090, driver 32.0.16.1088), diagnostics build, VICTORY_D3D12_DRED=1, same save and VICTORY_KEYS. Base: main ffe310e + this PR (7292690), with the one-line change from 6ef8aac (matches!(stage, "mesh" | "compute")) applied by hand.

build result
ffe310e + #578, 7 runs device removed every time, 6–12 s after compute eeed82b877b44b5f's first bind
ffe310e + #578 + compute refusal no device removal: 17.5 min in the world, until my 20-min timeout. eeed82b877b44b5f was bound once and refused. 2.1 fps and about 400 draws per frame on average.

This also settles my open question about the program. The trigger is its divergent loop on the 64-bit lanes-left mask, not the data-indexed descriptors I was chasing.

AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 17:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7139623061) RTX 4090 data for @⁠JFIREonFIRE's change (refuse console wave64 **compute** that declares no wave size when `host_max < 64`). It confirms what the 3090 and the 5070 Ti showed. Same machine as my reports above (Windows 11 Pro 23H2, RTX 4090, driver 32.0.16.1088), diagnostics build, `VICTORY_D3D12_DRED=1`, same save and `VICTORY_KEYS`. Base: `main` `ffe310e` + this PR (`7292690`), with the one-line change from `6ef8aac` (`matches!(stage, "mesh" | "compute")`) applied by hand. | build | result | |---|---| | `ffe310e` + #578, 7 runs | device removed every time, 6–12 s after `compute eeed82b877b44b5f`'s first bind | | `ffe310e` + #578 + compute refusal | **no device removal: 17.5 min in the world**, until my 20-min timeout. `eeed82b877b44b5f` was bound once and refused. 2.1 fps and about 400 draws per frame on average. | This also settles my open question about the program. The trigger is its divergent loop on the 64-bit lanes-left mask, not the data-indexed descriptors I was chasing. AI-assisted (Claude Code).
Author
Owner

@⁠MrEjecutor on GitHub · 2026-11-24 17:58 UTC · original

RTX 5060 Ti on d1eadf9 (the head before fb7facd, which I have not run): world frame rate up from ~1 to ~2 fps, but 2 of 4 runs still removed the device; adding MIN_DYNAMIC = 1 << 18 (#747) removed it in 4 of 4

RTX 5060 Ti 16 GB, driver 621.24, Intel Core Ultra 5 225F, Windows 11 26200, diag build, Series X, Enter every 10 s, 240 s runs alternated with main ffe310e. main: 2 of 2 removed (96 s, 121 s), world 0.8–1.0 fps. This PR: removed at 105 s and 165 s in 2 of 4 runs (0x887A0006), each right after a ~505 ms submission of one list holding the same 12 compute pipelines (listed in #747); world 1.5–2.5 fps. With the MIN_DYNAMIC change on top: 0 of 2 removed, and 0 of 2 with #322 added as well. Details and the branch with each layer as a commit: #747

Not tested: AMD, Series S, more runs. AI use: Claude Code (Claude Opus 5.5) ran and wrote this; checked by mrejecutor.

**@⁠MrEjecutor** on GitHub · 2026-11-24 17:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7139974688) **RTX 5060 Ti on `d1eadf9` (the head before `fb7facd`, which I have not run): world frame rate up from ~1 to ~2 fps, but 2 of 4 runs still removed the device; adding `MIN_DYNAMIC = 1 << 18` (#747) removed it in 4 of 4** RTX 5060 Ti 16 GB, driver 621.24, Intel Core Ultra 5 225F, Windows 11 26200, diag build, Series X, Enter every 10 s, 240 s runs alternated with `main` `ffe310e`. `main`: 2 of 2 removed (96 s, 121 s), world 0.8–1.0 fps. This PR: removed at 105 s and 165 s in 2 of 4 runs (`0x887A0006`), each right after a ~505 ms submission of one list holding the same 12 compute pipelines (listed in #747); world 1.5–2.5 fps. With the `MIN_DYNAMIC` change on top: 0 of 2 removed, and 0 of 2 with #322 added as well. Details and the branch with each layer as a commit: https://git.gtahub.st/github/Marvisak--VIctory/issues/747 Not tested: AMD, Series S, more runs. AI use: Claude Code (Claude Opus 5.5) ran and wrote this; checked by mrejecutor.
Author
Owner

@⁠bvtterbroot on GitHub · 2026-11-24 18:20 UTC · original

AMD check at fb7facd (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: 173 passed, 0 failed, 2 ignored, on both GPUs. That includes its 3 new tests (dxil_wave_lanes_reads_psv0_bounds, emitted_wave_size_checked_against_host_range, wave_lanes_refusal_reports_emitted_and_host_ranges).

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

**@⁠bvtterbroot** on GitHub · 2026-11-24 18:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7140512671) AMD check at `fb7facd` (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`: **173 passed, 0 failed**, 2 ignored, on both GPUs. That includes its 3 new tests (`dxil_wave_lanes_reads_psv0_bounds`, `emitted_wave_size_checked_against_host_range`, `wave_lanes_refusal_reports_emitted_and_host_ranges`). Synthetic tests only, no game files. _Tested with AI assistance (Claude Code)._
Author
Owner

@⁠Bladureau on GitHub · 2026-11-24 19:48 UTC · original

Tested on an RTX 4060 Laptop (8 GB, 32-lane waves). With this PR the world no longer hangs the GPU here, even with video memory full.

Setup: Windows 11 Pro 26300, NVIDIA GeForce RTX 4060 Laptop GPU 8 GB (driver 617.14 / 32.0.16.1714), i7-13650HX, 32 GB. Title exe BLAKE3 b99f876b74d4a77f… (1.0.2.1), Series X mode. This PR's head fb7facd, merged cleanly onto main ffe310e with nothing else. Diag build (--profile diag --features diagnostics), VICTORY_D3D12_DRED=1, default loop limit, no skip. I played to the first mission's intro by hand in every run.

main ffe310e (3 runs) main + this PR (1 run)
World time before device removal 38 s, 83 s, 217 s (DXGI_ERROR_DEVICE_HUNG; in the two runs with DRED, it stopped in mesh draws) none: 579 s in the world, closed by me (exit 0, nothing new in crashes.log)
Slow submissions 19–95 per run, up to 5.3–5.4 s 8, at most 566 ms
Pipelines refused by the driver (host pipeline refused, E_INVALIDARG) 116–134 (debug layer id 622: wave lane count 64 > 32) 0, now refused up front: all three refusal reasons were logged (wave64 mesh, unsized wave64 compute, WaveSize(64) compute)
no dynamic slots drops ≥ 1,024 to ≥ 32,768 per run 0 (likely because the refused programs' draws no longer run)
Picture black black
At the end – 2 fps, about 410 ms/frame, 544 draws/frame

Host log: host wave lanes min=32 max=32. Two of the three main runs had the D3D12 debug layer on, which makes them slower than this one.

Video memory. I sampled \GPU Process Memory\Dedicated Usage once per second. The title stayed at 7.0–7.2 GB dedicated, out of an 8 GB card, for 360 s of the run, as in an earlier run without this PR. So on this 8 GB laptop, full VRAM is not what hangs the GPU. The wave64 programs this PR refuses are.

One run so far. I can repeat it, or run it with another PR on top (for example a 2^18 dynamic-slot change from #747), if that helps.

**@⁠Bladureau** on GitHub · 2026-11-24 19:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7142608468) Tested on an **RTX 4060 Laptop (8 GB, 32-lane waves)**. With this PR the world no longer hangs the GPU here, even with video memory full. **Setup:** Windows 11 Pro 26300, NVIDIA GeForce RTX 4060 Laptop GPU 8 GB (driver 617.14 / 32.0.16.1714), i7-13650HX, 32 GB. Title exe BLAKE3 `b99f876b74d4a77f…` (1.0.2.1), Series X mode. This PR's head `fb7facd`, merged cleanly onto `main` `ffe310e` with nothing else. Diag build (`--profile diag --features diagnostics`), `VICTORY_D3D12_DRED=1`, default loop limit, no skip. I played to the first mission's intro by hand in every run. | | `main` `ffe310e` (3 runs) | `main` + this PR (1 run) | |---|---|---| | World time before device removal | 38 s, 83 s, 217 s (`DXGI_ERROR_DEVICE_HUNG`; in the two runs with DRED, it stopped in mesh draws) | **none: 579 s in the world, closed by me** (exit 0, nothing new in `crashes.log`) | | Slow submissions | 19–95 per run, up to 5.3–5.4 s | 8, at most 566 ms | | Pipelines refused by the driver (`host pipeline refused`, E_INVALIDARG) | 116–134 (debug layer id 622: wave lane count 64 > 32) | 0, now refused up front: all three refusal reasons were logged (wave64 mesh, unsized wave64 compute, `WaveSize(64)` compute) | | `no dynamic slots` drops | ≥ 1,024 to ≥ 32,768 per run | 0 (likely because the refused programs' draws no longer run) | | Picture | black | black | | At the end | – | 2 fps, about 410 ms/frame, 544 draws/frame | Host log: `host wave lanes min=32 max=32`. Two of the three `main` runs had the D3D12 debug layer on, which makes them slower than this one. **Video memory.** I sampled `\GPU Process Memory\Dedicated Usage` once per second. The title stayed at 7.0–7.2 GB dedicated, out of an 8 GB card, for 360 s of the run, as in an earlier run without this PR. So on this 8 GB laptop, full VRAM is not what hangs the GPU. The wave64 programs this PR refuses are. One run so far. I can repeat it, or run it with another PR on top (for example a 2^18 dynamic-slot change from #747), if that helps.
Author
Owner

@⁠wildheathen on GitHub · 2026-11-24 19:59 UTC · original

RTX 5080 at fb7facd: no device removal in 393 s of world, against 68–91 s on main, #189 alone, or a loop cap. One run each, unattended.

Setup

  • Windows 11 (26300), RTX 5080 16 GB, driver 32.0.16.2124 (32..32 lanes), 31 GB RAM. Title 1.0.2.1, Series X.
  • --profile diag --features diagnostics, each tree in its own target dir; VICTORY_D3D12_DRED=1.
  • Identical runs: a fresh copy of the same save, so it goes straight to the story load; a fresh cache dir per run; VICTORY_KEYS=45:Enter,70:Enter,95:Enter,120:Enter,150:Enter; 480 s cap.
Run World entered Device removed DRED stop fps in world (median) Host pipelines refused
main ffe310e +79 s +84 s in world DispatchMesh, list command 61/64; draws of mesh 4adfa13bea1c556a 1.4 118
main + VICTORY_SHADER_LOOP_LIMIT=65536 +80 s +91 s DispatchMesh, command 3/80, mesh 4adfa13bea1c556a 1.2 120
#189 54b333f alone (Emulate, auto) +80 s +68 s DispatchMesh, command 670/862 1.1 0
#578 fb7facd +85 s none (393 s in world, stopped by the cap) — 4.7 0 (refused before PSO creation)
  • On this card main hangs on the same wave64 mesh program as @⁠Ilokaxt's 3070 Ti in #778 (4adfa13bea1c556a).
  • A 2^16 loop cap alone doesn't change that. This matches @⁠VibePorter's run F with a cap of 64 on the same GPU model.
  • #189 removes all 118 compute refusals but doesn't touch mesh programs, so it still hangs on a DispatchMesh, a bit sooner.
  • With #578 the device survives and the world runs 3–5 fps. The cost is what #778 describes: about 150–380 draws per frame reach the GPU, while ~2,300 per 5-second line are dropped without a host pipeline. The scene stays black.
  • One log line at startup confirms the host range is read: host wave lanes min=32 max=32. Another shows the PSV0 rule refusing a compute shader declaring [64, 64].

#578 + #189 (#189 merged onto fb7facd locally, no conflicts), same method: also no removal in 369 s of world. Median 4.4 fps, 210 draws/frame against 197 with #578 alone, and ~1,600 dropped per line against ~1,740. No compute pipeline is refused any more, because #189 lowers the wave64 compute that #578's PSV0 rule refused. But "does not translate" lines go from 536 to 698. That's #189's v_readfirstlane in divergent control flow regression (see my comment on #189): one of the most-dropped programs in this run, f1eff11f31566a6e, is in @⁠dragoso's list of 36 there. Forcing #189's Wave32 mode (VICTORY_WAVE64_EMULATE=wave32) on the same tree brings the device removal back after 41 s of world, on a compute dispatch of d3e44e754b3eb6aa, one of those 36. Details on #189.

So on the 5080 #578 does what it says: it turns the hang into dropped draws. Combined with wave64 lowering for mesh programs it would be the safety net rather than the fix. That's @⁠VibePorter's run E tree, which reached the tutorial with a loop cap of 64.

No game data, frames or shader names; hashes and counts only.

AI-assisted (Claude Code).

**@⁠wildheathen** on GitHub · 2026-11-24 19:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7142883232) **RTX 5080 at `fb7facd`: no device removal in 393 s of world, against 68–91 s on main, #189 alone, or a loop cap.** One run each, unattended. ### Setup - Windows 11 (26300), RTX 5080 16 GB, driver 32.0.16.2124 (32..32 lanes), 31 GB RAM. Title 1.0.2.1, Series X. - `--profile diag --features diagnostics`, each tree in its own target dir; `VICTORY_D3D12_DRED=1`. - Identical runs: a fresh copy of the same save, so it goes straight to the story load; a fresh cache dir per run; `VICTORY_KEYS=45:Enter,70:Enter,95:Enter,120:Enter,150:Enter`; 480 s cap. | Run | World entered | Device removed | DRED stop | fps in world (median) | Host pipelines refused | |---|---|---|---|---|---| | main `ffe310e` | +79 s | **+84 s in world** | `DispatchMesh`, list command 61/64; draws of mesh `4adfa13bea1c556a` | 1.4 | 118 | | main + `VICTORY_SHADER_LOOP_LIMIT=65536` | +80 s | **+91 s** | `DispatchMesh`, command 3/80, mesh `4adfa13bea1c556a` | 1.2 | 120 | | #189 `54b333f` alone (`Emulate`, auto) | +80 s | **+68 s** | `DispatchMesh`, command 670/862 | 1.1 | 0 | | **#578 `fb7facd`** | +85 s | **none** (393 s in world, stopped by the cap) | — | **4.7** | 0 (refused before PSO creation) | - On this card main hangs on the same wave64 mesh program as @⁠Ilokaxt's 3070 Ti in #778 (`4adfa13bea1c556a`). - A 2^16 loop cap alone doesn't change that. This matches @⁠VibePorter's run F with a cap of 64 on the same GPU model. - #189 removes all 118 compute refusals but doesn't touch mesh programs, so it still hangs on a `DispatchMesh`, a bit sooner. - With #578 the device survives and the world runs 3–5 fps. The cost is what #778 describes: about 150–380 draws per frame reach the GPU, while ~2,300 per 5-second line are dropped without a host pipeline. The scene stays black. - One log line at startup confirms the host range is read: `host wave lanes min=32 max=32`. Another shows the PSV0 rule refusing a compute shader declaring `[64, 64]`. **#578 + #189** (#189 merged onto `fb7facd` locally, no conflicts), same method: also **no removal** in 369 s of world. Median 4.4 fps, 210 draws/frame against 197 with #578 alone, and ~1,600 dropped per line against ~1,740. No compute pipeline is refused any more, because #189 lowers the wave64 compute that #578's PSV0 rule refused. But "does not translate" lines go from 536 to 698. That's #189's `v_readfirstlane in divergent control flow` regression (see my comment on #189): one of the most-dropped programs in this run, `f1eff11f31566a6e`, is in @⁠dragoso's list of 36 there. Forcing #189's `Wave32` mode (`VICTORY_WAVE64_EMULATE=wave32`) on the same tree brings the device removal back after 41 s of world, on a compute dispatch of `d3e44e754b3eb6aa`, one of those 36. Details on #189. So on the 5080 #578 does what it says: it turns the hang into dropped draws. Combined with wave64 lowering for mesh programs it would be the safety net rather than the fix. That's @⁠VibePorter's run E tree, which reached the tutorial with a loop cap of 64. No game data, frames or shader names; hashes and counts only. AI-assisted (Claude Code).
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 20:26 UTC · original

How many programs this actually costs on a 32-lane host, measured over the archive

I ran the offline pipeline path over the whole shaders.rpf on two adapters of one machine, choosing the adapter explicitly (on this machine DXGI's default is the integrated GPU, so without that every number below would have been the iGPU's):

  • adapter 0: AMD Radeon(TM) Graphics, driver 32.0.21045.29003 — 64-lane waves.
  • adapter 1: NVIDIA GeForce RTX 4090, driver 32.0.16.2124 (the 621.24 release) — 32-lane waves.

Command: victory translate shaders.rpf --validate --pipelines --list --jobs 10, with VICTORY_D3D12_ADAPTER=1 for the NVIDIA run. Then the refused programs were joined by name to their container digest and to @⁠cobrajet302gt's compute inventory (the table in #417) for the wave each native program runs in.

adapter 0 (64-lane AMD) adapter 1 (32-lane NVIDIA)
vertex and pixel pipelines 12,231 of 12,231 12,231 of 12,231
compute pipelines 1,441 of 1,441 1,121 of 1,441
mesh pipelines 0 of 8,214 (no mesh shaders on that adapter) 8,214 of 8,214

The 320 compute refusals on the NVIDIA host:

  • all 320 are E_INVALIDARG at CreatePipelineState ("The parameter is incorrect"), no other reason; the e.g. row names cascadeshadows_rendering:CS_ShadowRenderTiledMiscPPPC_9945271c_Wrapped.
  • 320 of 320 are wave64 programs. None of the archive's 1,531 distinct wave32 compute programs fails. Of the 1,151 distinct wave64 compute programs, 320 fail and 831 get a pipeline, so "wave64 compute does not run on a 32-lane host" is not the situation on this card.
  • 261 of the 320 are workgroups of exactly 64 threads (8x8x1 170, 64x1x1 77, 4x4x4 14) — one console wave — which is the case crates/victory-shader/src/emit/lower.rs:404 pins WaveSize(wave) for (one_wave && s.lds_dwords > 0), and the rest also read console lanes. In other words the set that fails is the set whose emitted DXIL declares WaveSize(64), not the set whose console program runs in 64-lane waves.

That last point is what the proposal above already says it wants to do — inspect the emitted PSV0 wave-lane range instead of the console program's wave — and the numbers say it matters: a blanket "refuse wave64 compute on narrow hosts" would drop 831 programs that do work on this host, while the PSV0 check costs 320, and 320 of 1,441 compute programs is the size of the actual loss to weigh against the TDR risk.

Not covered here: what the runtime does with those 320 (it creates its own pipelines, and this measurement is the offline path), and whether the 831 that get a pipeline also run correctly in a dispatch — the offline path only proves creation.

No game data is involved: counts, adapter descriptions and program names only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 20:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7143549752) **How many programs this actually costs on a 32-lane host, measured over the archive** I ran the offline pipeline path over the whole `shaders.rpf` on two adapters of one machine, choosing the adapter explicitly (on this machine DXGI's default is the integrated GPU, so without that every number below would have been the iGPU's): - adapter 0: `AMD Radeon(TM) Graphics`, driver `32.0.21045.29003` — 64-lane waves. - adapter 1: `NVIDIA GeForce RTX 4090`, driver `32.0.16.2124` (the 621.24 release) — 32-lane waves. Command: `victory translate shaders.rpf --validate --pipelines --list --jobs 10`, with `VICTORY_D3D12_ADAPTER=1` for the NVIDIA run. Then the refused programs were joined by name to their container digest and to @⁠cobrajet302gt's compute inventory (the table in #417) for the wave each native program runs in. | | adapter 0 (64-lane AMD) | adapter 1 (32-lane NVIDIA) | |---|---|---| | vertex and pixel pipelines | 12,231 of 12,231 | 12,231 of 12,231 | | compute pipelines | 1,441 of 1,441 | **1,121 of 1,441** | | mesh pipelines | 0 of 8,214 (no mesh shaders on that adapter) | 8,214 of 8,214 | The 320 compute refusals on the NVIDIA host: - **all 320 are `E_INVALIDARG` at `CreatePipelineState`** ("The parameter is incorrect"), no other reason; the e.g. row names `cascadeshadows_rendering:CS_ShadowRenderTiledMiscPPPC_9945271c_Wrapped`. - **320 of 320 are wave64 programs.** None of the archive's 1,531 distinct wave32 compute programs fails. Of the **1,151 distinct wave64 compute programs, 320 fail and 831 get a pipeline**, so "wave64 compute does not run on a 32-lane host" is not the situation on this card. - 261 of the 320 are workgroups of exactly 64 threads (`8x8x1` 170, `64x1x1` 77, `4x4x4` 14) — one console wave — which is the case `crates/victory-shader/src/emit/lower.rs:404` pins `WaveSize(wave)` for (`one_wave && s.lds_dwords > 0`), and the rest also read console lanes. In other words the set that fails is the set whose emitted DXIL *declares* `WaveSize(64)`, not the set whose console program runs in 64-lane waves. That last point is what the proposal above already says it wants to do — inspect the emitted `PSV0` wave-lane range instead of the console program's wave — and the numbers say it matters: a blanket "refuse wave64 compute on narrow hosts" would drop **831 programs that do work on this host**, while the PSV0 check costs **320**, and 320 of 1,441 compute programs is the size of the actual loss to weigh against the TDR risk. Not covered here: what the *runtime* does with those 320 (it creates its own pipelines, and this measurement is the offline path), and whether the 831 that get a pipeline also run correctly in a dispatch — the offline path only proves creation. No game data is involved: counts, adapter descriptions and program names only. Written with an AI assistant.
Author
Owner

@⁠cobrajet302gt on GitHub · 2026-11-24 20:44 UTC · original

@⁠fiestorra joined from our side to refine the shape of that number — one histogram from the posted labels (gist 1c777c2510e44e343101f9a183ac119e):

  • distinct compute containers with exactly 64 threads (8x8x1): 416 (plus 298 64x1x1 and 32 4x4x4 → 746 one-wave-64 candidates over the whole corpus; your 261-of-320 concentration in that shape matches the intersection with lds_dwords > 0 at lower.rs:404).
  • So the corpus-wide ceiling on "declares WaveSize(64)" style refusals is bounded by the group-shape histogram, and your 4090's realized 320 is well inside it. The wave-label caveat worth pinning for anyone reading this thread: console wave64 (our label, FSSM 0xD4 bit 5) and emitted WaveSize(64) (what actually refuses/hangs) are different predicates; 831 of 1,151 labeled-wave64 compute programs get pipelines on this host. Use our labels for corpus scope and PSV0 bounds for refusal scope.
  • Your iGPU row (12,231/12,231 vertex+pixel, mesh 0 for lack of mesh support) plus the all-stage labels also bound the mesh question: every one of the 8,765 distinct mesh programs is console-wave64, but your 4090 created 8,214 of 8,214 mesh pipelines — so console-wave64 mesh clearly builds fine on this driver, and the open question stays runtime dispatch behavior (which is where the TDR evidence lives, not creation). Our posted line that "the mesh stage is all-wave64 and therefore exposed" should be read as scope, not as a creation-refusal count.

The adapter-explicit methodology is the right template; if a --jobs 10 run on the NVIDIA host with VICTORY_SKIP/PSV0 variants produces per-reason lists, we can fold each into the labels the same way. Written with an AI assistant.

**@⁠cobrajet302gt** on GitHub · 2026-11-24 20:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7144004627) @⁠fiestorra joined from our side to refine the shape of that number — one histogram from the posted labels (gist `1c777c2510e44e343101f9a183ac119e`): - distinct compute containers with exactly 64 threads (`8x8x1`): **416** (plus 298 `64x1x1` and 32 `4x4x4` → 746 one-wave-64 candidates over the whole corpus; your 261-of-320 concentration in that shape matches the intersection with `lds_dwords > 0` at `lower.rs:404`). - So the corpus-wide ceiling on "declares WaveSize(64)" style refusals is bounded by the group-shape histogram, and your 4090's realized 320 is well inside it. The wave-label caveat worth pinning for anyone reading this thread: **console `wave64` (our label, FSSM `0xD4` bit 5) and emitted `WaveSize(64)` (what actually refuses/hangs) are different predicates**; 831 of 1,151 labeled-wave64 compute programs get pipelines on this host. Use our labels for corpus scope and PSV0 bounds for refusal scope. - Your iGPU row (12,231/12,231 vertex+pixel, mesh 0 for lack of mesh support) plus the all-stage labels also bound the mesh question: every one of the 8,765 distinct mesh programs is console-wave64, but your 4090 created 8,214 of 8,214 mesh pipelines — so console-wave64 mesh clearly *builds* fine on this driver, and the open question stays runtime dispatch behavior (which is where the TDR evidence lives, not creation). Our posted line that "the mesh stage is all-wave64 and therefore exposed" should be read as scope, not as a creation-refusal count. The adapter-explicit methodology is the right template; if a `--jobs 10` run on the NVIDIA host with `VICTORY_SKIP`/PSV0 variants produces per-reason lists, we can fold each into the labels the same way. Written with an AI assistant.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-24 20:55 UTC · original

RTX 4090 (32-lane waves, host wave lanes min=32 max=32), driver 32.0.16.2124, Windows 11 26300, title 1.0.2.1, diag build, VICTORY_D3D12_DRED=1, VICTORY_SHADER_LOOP_LIMIT=1024, input by hand. All trees on main ffe310e + #32. On the question of whether the mesh half of this PR is needed once #493 is in: on this card, refusing only wave64 compute (this PR at fb7facd) together with #493 keeps the world's mesh draws, with no hang so far.

tree world draws/frame mesh pipelines made outcome
main 0.7–8 fps 390–2,965 – DEVICE_HUNG ~15 s in, depth-only pass of 12 wave64 mesh programs
+ this PR fb7facd 3.7–4.9 fps ~230–270 – no removal in 3 min (stopped)
+ #493 c48b240 1.1–1.6 fps 1,800–2,800 430 DEVICE_HUNG 18 s after compute d3e44e754b3eb6aa first ran (details on #189)
+ #493 + this PR 1.4–5.6 fps 100–200 0 no removal in 65 s (stopped)
+ #493 + this PR, mesh refusal off 1.1–4.0 fps 900–3,076 457 no removal, still running at 64 s when posting

"Mesh refusal off" is a local switch, not a change I'm proposing as is: in wave_lanes_unsupported, VICTORY_ALLOW_WAVE64_MESH limits wave64_stage to "compute". d3e44e754b3eb6aa is translated in that run but gets no host pipeline (refused as unsized wave64 compute), the hang from the #493-only row doesn't come back, and there are 0 slow submissions. That matches @⁠ChruutvoLuzi's #493 result on another 4090, and @⁠Machad3x's point that the wave64 mesh programs aren't what hangs once their reads are bounded.

The picture is still black apart from the UI in every row. One run per row; I'll add the final duration of the last run.

AI-assisted test report.

**@⁠Yorivel** on GitHub · 2026-11-24 20:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7144230281) RTX 4090 (32-lane waves, `host wave lanes min=32 max=32`), driver 32.0.16.2124, Windows 11 26300, title 1.0.2.1, diag build, `VICTORY_D3D12_DRED=1`, `VICTORY_SHADER_LOOP_LIMIT=1024`, input by hand. All trees on `main` `ffe310e` + #32. On the question of whether the **mesh** half of this PR is needed once #493 is in: on this card, refusing only wave64 **compute** (this PR at `fb7facd`) together with #493 keeps the world's mesh draws, with no hang so far. | tree | world | draws/frame | mesh pipelines made | outcome | |---|---|---|---|---| | `main` | 0.7–8 fps | 390–2,965 | – | `DEVICE_HUNG` ~15 s in, depth-only pass of 12 wave64 mesh programs | | + this PR `fb7facd` | 3.7–4.9 fps | ~230–270 | – | no removal in 3 min (stopped) | | + #493 `c48b240` | 1.1–1.6 fps | 1,800–2,800 | 430 | `DEVICE_HUNG` 18 s after `compute d3e44e754b3eb6aa` first ran (details on #189) | | + #493 + this PR | 1.4–5.6 fps | 100–200 | 0 | no removal in 65 s (stopped) | | + #493 + this PR, **mesh refusal off** | 1.1–4.0 fps | **900–3,076** | 457 | **no removal**, still running at 64 s when posting | "Mesh refusal off" is a local switch, not a change I'm proposing as is: in `wave_lanes_unsupported`, `VICTORY_ALLOW_WAVE64_MESH` limits `wave64_stage` to `"compute"`. `d3e44e754b3eb6aa` is translated in that run but gets no host pipeline (refused as unsized wave64 compute), the hang from the #493-only row doesn't come back, and there are 0 slow submissions. That matches @⁠ChruutvoLuzi's #493 result on another 4090, and @⁠Machad3x's point that the wave64 mesh programs aren't what hangs once their reads are bounded. The picture is still black apart from the UI in every row. One run per row; I'll add the final duration of the last run. AI-assisted test report.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-24 21:09 UTC · original

Final duration for the last row of my table above (main ffe310e + #32 + #493 + this PR fb7facd, wave64 mesh refusal off, RTX 4090): 15 min 47 s in the world, no device removal, 0 slow submissions, stopped by hand.

  • Draws: up to 4,144/frame (mean 2.3 fps over 165 samples). d3e44e754b3eb6aa never got a host pipeline.
  • It got through the prologue chapter card to player control: the on-foot movement prompt appears, and the pause menu and settings open and work with input from the keyboard stand-in pad.
  • The 3D view stays black throughout (pixel values 0–1 in a window capture). Only UI drawn after the scene shows.

One run.

AI-assisted test report.

**@⁠Yorivel** on GitHub · 2026-11-24 21:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7144559922) Final duration for the last row of my table above (`main` `ffe310e` + #32 + #493 + this PR `fb7facd`, wave64 mesh refusal off, RTX 4090): **15 min 47 s in the world, no device removal, 0 slow submissions**, stopped by hand. - Draws: up to 4,144/frame (mean 2.3 fps over 165 samples). `d3e44e754b3eb6aa` never got a host pipeline. - It got through the prologue chapter card to player control: the on-foot movement prompt appears, and the pause menu and settings open and work with input from the keyboard stand-in pad. - The 3D view stays black throughout (pixel values 0–1 in a window capture). Only UI drawn after the scene shows. One run. AI-assisted test report.
Author
Owner

@⁠cyudev on GitHub · 2026-11-24 21:57 UTC · original

RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on main holds 16+ minutes in the world, under the video memory budget

Machine: RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile.
Tree: main ffe310e + #578 (pr-578 head) + #1296 (a6f3ccb) + #1666 (a672556). All three merge cleanly. Diagnostics build, fresh shader cache, only VICTORY_LOG=info set.

Result: world entered at ~21:42 UTC and still running at 21:58 with no device removal, no ERROR, no no upload buffer, no crashes.log. The 3D scene is black, as on every card, with sound and subtitles.

earlier runs on this card (integration/testers u10, ± #1666) this tree
time in the world 2.5-6 min, then upload-heap E_OUTOFMEMORY and device removal 16+ min, still running
video memory in use / budget ~9,200 / 7,256 MB (over budget from world entry) ~6,000 / 7,085 MB
system memory in use / budget 4,300-5,600 / 7,437 MB, climbing ~2,000 / 7,437 MB, flat
list scratch 1,500 MB (130-170 with #1666) 104 MB, flat
frame rate in the world 0.2-0.3 fps 3.2 fps (308 ms/frame)

Memory figures come from #1666's host memory: line (QueryVideoMemoryInfo), every 5 s.

What each did, by the log:

  • #1296: auto-enabling VICTORY_TEXTURE_MIP_DROP=1 for <= 8 GB GPU (vram_mb=8024). Video memory stayed ~3 GB lower than without it, which brings this card under budget.
  • #578: host wave lanes min=32 max=32, then one log line each for refused wave64 programs: compute (052a2316a03b9ba1), mesh, and compute with PSV0 [64, 64]. No hang; that matches #1508's RTX 4060 Laptop run (579 s with #578).
  • #1666: list scratch flat at ~104 MB.

Still there: 512 shader does not translate lines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect. no host texture comes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree.

The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability.

Counts and messages only; no game data.

**@⁠cyudev** on GitHub · 2026-11-24 21:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7145620195) ## RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on `main` holds 16+ minutes in the world, under the video memory budget **Machine:** RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile. **Tree:** `main` `ffe310e` + #578 (`pr-578` head) + #1296 (`a6f3ccb`) + #1666 (`a672556`). All three merge cleanly. Diagnostics build, fresh shader cache, only `VICTORY_LOG=info` set. **Result:** world entered at ~21:42 UTC and still running at 21:58 with no device removal, no `ERROR`, no `no upload buffer`, no `crashes.log`. The 3D scene is black, as on every card, with sound and subtitles. | | earlier runs on this card (`integration/testers` u10, ± #1666) | this tree | |---|---|---| | time in the world | 2.5-6 min, then upload-heap `E_OUTOFMEMORY` and device removal | **16+ min, still running** | | video memory in use / budget | ~9,200 / 7,256 MB (over budget from world entry) | **~6,000 / 7,085 MB** | | system memory in use / budget | 4,300-5,600 / 7,437 MB, climbing | **~2,000 / 7,437 MB, flat** | | list scratch | 1,500 MB (130-170 with #1666) | **104 MB, flat** | | frame rate in the world | 0.2-0.3 fps | **3.2 fps** (308 ms/frame) | Memory figures come from #1666's `host memory:` line (`QueryVideoMemoryInfo`), every 5 s. **What each did, by the log:** - **#1296:** `auto-enabling VICTORY_TEXTURE_MIP_DROP=1 for <= 8 GB GPU (vram_mb=8024)`. Video memory stayed ~3 GB lower than without it, which brings this card under budget. - **#578:** `host wave lanes min=32 max=32`, then one log line each for refused wave64 programs: compute (`052a2316a03b9ba1`), mesh, and compute with PSV0 `[64, 64]`. No hang; that matches #1508's RTX 4060 Laptop run (579 s with #578). - **#1666:** list scratch flat at ~104 MB. **Still there:** 512 `shader does not translate` lines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect. `no host texture` comes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree. The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability. Counts and messages only; no game data.
Author
Owner

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

@⁠cyudev — label keeper checking in, since our census is cited as the baseline: treat 1,151 as a ceiling, not the expected refuse count. Our wave64 tag is the console-side declaration (FSSM 0xD4 bit 5), not a runtime predicate; the realized 32-lane fail set is bracketed by two independent measurements in this thread now: fiestorra's offline table: 831 of 1,151 labeled-wave64 computes CREATE fine on a 32-lane adapter, 320 refuse (E_INVALIDARG at creation; fail set = emitted DXIL that declares WaveSize(64), concentrated in the 64-thread one-wave group shapes — 416 8x8x1 + 298 64x1x1 + 32 4x4x4 distinct in the corpus, gist 1c777c2510e44e343101f9a183ac119e) — and your run: zero refuses at runtime. Both are right: creation-refuse and later bind/translate-drop are different filters, and your 512 shader does not translate + ~4,250 draws/frame dropped is where the rest went. So for anyone sizing #578's coverage cost: the honest range on this driver family is "320 refuse at creation, ~0 at runtime, the remainder dies at translation" — which is exactly the argument for merging 578 with the translation work rather than before it.

One data request for the stability isolation: if a variant run drops #578 from that exact tree, the refuse/no-refuse diff plus your 3.2 fps baseline tells the thread what 578 costs in world, and with #1296 auto-gating on VRAM the matrix stays cheap. Happy to fold any per-program lists into the labels the same way as before. Written with an AI assistant.

**@⁠cobrajet302gt** on GitHub · 2026-11-24 22:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7145787590) @⁠cyudev — label keeper checking in, since our census is cited as the baseline: treat 1,151 as a **ceiling**, not the expected refuse count. Our `wave64` tag is the console-side declaration (FSSM `0xD4` bit 5), not a runtime predicate; the realized 32-lane fail set is bracketed by two independent measurements in this thread now: **fiestorra's offline table: 831 of 1,151 labeled-wave64 computes CREATE fine on a 32-lane adapter, 320 refuse** (`E_INVALIDARG` at creation; fail set = emitted DXIL that *declares* `WaveSize(64)`, concentrated in the 64-thread one-wave group shapes — 416 `8x8x1` + 298 `64x1x1` + 32 `4x4x4` distinct in the corpus, gist `1c777c2510e44e343101f9a183ac119e`) — and **your run: zero refuses at runtime**. Both are right: creation-refuse and later bind/translate-drop are different filters, and your 512 `shader does not translate` + ~4,250 draws/frame dropped is where the rest went. So for anyone sizing #578's coverage cost: the honest range on this driver family is "320 refuse at creation, ~0 at runtime, the remainder dies at translation" — which is exactly the argument for merging 578 *with* the translation work rather than before it. One data request for the stability isolation: if a variant run drops #578 from that exact tree, the refuse/no-refuse diff plus your 3.2 fps baseline tells the thread what 578 costs *in world*, and with #1296 auto-gating on VRAM the matrix stays cheap. Happy to fold any per-program lists into the labels the same way as before. Written with an AI assistant.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:27 UTC · original

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/host.rs, crates/victory-gpu/src/pipeline.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7148530023) <!-- victory-triage v1 head=fb7facde2d44e0f3f20ba4afbf07147e3339135f verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-gpu/src/host.rs`, `crates/victory-gpu/src/pipeline.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

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

Rebased this onto current main (4118f33) since it carries the needs-rebase label: all five commits kept with your authorship and messages, seven conflict hunks resolved (the heap_atomics64 neighbour in host.rs, the newer Shader::new/translated shape in pipeline.rs, and the test module joins in pipeline/host.rs), Windows-target clippy clean with and without --all-features, native tests green, asset policy ok. The three tests need victory-gpu on Windows; I ran their bodies against the real parser through an off-tree harness and they pass.

It is open as #1922 in case the maintainer prefers merging a ready branch. If you would rather update this PR yourself, reset gpu/refuse-wave64-on-32-lane-hosts to 24a7bc20b8579eeb46796e13f8c590ee55479886 and I will close mine. Nothing in the resolution changes what the change does.

One thing I noticed while reading it: main still has ID3D12CommandQueue::Wait as a no-op (queue.rs:167), and every submission is waited synchronously today, so cross-queue ordering is accidental. #32 is the PR that fixes Wait; a title that relies on Wait before the queue is truly ordered would see the difference. Worth a line in the PR body if #1922 gets merged before #32.

**@⁠slatefield** on GitHub · 2026-11-25 01:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/578#issuecomment-7149135997) Rebased this onto current `main` (`4118f33`) since it carries the needs-rebase label: all five commits kept with your authorship and messages, seven conflict hunks resolved (the `heap_atomics64` neighbour in `host.rs`, the newer `Shader::new`/`translated` shape in `pipeline.rs`, and the test module joins in `pipeline/host.rs`), Windows-target clippy clean with and without `--all-features`, native tests green, asset policy ok. The three tests need `victory-gpu` on Windows; I ran their bodies against the real parser through an off-tree harness and they pass. It is open as #1922 in case the maintainer prefers merging a ready branch. If you would rather update this PR yourself, reset `gpu/refuse-wave64-on-32-lane-hosts` to `24a7bc20b8579eeb46796e13f8c590ee55479886` and I will close mine. Nothing in the resolution changes what the change does. One thing I noticed while reading it: `main` still has `ID3D12CommandQueue::Wait` as a no-op (`queue.rs:167`), and every submission is waited synchronously today, so cross-queue ordering is accidental. #32 is the PR that fixes `Wait`; a title that relies on `Wait` before the queue is truly ordered would see the difference. Worth a line in the PR body if #1922 gets merged before #32.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/pipeline.rs
  • crates/victory-gpu/src/pipeline/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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