[NVIDIA RTX 3070] World TDR traced to wave64 mesh shaders (DRED per run); #578 removes the hang, world then renders black #778

Open
opened 2026-11-26 04:13:57 +00:00 by github-bot · 32 comments
Owner

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

Related: #314, #625, #392 (same symptom on other NVIDIA cards), #578, #189, #192, #734.

Setup: Windows 11 Pro 26200, Ryzen 5 3600X, 32 GB, NVIDIA RTX 3070 (driver 32.0.16.2124, 32-lane waves only). VIctory 8e79c80, cargo build --profile diag -p victory --features diagnostics. Own copy, title 1.0.2.1 (exe BLAKE3 b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93).

Works: boot, offline profile, intro, first-boot screens, legal/terms, saves, story load. Menus at a steady 30 fps. Network stays closed: the title's Breakpad crash reporter tried to upload a ~28 MB minidump to submit.backtrace.io:443 after a WARP crash and victory_hle::modules::net blocked it (HTTP connection blocked).

Problem: entering the world always ends in DXGI_ERROR_DEVICE_HUNG (TDR), not an invalid command (debug layer message is the TDR one).

What VICTORY_D3D12_DRED=1 showed, run by run:

Run Settings Where the list stopped
1 defaults (+ debug layer) command 417 of 602, op 42 DispatchMesh, inside a run of DispatchMesh (414..470) between two barriers
2 VICTORY_SHADER_LOOP_LIMIT=4096 GPU time per world frame fell from ~1.1 s to 0.1–0.7 s and the run went further, then: ExecuteIndirect kind 10 (mesh), mesh d9abe24ad7bfe920, pixel 264ae8d58e78b62d
3 + VICTORY_SKIP_PIPELINES=d9abe24ad7bfe920 DispatchMesh of one group, mesh f0c7efd2aceb2aaa, pixel 7d85c9cab3c80721
4 VICTORY_SHADER_LOOP_LIMIT=64 + same skip DispatchMesh 111 groups, mesh 4adfa13bea1c556a
5 main + #578 merged locally (no loop limit, no skip) no TDR for 10 minutes in the world (~1 fps), frames black (all channels 0..2), no host pipeline: a mesh program written for 64-lane waves, on a host without them

So a hang that survives a loop limit of 64 on a single mesh group points at wave64 mesh programs running as two 32-lane waves (lockstep/LDS assumptions), not at long loops alone. #578 turns it into dropped draws on this GPU; the world then renders black.

Other observations

  • 271 compute shaders "do not translate" on this GPU with main (wave64).
  • Two 2560×1440 render targets are refused by the driver: DXGI format 86 (B5G5R5A1) with flags 5 and 115 (B4G4R4A4) with flags 1 (no host texture … 0x80070057).
  • Device methods at vtable offsets 0x1c8 and 0x218 are logged as not implemented.
  • host view heap capped at 1000000 (count 1245184).
  • With VICTORY_D3D12_WARP=1 the title's own watchdog ends the run (mov dword [0], 0 after ~30 s without progress), so WARP can't reach the world at that speed.

AI-assisted (Claude Code): the runs were made on my machine with my copy; nothing from the game is attached.

**@⁠KenzoPortela** on GitHub · 2026-11-24 10:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/778) Related: #314, #625, #392 (same symptom on other NVIDIA cards), #578, #189, #192, #734. **Setup**: Windows 11 Pro 26200, Ryzen 5 3600X, 32 GB, **NVIDIA RTX 3070** (driver 32.0.16.2124, 32-lane waves only). VIctory `8e79c80`, `cargo build --profile diag -p victory --features diagnostics`. Own copy, title 1.0.2.1 (exe BLAKE3 `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93`). **Works**: boot, offline profile, intro, first-boot screens, legal/terms, saves, story load. Menus at a steady 30 fps. Network stays closed: the title's Breakpad crash reporter tried to upload a ~28 MB minidump to `submit.backtrace.io:443` after a WARP crash and `victory_hle::modules::net` blocked it (`HTTP connection blocked`). **Problem**: entering the world always ends in `DXGI_ERROR_DEVICE_HUNG` (TDR), not an invalid command (debug layer message is the TDR one). What `VICTORY_D3D12_DRED=1` showed, run by run: | Run | Settings | Where the list stopped | |---|---|---| | 1 | defaults (+ debug layer) | command 417 of 602, **op 42 DispatchMesh**, inside a run of DispatchMesh (414..470) between two barriers | | 2 | `VICTORY_SHADER_LOOP_LIMIT=4096` | GPU time per world frame fell from ~1.1 s to 0.1–0.7 s and the run went further, then: ExecuteIndirect kind 10 (mesh), `mesh d9abe24ad7bfe920, pixel 264ae8d58e78b62d` | | 3 | + `VICTORY_SKIP_PIPELINES=d9abe24ad7bfe920` | DispatchMesh of **one group**, `mesh f0c7efd2aceb2aaa, pixel 7d85c9cab3c80721` | | 4 | `VICTORY_SHADER_LOOP_LIMIT=64` + same skip | DispatchMesh 111 groups, `mesh 4adfa13bea1c556a` | | 5 | `main` + **#578** merged locally (no loop limit, no skip) | **no TDR for 10 minutes in the world** (~1 fps), frames black (all channels 0..2), `no host pipeline: a mesh program written for 64-lane waves, on a host without them` | So a hang that survives a loop limit of 64 on a single mesh group points at wave64 mesh programs running as two 32-lane waves (lockstep/LDS assumptions), not at long loops alone. #578 turns it into dropped draws on this GPU; the world then renders black. **Other observations** - 271 compute shaders "do not translate" on this GPU with `main` (wave64). - Two 2560×1440 render targets are refused by the driver: DXGI format 86 (B5G5R5A1) with flags 5 and 115 (B4G4R4A4) with flags 1 (`no host texture … 0x80070057`). - Device methods at vtable offsets `0x1c8` and `0x218` are logged as not implemented. - `host view heap capped at 1000000` (count 1245184). - With `VICTORY_D3D12_WARP=1` the title's own watchdog ends the run (`mov dword [0], 0` after ~30 s without progress), so WARP can't reach the world at that speed. AI-assisted (Claude Code): the runs were made on my machine with my copy; nothing from the game is attached.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:57 +00:00
Author
Owner

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

Follow-up on the same RTX 3070 (32-lane waves), local branch = 8e79c80 + #578 + the #747 change (MIN_DYNAMIC = 1 << 18):

  • #747 helps here too: with the capped heap's dynamic slots at 2^18, the title gets further and reaches gameplay (HUD movement/camera prompt shown, ~0.6 fps, 9.5 min without a TDR), world still black.
  • Getting further exposes one more hang: compute eeed82b877b44b5f (dispatch 12×1×1, DRED stop on op 6) also translated on main; it was simply never reached before. Skipping it (VICTORY_SKIP_PIPELINES) plus VICTORY_SHADER_LOOP_LIMIT=4096 gives the stable run above.
  • With the wave64-emulation branch from #734 on top, ~500 translation refusals remain in the world, of which only ~130 are wave64-related ("a step across lanes in lane-dependent code…" 105, "a compute group of several 64-lane waves…" 25); the rest are general (select on an untracked mask 83, descriptor read only as data 79, lane mask read as data 73, structured buffer of unknown stride 36, …).
  • I tried narrowing #578's shortcut ("a wave64 program that never looks at other lanes would run"): computing the compute path's lane-reading test (console_lanes: swizzle/permute/mbcnt/readlane/DPP/masks as data/constant lane sets, plus LDS within one console wave) for mesh programs too and only refusing the lane-dependent ones. Result in the world: only 6 of ~66 distinct wave64 mesh programs pass; ~1,640 mesh draws per frame stay refused. So on this title the world's mesh programs really read across lanes, and NVIDIA needs a real wave64-on-wave32 form for mesh (two 32-lane halves exchanging masks/lane values), not a looser refusal. Happy to share the small diff if useful.

AI-assisted (Claude Code); nothing from the game attached.

**@⁠KenzoPortela** on GitHub · 2026-11-24 11:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7129731192) Follow-up on the same RTX 3070 (32-lane waves), local branch = `8e79c80` + #578 + the #747 change (`MIN_DYNAMIC = 1 << 18`): - **#747 helps here too**: with the capped heap's dynamic slots at 2^18, the title gets further and reaches gameplay (HUD movement/camera prompt shown, ~0.6 fps, 9.5 min without a TDR), world still black. - Getting further exposes one more hang: compute `eeed82b877b44b5f` (dispatch 12×1×1, DRED stop on op 6) also translated on `main`; it was simply never reached before. Skipping it (`VICTORY_SKIP_PIPELINES`) plus `VICTORY_SHADER_LOOP_LIMIT=4096` gives the stable run above. - With the `wave64-emulation` branch from #734 on top, ~500 translation refusals remain in the world, of which only ~130 are wave64-related ("a step across lanes in lane-dependent code…" 105, "a compute group of several 64-lane waves…" 25); the rest are general (select on an untracked mask 83, descriptor read only as data 79, lane mask read as data 73, structured buffer of unknown stride 36, …). - I tried narrowing #578's shortcut ("a wave64 program that never looks at other lanes would run"): computing the compute path's lane-reading test (`console_lanes`: swizzle/permute/mbcnt/readlane/DPP/masks as data/constant lane sets, plus LDS within one console wave) for mesh programs too and only refusing the lane-dependent ones. Result in the world: only 6 of ~66 distinct wave64 mesh programs pass; ~1,640 mesh draws per frame stay refused. So on this title the world's mesh programs really read across lanes, and NVIDIA needs a real wave64-on-wave32 form for mesh (two 32-lane halves exchanging masks/lane values), not a looser refusal. Happy to share the small diff if useful. AI-assisted (Claude Code); nothing from the game attached.
Author
Owner

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

A possible way to keep mesh geometry on 32-lane hosts, and one number I need from someone with the title first.

All of the title's mesh programs are wave64 (per @⁠ChruutvoLuzi's count on #578), and mesh shaders cannot declare a wave size. On NVIDIA each console wave runs as two 32-lane host waves that branch per lane. A half with no active lane on a path can skip an s_barrier that its console wave reaches, and then the other half waits forever. That would fit the hang above even with one group and a low loop limit, though I haven't confirmed it on the title.

I've been prototyping a compute fallback for mesh pipelines on GPUs without mesh shaders (#3). It runs the mesh program as a compute shader that writes vertices and triangles to buffers, then draws them with a generated vertex shader and the title's pixel shader. A compute shader can do what a mesh shader can't: run in #439's console flow, where both halves take every branch together and exchange lanes through group-shared memory. So the same fallback could serve as the mesh path on NVIDIA. The catch is that #439's console flow only takes groups of at most 64 threads, and I don't know the title's mesh group sizes.

So I added victory mesh-census on pr/mesh-compute-fallback (today's main plus the fallback). It prints a table by group size: programs, wave64, LDS, s_barrier, lane reads, v_mbcnt, EXEC branches, and how many translate as mesh and as compute. Then it lists the refusal reasons. Counts only, nothing of the programs.

git fetch https://github.com/EduBertozzi/VIctory pr/mesh-compute-fallback
git switch --detach FETCH_HEAD
cargo run --release -p victory -- mesh-census <your game dir>

It translates every mesh program twice, so expect a few minutes. If you can, please paste the output here.

AI-assisted (Claude Code). The tool's tests are synthetic, and I haven't run it on the title (I don't have a PC copy).

**@⁠EduBertozzi** on GitHub · 2026-11-24 11:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7130401774) A possible way to keep mesh geometry on 32-lane hosts, and one number I need from someone with the title first. All of the title's mesh programs are wave64 (per @⁠ChruutvoLuzi's count on #578), and mesh shaders cannot declare a wave size. On NVIDIA each console wave runs as two 32-lane host waves that branch per lane. A half with no active lane on a path can skip an `s_barrier` that its console wave reaches, and then the other half waits forever. That would fit the hang above even with one group and a low loop limit, though I haven't confirmed it on the title. I've been prototyping a compute fallback for mesh pipelines on GPUs without mesh shaders (#3). It runs the mesh program as a compute shader that writes vertices and triangles to buffers, then draws them with a generated vertex shader and the title's pixel shader. A compute shader can do what a mesh shader can't: run in #439's console flow, where both halves take every branch together and exchange lanes through group-shared memory. So the same fallback could serve as the mesh path on NVIDIA. The catch is that #439's console flow only takes groups of **at most 64 threads**, and I don't know the title's mesh group sizes. So I added `victory mesh-census` on [`pr/mesh-compute-fallback`](https://github.com/EduBertozzi/VIctory/tree/pr/mesh-compute-fallback) (today's `main` plus the fallback). It prints a table by group size: programs, wave64, LDS, `s_barrier`, lane reads, `v_mbcnt`, EXEC branches, and how many translate as mesh and as compute. Then it lists the refusal reasons. **Counts only, nothing of the programs.** ```powershell git fetch https://github.com/EduBertozzi/VIctory pr/mesh-compute-fallback git switch --detach FETCH_HEAD cargo run --release -p victory -- mesh-census <your game dir> ``` It translates every mesh program twice, so expect a few minutes. If you can, please paste the output here. AI-assisted (Claude Code). The tool's tests are synthetic, and I haven't run it on the title (I don't have a PC copy).
Author
Owner

@⁠KenzoPortela on GitHub · 2026-11-24 12:10 UTC · original

More measurements on the same RTX 3070 — the world now renders its geometry on a 32-lane GPU.

1. The wave64 mesh programs #578 refuses are (almost) lane-independent once translated. I translated the 131 distinct wave64 mesh programs refused in the world (victory translate --list + VICTORY_EMIT_DUMP, then dxc -dumpbin). The only wave intrinsics in the emitted DXIL are WaveReadLaneFirst (881 calls) and one quad-local QuadReadLaneAt; no barriers, no ballots. Mesh code takes the console lane from flattenedThreadIdInGroup & 63 and computes masks/v_mbcnt per lane from it, so the host's wave size doesn't matter there. 7 of the 131 contain loops.

2. Letting them run as 32-lane halves (a local diagnostics switch that bypasses #578's mesh refusal) with VICTORY_SHADER_LOOP_LIMIT=1024:

  • 20 min in the world without a TDR (skipping compute eeed82b877b44b5f and mesh 38ad582f523fd7cf, see 4);
  • ~2,100 draws per frame run instead of ~270;
  • the dumped render targets hold the first mission's scene (chairs, tables, people, street lights, buildings); the gameplay HUD prompt is shown; the final image stays black (lighting/composite not there yet).

3. The world TDRs look like loop guards, not wave64 deadlocks. Same run without a loop limit: TDR at a draw of mesh 04b9be3756e8f41c (no loops) + pixel 1af4a50c7fb40c97, a pixel program with 7 back edges including nested loops. A per-lane guard of 2^20 per loop on nested loops can mean ~2^40 iterations per pixel when the inputs that should end the loop were never written (their producers dropped). A much lower guard for pixel/mesh programs (or a guard on total iterations rather than per loop) would probably remove most world TDRs on AMD too.

4. The one real wave64 hazard I found in mesh code is WaveReadLaneFirst of values that are not uniform over the console wave, e.g. the group's vertex/primitive counts in MSNC_VS_Cable (38ad582f523fd7cf): on a 32-lane host each half reads its own first lane. That draw still hung once with loop limit 1024. A fix could route v_readfirstlane in wave64 mesh programs on narrow hosts through a groupshared slot written by the console wave's first active lane.

Happy to share the local diff (lane-dependence analysis for mesh + the diagnostics switch). AI-assisted (Claude Code); nothing from the game attached.

**@⁠KenzoPortela** on GitHub · 2026-11-24 12:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7131065391) More measurements on the same RTX 3070 — the world now renders its geometry on a 32-lane GPU. **1. The wave64 mesh programs #578 refuses are (almost) lane-independent once translated.** I translated the 131 distinct wave64 mesh programs refused in the world (`victory translate --list` + `VICTORY_EMIT_DUMP`, then `dxc -dumpbin`). The only wave intrinsics in the emitted DXIL are `WaveReadLaneFirst` (881 calls) and one quad-local `QuadReadLaneAt`; no barriers, no ballots. Mesh code takes the console lane from `flattenedThreadIdInGroup & 63` and computes masks/`v_mbcnt` per lane from it, so the host's wave size doesn't matter there. 7 of the 131 contain loops. **2. Letting them run as 32-lane halves** (a local diagnostics switch that bypasses #578's mesh refusal) with `VICTORY_SHADER_LOOP_LIMIT=1024`: - 20 min in the world without a TDR (skipping compute `eeed82b877b44b5f` and mesh `38ad582f523fd7cf`, see 4); - ~2,100 draws per frame run instead of ~270; - the dumped render targets hold the first mission's scene (chairs, tables, people, street lights, buildings); the gameplay HUD prompt is shown; the final image stays black (lighting/composite not there yet). **3. The world TDRs look like loop guards, not wave64 deadlocks.** Same run without a loop limit: TDR at a draw of `mesh 04b9be3756e8f41c` (no loops) + `pixel 1af4a50c7fb40c97`, a pixel program with 7 back edges including nested loops. A per-lane guard of 2^20 per loop on nested loops can mean ~2^40 iterations per pixel when the inputs that should end the loop were never written (their producers dropped). A much lower guard for pixel/mesh programs (or a guard on total iterations rather than per loop) would probably remove most world TDRs on AMD too. **4. The one real wave64 hazard I found in mesh code** is `WaveReadLaneFirst` of values that are not uniform over the console wave, e.g. the group's vertex/primitive counts in `MSNC_VS_Cable` (`38ad582f523fd7cf`): on a 32-lane host each half reads its own first lane. That draw still hung once with loop limit 1024. A fix could route `v_readfirstlane` in wave64 mesh programs on narrow hosts through a groupshared slot written by the console wave's first active lane. Happy to share the local diff (lane-dependence analysis for mesh + the diagnostics switch). AI-assisted (Claude Code); nothing from the game attached.
Author
Owner

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

Same on an RTX 3070 Ti Laptop (NVIDIA driver 610.88). On main ffe310e the device hangs in an ExecuteIndirect about 3 minutes into the world, and with #223 and #192 the hang also comes in an ExecuteIndirect.

With #578 merged in there was no device removal in 420 s. The cost: in the world it kept 90–205 draws per frame and dropped 1,000–5,700, about 85–98% of world draws, because the wave64 mesh programs are refused up front.

**@⁠Ilokaxt** on GitHub · 2026-11-24 12:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7131205548) Same on an **RTX 3070 Ti Laptop** (NVIDIA driver 610.88). On `main` `ffe310e` the device hangs in an `ExecuteIndirect` about 3 minutes into the world, and with #223 and #192 the hang also comes in an `ExecuteIndirect`. With #578 merged in there was **no device removal in 420 s**. The cost: in the world it kept 90–205 draws per frame and dropped 1,000–5,700, about **85–98% of world draws**, because the wave64 mesh programs are refused up front.
Author
Owner

@⁠MartinIndra02 on GitHub · 2026-11-24 12:31 UTC · original

RTX 3080 (621.24, 32-32 wave lanes, Windows 11) confirmation for the mesh-hang family (following up from #732):

  • Tree: main ffe310e + #439 + #431 + #724/#725 (dpalacios69) + #783 (perf/gpu-copy-mapped-region-fallback) + #776 (schmiticle) + #584 (fix/shader-heap-bounds-clamp) + #757.
  • Flags: diag build, VICTORY_D3D12_DRED=1, VICTORY_GPU_TIMING=1, VICTORY_SHADER_LOOP_LIMIT=1000, retail 1.0.2.1.
  • Without #579: hit 0x887A0006 (DEVICE_HUNG, no page fault) in the world on:
    • command 80 of 140 (op 42): mesh 6 [mesh c962201cddbdd7dd, pixel 57a27c5e2e1d62a9]
  • With #579 + VICTORY_SKIP_WAVE64=mesh: ran 10+ minutes continuously in the world at 1.0 – 1.3 fps (750 – 966 ms/frame), 2,008 translated shaders, 0 host pipeline refused, 0 slow host submission, 0 DRED page faults, 0 device removed (30 wave64 mesh skip lines logged).

No game data posted. AI-assisted; build and title run executed on my machine.

**@⁠MartinIndra02** on GitHub · 2026-11-24 12:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7131569254) RTX 3080 (`621.24`, 32-32 wave lanes, Windows 11) confirmation for the mesh-hang family (following up from `#732`): - **Tree:** `main` `ffe310e` + `#439` + `#431` + `#724/#725` (`dpalacios69`) + `#783` (`perf/gpu-copy-mapped-region-fallback`) + `#776` (`schmiticle`) + `#584` (`fix/shader-heap-bounds-clamp`) + `#757`. - **Flags:** diag build, `VICTORY_D3D12_DRED=1`, `VICTORY_GPU_TIMING=1`, `VICTORY_SHADER_LOOP_LIMIT=1000`, retail 1.0.2.1. - **Without `#579`:** hit `0x887A0006` (`DEVICE_HUNG`, no page fault) in the world on: - `command 80 of 140 (op 42): mesh 6 [mesh c962201cddbdd7dd, pixel 57a27c5e2e1d62a9]` - **With `#579` + `VICTORY_SKIP_WAVE64=mesh`:** ran **10+ minutes** continuously in the world at `1.0 – 1.3 fps` (`750 – 966 ms/frame`), **2,008** translated shaders, **`0` `host pipeline refused`**, **`0` `slow host submission`**, **`0` DRED page faults**, **`0` `device removed`** (30 wave64 mesh skip lines logged). *No game data posted. AI-assisted; build and title run executed on my machine.*
Author
Owner

@⁠lines9686-rgb on GitHub · 2026-11-24 12:59 UTC · original

RTX 3060 Ti (NVIDIA 621.24, 32-lane waves only), Windows 11 26200, own 1.0.2.1 copy, --profile diag --features diagnostics, 5-minute runs:

Build World GPU
main ffe310e black, ~115 compute pipelines refused by the host (wave lane count 64 > 32), 0.5–0.8 fps DEVICE_HUNG at ~2–3 min on a mesh draw (op 42)
main + #578 + 2^18 dynamic slots (#747) black, same refusals, 0.5–0.8 fps; "no dynamic slots" drops gone no hang in 5 min
#439 stack + #578 + 2^18 slots grey frames appear behind the subtitles, 0 host refusals, 1.4 fps no hang in 5 min

With #439 the only big gap left on NVIDIA is the mesh path: #578 refuses the wave64 mesh programs, so 20–50 mesh draws per frame (the world geometry) are dropped. Remaining translator refusals in that run are compute only (344 shaders; most common "a descriptor read only as data", i.e. #798).

I'm working on running wave64 mesh programs on 32-lane hosts on top of #439's console flow (two 32-lane host waves per console wave in one group), so they can render instead of being refused or hanging. Will post a fork branch with tests and NVIDIA numbers here. If someone is already on it, tell me and I'll test theirs instead.

AI-assisted (Claude Code).

**@⁠lines9686-rgb** on GitHub · 2026-11-24 12:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132205304) RTX 3060 Ti (NVIDIA 621.24, 32-lane waves only), Windows 11 26200, own 1.0.2.1 copy, `--profile diag --features diagnostics`, 5-minute runs: | Build | World | GPU | |---|---|---| | `main` ffe310e | black, ~115 compute pipelines refused by the host (wave lane count 64 > 32), 0.5–0.8 fps | DEVICE_HUNG at ~2–3 min on a mesh draw (op 42) | | `main` + #578 + 2^18 dynamic slots (#747) | black, same refusals, 0.5–0.8 fps; "no dynamic slots" drops gone | **no hang in 5 min** | | #439 stack + #578 + 2^18 slots | grey frames appear behind the subtitles, **0 host refusals**, 1.4 fps | **no hang in 5 min** | With #439 the only big gap left on NVIDIA is the mesh path: #578 refuses the wave64 mesh programs, so 20–50 mesh draws per frame (the world geometry) are dropped. Remaining translator refusals in that run are compute only (344 shaders; most common "a descriptor read only as data", i.e. #798). I'm working on running wave64 **mesh** programs on 32-lane hosts on top of #439's console flow (two 32-lane host waves per console wave in one group), so they can render instead of being refused or hanging. Will post a fork branch with tests and NVIDIA numbers here. If someone is already on it, tell me and I'll test theirs instead. AI-assisted (Claude Code).
Author
Owner

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

RTX 4090 (driver 621.01, Windows 11), diag build, main ffe310e, VICTORY_D3D12_DRED=1, mesh programs not refused. On this card the world needs two things, and a loop limit is only one of them:

Build Loop limit World Stop
main 1024 ~20 s, 0x887A0006 mesh 159 [mesh 4adfa13bea1c556a]
main + #493 1024 no removal in 2 runs (19 and 11 min, stopped by me) none
main + #493 default ~16 s, 0x887A0006 mesh 4 [mesh 04b9be3756e8f41c, pixel 1af4a50c7fb40c97]

The stop at 1024 without #493 isn't a loop. 4adfa13bea1c556a (MSR_VS_CascadeShadows_drawskinned) has 21 branches and no back edge, and its pipeline has no pixel shader. It reads its vertex data through root parameter 3, the root SRV that #493 bounds to the buffer's host copy, as do the MS_VS_TransformD permutations I've seen stop. The stop at the default limit is the pixel loop in point 3 of KenzoPortela's comment above, also in the 5090 comment on #71.

With both, the mesh draws run (718 mesh pipelines, about 2,000 draws per frame at about 1 fps), the HUD's movement prompt shows, and the final image is black. A dumped 2560x1440 target (format 62) holds coherent scene geometry: ceiling fans, chairs, tables, a door frame.

Two notes on KenzoPortela's points:

  • 38ad582f523fd7cf, one of the two programs skipped in point 2, is the example in #493's description: on AMD it page-faults reading root3 just past the end of its host copy. With #493 it may not need skipping; the WaveReadLaneFirst concern in point 4 would be separate.
  • The NVIDIA trees in #732 that stop at these mesh draws (main + #568 + #334 + a #725 patch, and the 3080 tree with c962201cddbdd7dd) don't list #493.

AI-assisted (Claude Code).

**@⁠ChruutvoLuzi** on GitHub · 2026-11-24 13:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132423070) RTX 4090 (driver 621.01, Windows 11), diag build, `main` `ffe310e`, `VICTORY_D3D12_DRED=1`, mesh programs not refused. On this card the world needs two things, and a loop limit is only one of them: | Build | Loop limit | World | Stop | |---|---|---|---| | `main` | 1024 | ~20 s, `0x887A0006` | `mesh 159 [mesh 4adfa13bea1c556a]` | | `main` + #493 | 1024 | no removal in 2 runs (19 and 11 min, stopped by me) | none | | `main` + #493 | default | ~16 s, `0x887A0006` | `mesh 4 [mesh 04b9be3756e8f41c, pixel 1af4a50c7fb40c97]` | The stop at 1024 without #493 isn't a loop. `4adfa13bea1c556a` (`MSR_VS_CascadeShadows_drawskinned`) has 21 branches and no back edge, and its pipeline has no pixel shader. It reads its vertex data through root parameter 3, the root SRV that #493 bounds to the buffer's host copy, as do the `MS_VS_TransformD` permutations I've seen stop. The stop at the default limit is the pixel loop in point 3 of KenzoPortela's comment above, also in the 5090 comment on #71. With both, the mesh draws run (718 mesh pipelines, about 2,000 draws per frame at about 1 fps), the HUD's movement prompt shows, and the final image is black. A dumped 2560x1440 target (format 62) holds coherent scene geometry: ceiling fans, chairs, tables, a door frame. Two notes on KenzoPortela's points: - `38ad582f523fd7cf`, one of the two programs skipped in point 2, is the example in #493's description: on AMD it page-faults reading `root3` just past the end of its host copy. With #493 it may not need skipping; the `WaveReadLaneFirst` concern in point 4 would be separate. - The NVIDIA trees in #732 that stop at these mesh draws (`main` + #568 + #334 + a #725 patch, and the 3080 tree with `c962201cddbdd7dd`) don't list #493. AI-assisted (Claude Code).
Author
Owner

@⁠Ilokaxt on GitHub · 2026-11-24 13:10 UTC · original

Follow-up from the RTX 3070 Ti Laptop: the mesh hang here goes away with #587 (mesh output bounds, all primitives initialised, no sync on a divergent s_barrier), with the wave64 mesh programs enabled, so no VICTORY_SKIP_WAVE64 is needed. Tree: main ffe310e + #439 + #431 + #579 + #587. No device removal in 420 s, about 1,750 world draws kept per frame instead of about 350 with the mesh programs skipped. This suggests the hang is #587's bounds/barrier issue rather than the wave size itself.

**@⁠Ilokaxt** on GitHub · 2026-11-24 13:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132448380) Follow-up from the RTX 3070 Ti Laptop: the mesh hang here goes away with **#587** (mesh output bounds, all primitives initialised, no sync on a divergent `s_barrier`), with the wave64 mesh programs **enabled**, so no `VICTORY_SKIP_WAVE64` is needed. Tree: `main` `ffe310e` + #439 + #431 + #579 + #587. No device removal in 420 s, about 1,750 world draws kept per frame instead of about 350 with the mesh programs skipped. This suggests the hang is #587's bounds/barrier issue rather than the wave size itself.
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 13:18 UTC · original

Integrated PR #578 wave lane bounds checking into our integration branch (PR https://github.com/LAKSHYA-cmd-tech/VIctory/pull/19). This cleanly catches wave64 mesh programs and unlowered wave64 compute on Wave32 GPUs (such as the RTX 3070/4070/5090) and WARP before dispatch, preventing the driver TDR / DXGI_ERROR_DEVICE_HUNG.

**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 13:18 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132634596) Integrated PR #578 wave lane bounds checking into our integration branch (PR https://github.com/LAKSHYA-cmd-tech/VIctory/pull/19). This cleanly catches wave64 mesh programs and unlowered wave64 compute on Wave32 GPUs (such as the RTX 3070/4070/5090) and WARP before dispatch, preventing the driver TDR / DXGI_ERROR_DEVICE_HUNG.
Author
Owner

@⁠MartinIndra02 on GitHub · 2026-11-24 13:22 UTC · original · edited 2026-11-24 13:24 UTC

Follow-up on RTX 3080 (621.24, Windows 11) confirming @⁠Ilokaxt's #587 result with wave64 mesh shaders enabled (no VICTORY_SKIP_WAVE64):

  • Tree: same stack as above (main ffe310e + #439 + #431 + #724/#725 + #783 + #776 + #584 + #757) + #587 + #493 + #798 (VICTORY_D3D12_DRED=1, VICTORY_GPU_TIMING=1, VICTORY_SHADER_LOOP_LIMIT=1000).
  • Result: ran past the opening cutscene into live gameplay (in-world HUD prompts rendered cleanly over the dark 3D scene) for 5+ minutes continuously at steady 1.1 – 1.2 fps (800 – 933 ms/frame) with 618 host mesh pipelines active (2,140 translated shaders, 452 failed, 0 host pipeline refused, 0 slow host submission, 0 DRED page faults, 0 device removed).
  • The earlier mesh 6 [mesh c962201cddbdd7dd, pixel 57a27c5e2e1d62a9] TDR is gone without skipping mesh draws.

No game data posted. AI-assisted; build and title run executed on my machine.

**@⁠MartinIndra02** on GitHub · 2026-11-24 13:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132745118) · edited 2026-11-24 13:24 UTC Follow-up on **RTX 3080 (`621.24`, Windows 11)** confirming @⁠Ilokaxt's `#587` result with wave64 mesh shaders **enabled** (no `VICTORY_SKIP_WAVE64`): - **Tree:** same stack as above (`main` `ffe310e` + `#439` + `#431` + `#724/#725` + `#783` + `#776` + `#584` + `#757`) **+ `#587` + `#493` + `#798`** (`VICTORY_D3D12_DRED=1`, `VICTORY_GPU_TIMING=1`, `VICTORY_SHADER_LOOP_LIMIT=1000`). - **Result:** ran past the opening cutscene into live gameplay (in-world HUD prompts rendered cleanly over the dark 3D scene) for **5+ minutes** continuously at steady **`1.1 – 1.2 fps` (`800 – 933 ms/frame`)** with **618 host mesh pipelines** active (**2,140** translated shaders, **452** failed, **`0` `host pipeline refused`**, **`0` `slow host submission`**, **`0` DRED page faults**, **`0` `device removed`**). - The earlier `mesh 6 [mesh c962201cddbdd7dd, pixel 57a27c5e2e1d62a9]` TDR is gone without skipping mesh draws. *No game data posted. AI-assisted; build and title run executed on my machine.*
Author
Owner

@⁠OrangeCrane1738 on GitHub · 2026-11-24 13:25 UTC · original

Same result on Blackwell (RTX 5060 Ti), in case another data point helps.

Setup: NVIDIA GeForce RTX 5060 Ti 16 GB (driver 621.24), Windows 11 Pro. VIctory ffe310e, cargo build --profile diag -p victory --features diagnostics, VICTORY_D3D12_DEBUG=1, VICTORY_D3D12_DRED=1, default console mode. Title 1.0.2.1 (exe BLAKE3 b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93).

Works: boot, intro, menus, story load. The first cutscene's audio plays over a black picture.

Then: TDR about 4 minutes in. The debug layer's only message is the TDR one (DXGI_ERROR_DEVICE_HUNG), nothing before it.

DRED: the list stopped at command 204 of 788, op 42 (DispatchMesh), inside a run of op 42 (173..209) between two barriers, the same pattern as run 1 above. Also in flight: ExecuteIndirect kind 10 mesh 91976f0707015815, pixel 06299eb2cb91ad6f, and DispatchMesh with mesh b68376181e9c8b2f and mesh ba9865c71b8d1947.

Counts in that run: 362 shaders do not translate, 114 host pipelines refused, 15 draws/dispatches dropped for no dynamic slots (as in #747). The release build at the same commit ends the same way (0x887A0004, then 0x887A0006).

Happy to test #578 or another branch on this card.

AI-assisted (Claude): log analysis. Runs made on my own machine with my own copy; nothing from the game is attached.

**@⁠OrangeCrane1738** on GitHub · 2026-11-24 13:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132814449) Same result on Blackwell (RTX 5060 Ti), in case another data point helps. **Setup:** NVIDIA GeForce RTX 5060 Ti 16 GB (driver 621.24), Windows 11 Pro. VIctory `ffe310e`, `cargo build --profile diag -p victory --features diagnostics`, `VICTORY_D3D12_DEBUG=1`, `VICTORY_D3D12_DRED=1`, default console mode. Title 1.0.2.1 (exe BLAKE3 `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93`). **Works:** boot, intro, menus, story load. The first cutscene's audio plays over a black picture. **Then:** TDR about 4 minutes in. The debug layer's only message is the TDR one (`DXGI_ERROR_DEVICE_HUNG`), nothing before it. **DRED:** the list stopped at command 204 of 788, **op 42 (DispatchMesh)**, inside a run of op 42 (173..209) between two barriers, the same pattern as run 1 above. Also in flight: ExecuteIndirect kind 10 `mesh 91976f0707015815, pixel 06299eb2cb91ad6f`, and DispatchMesh with `mesh b68376181e9c8b2f` and `mesh ba9865c71b8d1947`. **Counts in that run:** 362 shaders do not translate, 114 host pipelines refused, 15 draws/dispatches dropped for no dynamic slots (as in #747). The release build at the same commit ends the same way (`0x887A0004`, then `0x887A0006`). Happy to test #578 or another branch on this card. AI-assisted (Claude): log analysis. Runs made on my own machine with my own copy; nothing from the game is attached.
Author
Owner

@⁠lines9686-rgb on GitHub · 2026-11-24 13:26 UTC · original

Correction to my comment above: @⁠KenzoPortela had already shown at 12:10 that the wave64 mesh programs run as 32-lane halves, before I wrote that I'd work on it — I'm not doing a separate implementation, sorry for the noise.

What I can add is a third NVIDIA data point for that approach. RTX 3060 Ti (621.24, 32-lane), own 1.0.2.1 copy, #439 stack + #493 + #587 + 2^18 dynamic slots (#747) + #578 with the mesh refusal bypassed locally (as in Kenzo's point 2), VICTORY_SHADER_LOOP_LIMIT=1024, nothing skipped: 5 minutes, no TDR, 1.4–1.6 fps in the world, 0 host pipeline refusals. A render-target dump of a world frame holds the scene geometry (one target is a clean silhouette mask of lamps, signs, bollards and a building); the presented image is black, as on the 3070/4090. Happy to test Kenzo's diff when it's shared.

AI-assisted (Claude Code).

**@⁠lines9686-rgb** on GitHub · 2026-11-24 13:26 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132844636) Correction to my comment above: @⁠KenzoPortela had already shown at 12:10 that the wave64 mesh programs run as 32-lane halves, before I wrote that I'd work on it — I'm not doing a separate implementation, sorry for the noise. What I can add is a third NVIDIA data point for that approach. RTX 3060 Ti (621.24, 32-lane), own 1.0.2.1 copy, #439 stack + #493 + #587 + 2^18 dynamic slots (#747) + #578 with the mesh refusal bypassed locally (as in Kenzo's point 2), `VICTORY_SHADER_LOOP_LIMIT=1024`, nothing skipped: 5 minutes, no TDR, 1.4–1.6 fps in the world, 0 host pipeline refusals. A render-target dump of a world frame holds the scene geometry (one target is a clean silhouette mask of lamps, signs, bollards and a building); the presented image is black, as on the 3070/4090. Happy to test Kenzo's diff when it's shared. AI-assisted (Claude Code).
Author
Owner

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

Confirmation on another GPU (RTX 3080 Ti, 32-lane waves, Windows 11): the same world TDR. The first stuck command in our runs is a tiny wave64 mesh dispatch (mesh 04b9be3756e8f41c with pixel 1af4a50c7fb40c97, 4 groups; the list took 1.4 s with VICTORY_GPU_TIMING=1 and the device was removed at ~2 s), then mesh 89036e16fa081505 / a26422c01dcf5612 once the first is skipped. The mesh DXIL itself has no loop and no barrier (128 threads, 56 blocks); the pixel shader is 22.8k lines with 7 loops. With #578 merged the TDR is gone and the world renders black, as described here; the builds with #233 on top also stay up (5 to 8 minutes per run). Fork with the integration: github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550.

**@⁠Machad3x** on GitHub · 2026-11-24 13:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132945494) Confirmation on another GPU (RTX 3080 Ti, 32-lane waves, Windows 11): the same world TDR. The first stuck command in our runs is a tiny wave64 mesh dispatch (mesh 04b9be3756e8f41c with pixel 1af4a50c7fb40c97, 4 groups; the list took 1.4 s with VICTORY_GPU_TIMING=1 and the device was removed at ~2 s), then mesh 89036e16fa081505 / a26422c01dcf5612 once the first is skipped. The mesh DXIL itself has no loop and no barrier (128 threads, 56 blocks); the pixel shader is 22.8k lines with 7 loops. With #578 merged the TDR is gone and the world renders black, as described here; the builds with #233 on top also stay up (5 to 8 minutes per run). Fork with the integration: github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550.
Author
Owner

@⁠ByMateos on GitHub · 2026-11-24 13:33 UTC · original

@⁠EduBertozzi the victory mesh-census output you asked for, from my own 1.0.2.1 copy (RTX 3070 Ti machine; the tool itself doesn't use the GPU), built from pr/mesh-compute-fallback at 5f0b602, run on the game folder:

mesh programs: 9282
| threads | programs | wave64 | LDS | s_barrier | lane reads | v_mbcnt | EXEC branches | as mesh | as compute |
|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| 128 | 9282 | 9282 | 5 | 9282 | 115 | 9282 | 9282 | 8726 | 8726 |
| all | 9282 | 9282 | 5 | 9282 | 115 | 9282 | 9282 | 8726 | 8726 |

refused as mesh: 556
     390  a scalar memory read as data
     103  a lane mask read as data
      34  a descriptor read from the first lane of computed VGPRs
      12  a waterfall loop whose compares do not select the access's lanes
       6  a descriptor partly joined by control flow
       5  a descriptor read only as data
       3  a descriptor chosen by control flow
       2  a cross-lane operation in a mesh shader
       1  a structured buffer of unknown stride

refused as compute: 556 (same reasons and counts)

Every mesh program is a 128-thread group (two wave64 waves), so none fits #439's 64-thread console flow as it is. Only 5 use LDS and 115 have explicit lane reads, which fits KenzoPortela's finding above that most run as 32-lane halves once translated.

AI-assisted (Claude Code); counts only, nothing from the game attached.

**@⁠ByMateos** on GitHub · 2026-11-24 13:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7132998855) @⁠EduBertozzi the `victory mesh-census` output you asked for, from my own 1.0.2.1 copy (RTX 3070 Ti machine; the tool itself doesn't use the GPU), built from `pr/mesh-compute-fallback` at `5f0b602`, run on the game folder: ``` mesh programs: 9282 | threads | programs | wave64 | LDS | s_barrier | lane reads | v_mbcnt | EXEC branches | as mesh | as compute | |---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| | 128 | 9282 | 9282 | 5 | 9282 | 115 | 9282 | 9282 | 8726 | 8726 | | all | 9282 | 9282 | 5 | 9282 | 115 | 9282 | 9282 | 8726 | 8726 | refused as mesh: 556 390 a scalar memory read as data 103 a lane mask read as data 34 a descriptor read from the first lane of computed VGPRs 12 a waterfall loop whose compares do not select the access's lanes 6 a descriptor partly joined by control flow 5 a descriptor read only as data 3 a descriptor chosen by control flow 2 a cross-lane operation in a mesh shader 1 a structured buffer of unknown stride refused as compute: 556 (same reasons and counts) ``` Every mesh program is a 128-thread group (two wave64 waves), so none fits #439's 64-thread console flow as it is. Only 5 use LDS and 115 have explicit lane reads, which fits KenzoPortela's finding above that most run as 32-lane halves once translated. AI-assisted (Claude Code); counts only, nothing from the game attached.
Author
Owner

@⁠Ilokaxt on GitHub · 2026-11-24 13:40 UTC · original

Correction to my note above: two longer runs (900 s budget) with the same tree (main ffe310e + #439 + #431 + #579 + #587, mesh programs enabled) did hang, in a mesh dispatch each time:

  • at 296 s: DRED stopped at DispatchMesh(159), mesh 4adfa13bea1c556a, the same program and dispatch that hangs without #587;
  • at 479 s: DRED stopped at DispatchMesh(1), mesh 18bbb989c875c8fb.

My 420 s run had simply not reached them. So #587 does not remove the mesh hangs on the RTX 3070 Ti. It only let the world run longer with the mesh programs enabled (about 1,400–2,000 draws kept per frame) before one of them hangs. Sorry for the noise.

**@⁠Ilokaxt** on GitHub · 2026-11-24 13:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133161484) **Correction to my note above:** two longer runs (900 s budget) with the same tree (`main` `ffe310e` + #439 + #431 + #579 + #587, mesh programs enabled) **did hang**, in a mesh dispatch each time: - at 296 s: DRED stopped at `DispatchMesh(159)`, **mesh `4adfa13bea1c556a`**, the same program and dispatch that hangs without #587; - at 479 s: DRED stopped at `DispatchMesh(1)`, **mesh `18bbb989c875c8fb`**. My 420 s run had simply not reached them. So #587 does not remove the mesh hangs on the RTX 3070 Ti. It only let the world run longer with the mesh programs enabled (about 1,400–2,000 draws kept per frame) before one of them hangs. Sorry for the noise.
Author
Owner

@⁠KenzoPortela on GitHub · 2026-11-24 13:40 UTC · original

Thanks all for the data. Sharing what I said I'd share, and what overlaps with your PRs.

Branch: KenzoPortela/VIctory@loop-budget — one commit on today's main (ffe310e): VICTORY_SHADER_LOOP_BUDGET=<n> (diagnostics builds) bounds all loops of an invocation together. LOOP_LIMIT is per loop and restarts at 0 on every entry, so nested loops multiply it; the budget is one per-invocation counter (an internal, non-constant DXIL global, i.e. HLSL static) that every back edge increments, and a loop is left when its own limit or the budget is reached. Unset, nothing changes; the shader cache keys on it like on the limit. Clippy -D warnings (with and without --all-features), victory-shader/victory-gpu lib tests and cargo xtask policy pass; PS_Textured_Eight (1af4a50c7fb40c97, nested loops) and 131 wave64 mesh programs validate with dxil.dll.

Result on the RTX 3070 (tree: 8e79c80 + #578 with the mesh refusal bypassed, #747's 2^18, #282, #302, #489, the #734 wave64-emulation branch, my mesh output bounds, VICTORY_SHADER_LOOP_LIMIT=1024 + VICTORY_SHADER_LOOP_BUDGET=16384, only compute eeed82b877b44b5f skipped): 30 minutes in the world without a device removal, ~2,400 draws per frame at 0.2 fps, HUD prompt shown, presented image still black. With the loop limit alone the same kind of tree stopped after a few minutes at a different one-group mesh/pixel draw each run (59874b28fd64363d/ee78da6862364ddd last).

Overlaps, so nobody duplicates work:

  • My mesh output bounds (cull a primitive whose index is ≥ the declared vertex count; no vertex/primitive write past the declared counts) is the same idea as #587 — use #587. It's what fixed 38ad582f523fd7cf here; @⁠ChruutvoLuzi's point that #493 covers its root3 read fits too, and my WaveReadLaneFirst worry (point 4 above) turned out wrong: those counts come from loads at group-uniform addresses.
  • Running the wave64 mesh programs as 32-lane halves is what #579's switch / bypassing #578 does; I'm not pushing my diagnostics switch for that.

Why the picture is still black (on this tree): the G-buffers are filled (colour/normal targets at 2560×1440 fully written) but every full-screen HDR target (R16G16B16A16F, R11G11B10F) reads exactly 0 in the target dumps. The lighting chain itself mostly translates (tiled_lighting_* except PrescalarizeLightLoop, deferred_lighting_LightMixOutputCS_*, PS_ResolveDeferred_0..2, luminance histogram, PS_CalculateExposure, LUT/ACES, composite). Two gaps that could gate it: shader_binning_utils_CS_GenerateShaderBinOffsets (8dd8d739047fe557), refused with the #734 branch as "a step across lanes in lane-dependent code on a host without 64-lane waves" (a wave64 scan, then a whole-wave reduction + buffer_atomic_add inside a lane-63-only branch), and avgLuminanceCompute_ColorDownsample(Init)CS ("an address not from a root parameter"). I haven't proven either is the cause.

AI-assisted (Claude Code); runs on my machine with my copy, nothing from the game attached.

**@⁠KenzoPortela** on GitHub · 2026-11-24 13:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133172641) Thanks all for the data. Sharing what I said I'd share, and what overlaps with your PRs. **Branch: [`KenzoPortela/VIctory@loop-budget`](https://github.com/KenzoPortela/VIctory/tree/loop-budget)** — one commit on today's `main` (`ffe310e`): `VICTORY_SHADER_LOOP_BUDGET=<n>` (diagnostics builds) bounds **all loops of an invocation together**. `LOOP_LIMIT` is per loop and restarts at 0 on every entry, so nested loops multiply it; the budget is one per-invocation counter (an internal, non-constant DXIL global, i.e. HLSL `static`) that every back edge increments, and a loop is left when its own limit or the budget is reached. Unset, nothing changes; the shader cache keys on it like on the limit. Clippy `-D warnings` (with and without `--all-features`), `victory-shader`/`victory-gpu` lib tests and `cargo xtask policy` pass; `PS_Textured_Eight` (`1af4a50c7fb40c97`, nested loops) and 131 wave64 mesh programs validate with `dxil.dll`. **Result on the RTX 3070** (tree: `8e79c80` + #578 with the mesh refusal bypassed, #747's 2^18, #282, #302, #489, the #734 `wave64-emulation` branch, my mesh output bounds, `VICTORY_SHADER_LOOP_LIMIT=1024` + `VICTORY_SHADER_LOOP_BUDGET=16384`, only compute `eeed82b877b44b5f` skipped): **30 minutes in the world without a device removal**, ~2,400 draws per frame at 0.2 fps, HUD prompt shown, presented image still black. With the loop limit alone the same kind of tree stopped after a few minutes at a different one-group mesh/pixel draw each run (`59874b28fd64363d`/`ee78da6862364ddd` last). **Overlaps, so nobody duplicates work:** - My mesh output bounds (cull a primitive whose index is ≥ the declared vertex count; no vertex/primitive write past the declared counts) is the same idea as **#587** — use #587. It's what fixed `38ad582f523fd7cf` here; @⁠ChruutvoLuzi's point that #493 covers its `root3` read fits too, and my `WaveReadLaneFirst` worry (point 4 above) turned out wrong: those counts come from loads at group-uniform addresses. - Running the wave64 mesh programs as 32-lane halves is what #579's switch / bypassing #578 does; I'm not pushing my diagnostics switch for that. **Why the picture is still black (on this tree):** the G-buffers are filled (colour/normal targets at 2560×1440 fully written) but every full-screen HDR target (R16G16B16A16F, R11G11B10F) reads exactly 0 in the target dumps. The lighting chain itself mostly translates (`tiled_lighting_*` except `PrescalarizeLightLoop`, `deferred_lighting_LightMixOutputCS_*`, `PS_ResolveDeferred_0..2`, luminance histogram, `PS_CalculateExposure`, LUT/ACES, composite). Two gaps that could gate it: `shader_binning_utils_CS_GenerateShaderBinOffsets` (`8dd8d739047fe557`), refused with the #734 branch as "a step across lanes in lane-dependent code on a host without 64-lane waves" (a wave64 scan, then a whole-wave reduction + `buffer_atomic_add` inside a lane-63-only branch), and `avgLuminanceCompute_ColorDownsample(Init)CS` ("an address not from a root parameter"). I haven't proven either is the cause. AI-assisted (Claude Code); runs on my machine with my copy, nothing from the game attached.
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/issues/778#issuecomment-7133316218) 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

@⁠EduBertozzi on GitHub · 2026-11-24 13:49 UTC · original

Thanks @⁠ByMateos, that answers the question I asked here.

What it settles:

  • Every mesh program is a 128-thread group (two console wave64 waves), so the idea of running them as compute in #439's "console flow" is off the table: that flow covers groups of at most 64 threads, and the multi-wave case is still open there. I'm dropping it.
  • s_barrier in all 9,282, but LDS in only 5. A barrier with no shared memory around it orders nothing, which fits @⁠KenzoPortela's finding that the translated programs carry no barriers. So the hazards on 32-lane hosts are the ones he named: the 115 programs with explicit lane reads (v_readfirstlane of values that aren't uniform over the console wave) and those 5 LDS users. Those are where a wave64-on-32 fix has to be right; the other ~9,160 should be indifferent to the split.
  • The 556 refusals are the same with and without mesh shaders, so the compute fallback neither loses nor gains programs here. They are general translator classes. The largest, a scalar memory read as data (390), is #798, where fixes are already being tested.

AI-assisted (Claude Code).

**@⁠EduBertozzi** on GitHub · 2026-11-24 13:49 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133384014) Thanks @⁠ByMateos, that answers the question I asked here. What it settles: - **Every mesh program is a 128-thread group** (two console wave64 waves), so the idea of running them as compute in #439's "console flow" is off the table: that flow covers groups of at most 64 threads, and the multi-wave case is still open there. I'm dropping it. - **`s_barrier` in all 9,282, but LDS in only 5.** A barrier with no shared memory around it orders nothing, which fits @⁠KenzoPortela's finding that the translated programs carry no barriers. So the hazards on 32-lane hosts are the ones he named: the 115 programs with explicit lane reads (`v_readfirstlane` of values that aren't uniform over the console wave) and those 5 LDS users. Those are where a wave64-on-32 fix has to be right; the other ~9,160 should be indifferent to the split. - **The 556 refusals are the same with and without mesh shaders**, so the compute fallback neither loses nor gains programs here. They are general translator classes. The largest, `a scalar memory read as data` (390), is #798, where fixes are already being tested. AI-assisted (Claude Code).
Author
Owner

@⁠hyperland956-lgtm on GitHub · 2026-11-24 13:52 UTC · original

The latest mesh-census and A/B comments materially narrow the problem.

The reported census found all 9,282 title mesh programs use 128-thread groups; all are Wave64, and all include s_barrier plus EXEC branches.

Therefore a compute fallback through #439's current console flow cannot simply be reused unchanged: it must preserve two console Wave64s per group, including synchronization across both logical waves.

The later RTX 3070 report is also important. After bypassing the mesh refusal and using a bounded loop guard, approximately 2,100 draws/frame ran and render-target captures contained scene geometry, while the final image remained black.

The reporter found that emitted code for 131 distinct refused Wave64 mesh programs used 881 WaveReadLaneFirst calls and one QuadReadLaneAt, with no other wave intrinsics in the inspected output.

The remaining suspected semantic hazard is a non-uniform WaveReadLaneFirst input across the two physical halves—for example, vertex/primitive counts—because each 32-lane half can select a different first lane.

Proposed synthetic test:

Use a 128-thread mesh-equivalent compute kernel with two logical 64-lane console waves, divergent EXEC branches, LDS stores/loads and barriers, where a value read by logical lane 0 differs between physical halves.

Compare the emulated result against a scalar reference for both halves, including inactive first lanes and partial/empty paths.

A candidate fix is to broadcast the console-wave first active value through group-shared memory with explicit ordering, but it must be proven safe with the title's actual barrier topology and must not assume one console wave per group.

This is not a request to simply disable the mesh refusal. #578's refusal avoids a TDR but removes world geometry.

The required deliverable is a correctness-preserving 128-thread/two-console-wave mesh path or a compute fallback supporting the same group shape and synchronization semantics.

(AI-assisted)

**@⁠hyperland956-lgtm** on GitHub · 2026-11-24 13:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133473754) The latest mesh-census and A/B comments materially narrow the problem. The reported census found all 9,282 title mesh programs use 128-thread groups; all are Wave64, and all include `s_barrier` plus EXEC branches. Therefore a compute fallback through #439's current console flow cannot simply be reused unchanged: it must preserve two console Wave64s per group, including synchronization across both logical waves. The later RTX 3070 report is also important. After bypassing the mesh refusal and using a bounded loop guard, approximately 2,100 draws/frame ran and render-target captures contained scene geometry, while the final image remained black. The reporter found that emitted code for 131 distinct refused Wave64 mesh programs used 881 `WaveReadLaneFirst` calls and one `QuadReadLaneAt`, with no other wave intrinsics in the inspected output. The remaining suspected semantic hazard is a non-uniform `WaveReadLaneFirst` input across the two physical halves—for example, vertex/primitive counts—because each 32-lane half can select a different first lane. **Proposed synthetic test:** Use a 128-thread mesh-equivalent compute kernel with two logical 64-lane console waves, divergent EXEC branches, LDS stores/loads and barriers, where a value read by logical lane 0 differs between physical halves. Compare the emulated result against a scalar reference for both halves, including inactive first lanes and partial/empty paths. A candidate fix is to broadcast the console-wave first active value through group-shared memory with explicit ordering, but it must be proven safe with the title's actual barrier topology and must not assume one console wave per group. This is not a request to simply disable the mesh refusal. #578's refusal avoids a TDR but removes world geometry. The required deliverable is a correctness-preserving 128-thread/two-console-wave mesh path or a compute fallback supporting the same group shape and synchronization semantics. (AI-assisted)
Author
Owner

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

Following @⁠ByMateos's victory mesh-census findings (9,282 Wave64 128-thread mesh programs, 103 failing with "a lane mask read as data", 115 with lane reads/v_readfirstlane, 2 cross-lane ops, almost none with lds_bytes > 0) and @⁠KenzoPortela's / @⁠Kam471's reports, we pushed a clean follow-up branch stacked on #189 (c047885):

Branch: alfycs/VIctory@feat/wave64-mesh-emulation (b3671c8, built on #189 + main ffe310e)

What it changes (Shaders: emulate Wave64 mesh shader lane ops and masks in LDS)

  • Since D3D12 SM 6.6 mesh shaders cannot declare WaveSize(64), Wave64 StageIo::Ms programs running under Wave64Mode::Wave32 | Emulate selectively enable portable LDS emulation (Wave64Mode::Emulate + MaskData::Console) whenever they use:
    • lane masks read as data (s_bcnt1, s_ff1, v_mbcnt of tracked masks, scalar mask reads);
    • v_readlane_b32 / v_writelane_b32, non-quad ds_swizzle / DPP / permute, or wave reductions/prefixes;
    • non-uniform v_readfirstlane_b32 (group-uniform v_readfirstlane passes directly with zero barriers/WAVE_OPS; uniform non-uniform uses exact 64-lane LDS atomicMin; divergent non-uniform v_readfirstlane falls back per 32-lane half under Wave64Mode::Wave32 to preserve waterfall loops without hanging).
  • Mesh shaders that only use v_mbcnt(-1) and quad-local swizzles keep zero extra LDS scratch and unchanged codegen.

Verification (RTX 3070 Ti + WARP + dxil.dll, no game files)

  • cargo xtask policy: asset policy: 155 files ok
  • cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings: 0 warnings, 0 errors
  • cargo test --workspace --locked: 370 passed, 0 failed, 6 ignored (victory-shader: 148 passed, 0 failed, 1 ignored)
  • VICTORY_WARP=1 cargo test -p victory-shader wave64_tests --locked: 27 passed, 0 failed, including two new 128-thread Wave64 Mesh + Pixel DispatchMesh live GPU pixel-readback tests covering virtual wave 0 (s_bcnt1, s_ff1, dynamic cross-half v_readlane) and virtual wave 1 (v_readfirstlane, v_writelane_b32, s_bcnt1).

Note: gh pr create currently reports CreatePullRequest is restricted on upstream, so sharing as a fork branch stacked on #189 for anyone testing Wave64 mesh rendering (e.g. with #587).

**@⁠alfycs** on GitHub · 2026-11-24 14:01 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133701802) Following @⁠ByMateos's `victory mesh-census` findings (`9,282` Wave64 128-thread mesh programs, `103` failing with `"a lane mask read as data"`, `115` with lane reads/`v_readfirstlane`, `2` cross-lane ops, almost none with `lds_bytes > 0`) and @⁠KenzoPortela's / @⁠Kam471's reports, we pushed a clean follow-up branch stacked on #189 (`c047885`): **Branch:** [`alfycs/VIctory@feat/wave64-mesh-emulation`](https://github.com/alfycs/VIctory/tree/feat/wave64-mesh-emulation) (`b3671c8`, built on #189 + `main` `ffe310e`) ### What it changes (`Shaders: emulate Wave64 mesh shader lane ops and masks in LDS`) - Since D3D12 SM 6.6 mesh shaders cannot declare `WaveSize(64)`, Wave64 `StageIo::Ms` programs running under `Wave64Mode::Wave32 | Emulate` selectively enable portable LDS emulation (`Wave64Mode::Emulate` + `MaskData::Console`) whenever they use: - lane masks read as data (`s_bcnt1`, `s_ff1`, `v_mbcnt` of tracked masks, scalar mask reads); - `v_readlane_b32` / `v_writelane_b32`, non-quad `ds_swizzle` / `DPP` / `permute`, or wave reductions/prefixes; - non-uniform `v_readfirstlane_b32` (group-uniform `v_readfirstlane` passes directly with zero barriers/`WAVE_OPS`; uniform non-uniform uses exact 64-lane LDS `atomicMin`; divergent non-uniform `v_readfirstlane` falls back per 32-lane half under `Wave64Mode::Wave32` to preserve waterfall loops without hanging). - Mesh shaders that only use `v_mbcnt(-1)` and quad-local swizzles keep zero extra LDS scratch and unchanged codegen. ### Verification (RTX 3070 Ti + WARP + `dxil.dll`, no game files) - `cargo xtask policy`: `asset policy: 155 files ok` - `cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings`: 0 warnings, 0 errors - `cargo test --workspace --locked`: **370 passed, 0 failed, 6 ignored** (`victory-shader`: 148 passed, 0 failed, 1 ignored) - `VICTORY_WARP=1 cargo test -p victory-shader wave64_tests --locked`: **27 passed, 0 failed**, including two new 128-thread Wave64 Mesh + Pixel `DispatchMesh` live GPU pixel-readback tests covering virtual wave `0` (`s_bcnt1`, `s_ff1`, dynamic cross-half `v_readlane`) and virtual wave `1` (`v_readfirstlane`, `v_writelane_b32`, `s_bcnt1`). Note: `gh pr create` currently reports `CreatePullRequest` is restricted on upstream, so sharing as a fork branch stacked on #189 for anyone testing Wave64 mesh rendering (e.g. with #587).
Author
Owner

@⁠jebaczydow on GitHub · 2026-11-24 13:55 UTC · original · edited 2026-11-24 14:08 UTC

RTX 5070 Ti (32-lane waves), Windows 11: world runs with wave64 mesh refused vs allowed

Tree: main ffe310e + #439 (head c153b21, includes #223/#233/#320) + #334 (c99e429) + #578 + #452 (3ede934). One local change, unrelated: textures the host refuses with unordered access are retried without it. One local switch: VICTORY_ALLOW_WAVE64_MESH turns off #578's mesh refusal.

All runs: diagnostics build, VICTORY_D3D12_DRED=1, the same scripted entry into the world (VICTORY_KEYS=15:Enter,25:Enter,35:Enter,50:Enter).

Run Result
mesh refused (#578) No device removal within the 180 s limit, ~1 fps. Frames black apart from the opening credits text. ~57k draws per frame dropped as refused, ~430 drawn.
mesh refused, second run (also dumping shader containers) Device removed at ~110 s, 0x887A0006.
mesh allowed, #452 defaults Device removed after a 5.3 s submission. DRED: the list stopped at command 156 of 1256 (op 42). Commands 146..215 are between two barriers. Command 148 is DispatchMesh of mesh 38ad582f523fd7cf.
mesh allowed, #452 + VICTORY_SHADER_LOOP_LIMIT=64 Device removed. DRED: stopped at command 1897 of 5235 (op 42), commands 1890..1930 between barriers. Command 1891 is indirect kind 10 of mesh ae9ee9074f2e971f.
mesh allowed, VICTORY_D3D12_DEBUG=1 + VICTORY_D3D12_GBV=1 Did not reach the world: about 2 fps, last frame logged 512. GBV reported 0 out-of-bounds heap reads. It reported 3 "SRV resource dimensions differs" errors: a pixel shader expects TEXTURE2D, the descriptor is TEXTURE1D. Then the title faulted: 0xc0000005 write to 0x0 at game_scarlett_master.exe+0x23cf683.

Neither DRED report names the command that hung.

The two mesh programs named above (38ad582f523fd7cf, ae9ee9074f2e971f) each have:

  • no backward branches,
  • no ds_* instructions,
  • two s_barrier,
  • a ResourceHeap root parameter.

Without #334, the debug layer reports 18 IASetVertexBuffers on a title buffer in UNORDERED_ACCESS, and 44 barrier before-state mismatches (#548/#264). With #334 both counts are 0.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠jebaczydow** on GitHub · 2026-11-24 13:55 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7133537881) · edited 2026-11-24 14:08 UTC **RTX 5070 Ti (32-lane waves), Windows 11: world runs with wave64 mesh refused vs allowed** Tree: `main` `ffe310e` + #439 (head `c153b21`, includes #223/#233/#320) + #334 (`c99e429`) + #578 + #452 (`3ede934`). One local change, unrelated: textures the host refuses with unordered access are retried without it. One local switch: `VICTORY_ALLOW_WAVE64_MESH` turns off #578's mesh refusal. All runs: diagnostics build, `VICTORY_D3D12_DRED=1`, the same scripted entry into the world (`VICTORY_KEYS=15:Enter,25:Enter,35:Enter,50:Enter`). | Run | Result | |---|---| | mesh refused (#578) | No device removal within the 180 s limit, ~1 fps. Frames black apart from the opening credits text. ~57k draws per frame dropped as refused, ~430 drawn. | | mesh refused, second run (also dumping shader containers) | Device removed at ~110 s, `0x887A0006`. | | mesh allowed, #452 defaults | Device removed after a 5.3 s submission. DRED: the list stopped at command 156 of 1256 (op 42). Commands 146..215 are between two barriers. Command 148 is `DispatchMesh` of `mesh 38ad582f523fd7cf`. | | mesh allowed, #452 + `VICTORY_SHADER_LOOP_LIMIT=64` | Device removed. DRED: stopped at command 1897 of 5235 (op 42), commands 1890..1930 between barriers. Command 1891 is indirect kind 10 of `mesh ae9ee9074f2e971f`. | | mesh allowed, `VICTORY_D3D12_DEBUG=1` + `VICTORY_D3D12_GBV=1` | Did not reach the world: about 2 fps, last frame logged 512. GBV reported 0 out-of-bounds heap reads. It reported 3 "SRV resource dimensions differs" errors: a pixel shader expects TEXTURE2D, the descriptor is TEXTURE1D. Then the title faulted: `0xc0000005` write to `0x0` at `game_scarlett_master.exe+0x23cf683`. | Neither DRED report names the command that hung. The two mesh programs named above (`38ad582f523fd7cf`, `ae9ee9074f2e971f`) each have: - no backward branches, - no `ds_*` instructions, - two `s_barrier`, - a `ResourceHeap` root parameter. Without #334, the debug layer reports 18 `IASetVertexBuffers` on a title buffer in `UNORDERED_ACCESS`, and 44 barrier before-state mismatches (#548/#264). With #334 both counts are 0. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

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

RTX 3070 Ti (621.35, 32-lane waves), Windows 11, own 1.0.2.1 copy. Wave64 mesh programs allowed (no #578), 10 minutes in the world without a device removal, and the HDR targets are no longer 0, but they look saturated.

Tree: main ffe310e + #439 + #431 + #587 + #493 + #539 + #704 + #452 + MIN_DYNAMIC = 1 << 18 (#747). Merges were clean except a two-line mod/use conflict between #452 and #439 in emit/mod.rs. Two test initialisers also needed #439's new Parts/emit fields. victory-shader lib tests: 165 passed; victory-gpu: 53 passed. Diag build, VICTORY_D3D12_DRED=1, #452 defaults (no manual loop limit).

Run Result
no skips device removed ~2 min into the world (0x887A0006). DRED: list stopped at command 4 of 11 (op 6), dispatch 12x1x1 [compute eeed82b877b44b5f] (the one KenzoPortela skipped above)
VICTORY_SKIP_PIPELINES=eeed82b877b44b5f ~10 min in the world, no removal (stopped by me). 2,302 draws/frame, 526 dropped without a host pipeline, 1,319 indirect. 0.5–0.9 fps with a 5–6 fps stretch. Last frame: 507 ms copies (291 MB), 233 ms GPU, 179 ms copy-back

victory translate --host-lanes 32-32 on this tree: vertex/pixel 12,763 of 14,039, compute 1,460 of 2,582, mesh 8,215 of 8,713. Of those, #539 added +518 VS/PS, #704 +36 CS, and #168 changed nothing. #302, #329, #585 and #645 each conflict with #439.

Lighting chain (frame 2100, VICTORY_DUMP_TARGETS=1):

  • shader_binning_utils_CS_GenerateShaderBinOffsets (8dd8d739047fe557) translates and runs on this tree. It is one of the two gaps KenzoPortela named.
  • G-buffers hold the full scene (street, lamp posts, flags), as before.
  • HDR targets are no longer zero: a 1280×720 R16G16B16A16F target is solid saturated blue (97% of samples non-dark). Every small R11G11B10F / R16G16B16A16F luminance-downsample target (160×90, 54×30, 1×1) reads 255 in every sample.
  • The presented 3840×2160 frame is still black.

My guess, not verified: the PNG dump clamps floats, so "all 255" may be Inf/NaN rather than real light. An infinite or NaN average luminance would give the exposure/tonemap a zero or NaN scale, and that would explain a black frame with live HDR targets. Reading the actual float values of the 1×1 luminance target would settle it. avgLuminanceCompute_ColorDownsample(Init)CS (the other gap, "an address not from a root parameter") is still refused here, since #302/#645 don't merge on top of #439.

AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.

**@⁠ByMateos** on GitHub · 2026-11-24 14:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7134264046) RTX 3070 Ti (621.35, 32-lane waves), Windows 11, own 1.0.2.1 copy. **Wave64 mesh programs allowed (no #578), 10 minutes in the world without a device removal, and the HDR targets are no longer 0, but they look saturated.** **Tree:** `main` `ffe310e` + #439 + #431 + #587 + #493 + #539 + #704 + #452 + `MIN_DYNAMIC = 1 << 18` (#747). Merges were clean except a two-line `mod`/`use` conflict between #452 and #439 in `emit/mod.rs`. Two test initialisers also needed #439's new `Parts`/`emit` fields. `victory-shader` lib tests: 165 passed; `victory-gpu`: 53 passed. Diag build, `VICTORY_D3D12_DRED=1`, #452 defaults (no manual loop limit). | Run | Result | |---|---| | no skips | device removed ~2 min into the world (0x887A0006). DRED: list stopped at command 4 of 11 (op 6), `dispatch 12x1x1 [compute eeed82b877b44b5f]` (the one KenzoPortela skipped above) | | `VICTORY_SKIP_PIPELINES=eeed82b877b44b5f` | **~10 min in the world, no removal** (stopped by me). 2,302 draws/frame, 526 dropped without a host pipeline, 1,319 indirect. 0.5–0.9 fps with a 5–6 fps stretch. Last frame: 507 ms copies (291 MB), 233 ms GPU, 179 ms copy-back | `victory translate --host-lanes 32-32` on this tree: vertex/pixel 12,763 of 14,039, compute 1,460 of 2,582, mesh 8,215 of 8,713. Of those, #539 added +518 VS/PS, #704 +36 CS, and #168 changed nothing. #302, #329, #585 and #645 each conflict with #439. **Lighting chain (frame 2100, `VICTORY_DUMP_TARGETS=1`):** - `shader_binning_utils_CS_GenerateShaderBinOffsets` (`8dd8d739047fe557`) **translates and runs** on this tree. It is one of the two gaps KenzoPortela named. - G-buffers hold the full scene (street, lamp posts, flags), as before. - HDR targets are **no longer zero**: a 1280×720 R16G16B16A16F target is solid saturated blue (97% of samples non-dark). Every small R11G11B10F / R16G16B16A16F luminance-downsample target (160×90, 54×30, 1×1) reads 255 in every sample. - The presented 3840×2160 frame is still black. My guess, not verified: the PNG dump clamps floats, so "all 255" may be Inf/NaN rather than real light. An infinite or NaN average luminance would give the exposure/tonemap a zero or NaN scale, and that would explain a black frame with live HDR targets. Reading the actual float values of the 1×1 luminance target would settle it. `avgLuminanceCompute_ColorDownsample(Init)CS` (the other gap, "an address not from a root parameter") is still refused here, since #302/#645 don't merge on top of #439. AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.
Author
Owner

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

Follow-up: with #650 added (main ffe310e + #439 + #431 + #579 + #587 + #650), the two hanging mesh programs (4adfa13bea1c556a MSR_VS_CascadeShadows_drawskinned, 18bbb989c875c8fb MS_VS_TransformSkinD_NoDeform) no longer hang in two 900 s runs on the RTX 3070 Ti. The world ran 13.5 and 4 min, then hung on compute eeed82b877b44b5f (CS_ComputeHitDetectionSkinnedResults), which reads the same skinned-geometry buffers. So the NVIDIA mesh hang here looks like out-of-range root-view reads (#650) rather than the wave size.

**@⁠Ilokaxt** on GitHub · 2026-11-24 14:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7134404331) Follow-up: with **#650** added (`main` `ffe310e` + #439 + #431 + #579 + #587 + #650), the two hanging mesh programs (`4adfa13bea1c556a` `MSR_VS_CascadeShadows_drawskinned`, `18bbb989c875c8fb` `MS_VS_TransformSkinD_NoDeform`) **no longer hang** in two 900 s runs on the RTX 3070 Ti. The world ran 13.5 and 4 min, then hung on compute `eeed82b877b44b5f` (`CS_ComputeHitDetectionSkinnedResults`), which reads the same skinned-geometry buffers. So the NVIDIA mesh hang here looks like out-of-range root-view reads (#650) rather than the wave size.
Author
Owner

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

Same symptom on an RTX 4070 SUPER (32-lane waves, Windows 11 26300, own 1.0.2.1 copy), on main at ffe310e with a few local changes. Adding what we tried that is not in this thread yet, in case it saves someone a run.

What happens: boot, intro, first-boot screens and the story load are fine; at the world's first frames the device is removed (DXGI_ERROR_DEVICE_HUNG), DRED stops at op 42 (DispatchMesh) with no page fault. With VICTORY_SKIP_PIPELINES grown one program per run, eight runs in a row each stopped at a different mesh program in the same first frames: 04b9be3756e8f41c, b0c25c474da417b3, f2f6c9ab8aea0f06, c962201cddbdd7dd, a26422c01dcf5612, 6b57e37fe499c6e7, 9c6c7fb345f39611, 38ad582f523fd7cf. So, as in #71, it looks like every world mesh draw, not a few programs.

Ruled out here (one run each, on top of what #71 and #578 list):

  • Lane layout. An experiment that translates wave64 programs "narrow" when WaveLaneCountMax < 64: console lane from the flat thread id (not WaveGetLaneIndex), a ballot placed in its half's word of the 64-bit mask (the other half's lanes read as inactive), lane reads kept in the half, no WaveSize(64) and no thread-id relabelling for compute. Tests pass (120/120 in victory-shader, GPU tests included), the pipelines are made, the device still hangs at the same draws.
  • Divergent group barriers. Barriers in blocks that some path from the entry to an exit goes around, dropped on 32-lane hosts: no change. (The first program above has no barrier and no loop at all.)
  • Loop budget. VICTORY_SHADER_LOOP_LIMIT=16: no change. All seven loops of the paired pixel program 1af4a50c7fb40c97 carry the limit check.
  • Dispatch size. Mesh records bounded at 64 groups in the argument clamp: no change; the stuck command is a direct DispatchMesh of 4 groups.
  • Output bounds. In the emitted DXIL of 04b9be3756e8f41c (128 threads, 128/128 outputs) every EmitIndices vertex index is below the count it is checked against (≤ 128), vertex outputs are written at the flat thread id; the DXIL validates and the pipeline is made by victory translate --validate --pipelines.
  • Over-reads. GPU-based validation reported root-SRV reads up to ~800 bytes past a title buffer's host copy; 64 KiB of zeros after every copy did not change the hang.
  • WARP. VICTORY_D3D12_WARP=1 gets to the same point (frame ~8496, first world frame) and the device is removed there too (0x887A0005), with no access violation to point at an instruction.

So on this card it is not the lane mapping, barriers, loops, dispatch size or output indices. #578's refusal is still the only thing that keeps the world up here (then black, as you describe).

Two side findings in case they are useful: Windows' "not responding" ghost window can replace the title's window during multi-second world frames, and its close button then ends the title mid-load (DisableProcessWindowsGhosting() before the title's first window avoids that); and the title's own thread watchdog (two conditional jumps in its watchdog loop) ended slow indirect runs before 35b054e made pipelines asynchronous. Happy to open PRs for either if wanted.

**@⁠KaV3R** on GitHub · 2026-11-24 14:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7134662586) Same symptom on an **RTX 4070 SUPER** (32-lane waves, Windows 11 26300, own 1.0.2.1 copy), on `main` at `ffe310e` with a few local changes. Adding what we tried that is not in this thread yet, in case it saves someone a run. **What happens:** boot, intro, first-boot screens and the story load are fine; at the world's first frames the device is removed (`DXGI_ERROR_DEVICE_HUNG`), DRED stops at `op 42` (DispatchMesh) with no page fault. With `VICTORY_SKIP_PIPELINES` grown one program per run, eight runs in a row each stopped at a *different* mesh program in the same first frames: `04b9be3756e8f41c`, `b0c25c474da417b3`, `f2f6c9ab8aea0f06`, `c962201cddbdd7dd`, `a26422c01dcf5612`, `6b57e37fe499c6e7`, `9c6c7fb345f39611`, `38ad582f523fd7cf`. So, as in #71, it looks like every world mesh draw, not a few programs. **Ruled out here (one run each, on top of what #71 and #578 list):** - *Lane layout.* An experiment that translates wave64 programs "narrow" when `WaveLaneCountMax < 64`: console lane from the flat thread id (not `WaveGetLaneIndex`), a ballot placed in its half's word of the 64-bit mask (the other half's lanes read as inactive), lane reads kept in the half, no `WaveSize(64)` and no thread-id relabelling for compute. Tests pass (120/120 in `victory-shader`, GPU tests included), the pipelines are made, the device still hangs at the same draws. - *Divergent group barriers.* Barriers in blocks that some path from the entry to an exit goes around, dropped on 32-lane hosts: no change. (The first program above has no barrier and no loop at all.) - *Loop budget.* `VICTORY_SHADER_LOOP_LIMIT=16`: no change. All seven loops of the paired pixel program `1af4a50c7fb40c97` carry the limit check. - *Dispatch size.* Mesh records bounded at 64 groups in the argument clamp: no change; the stuck command is a direct DispatchMesh of 4 groups. - *Output bounds.* In the emitted DXIL of `04b9be3756e8f41c` (128 threads, 128/128 outputs) every `EmitIndices` vertex index is below the count it is checked against (≤ 128), vertex outputs are written at the flat thread id; the DXIL validates and the pipeline is made by `victory translate --validate --pipelines`. - *Over-reads.* GPU-based validation reported root-SRV reads up to ~800 bytes past a title buffer's host copy; 64 KiB of zeros after every copy did not change the hang. - *WARP.* `VICTORY_D3D12_WARP=1` gets to the same point (frame ~8496, first world frame) and the device is removed there too (`0x887A0005`), with no access violation to point at an instruction. So on this card it is not the lane mapping, barriers, loops, dispatch size or output indices. #578's refusal is still the only thing that keeps the world up here (then black, as you describe). Two side findings in case they are useful: Windows' "not responding" ghost window can replace the title's window during multi-second world frames, and its close button then ends the title mid-load (`DisableProcessWindowsGhosting()` before the title's first window avoids that); and the title's own thread watchdog (two conditional jumps in its watchdog loop) ended slow indirect runs before 35b054e made pipelines asynchronous. Happy to open PRs for either if wanted.
Author
Owner

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

A way to run the wave64 programs on 32-lane hosts instead of refusing them: Leonida's emulation scheme (pointers, no game data)

The finding here, and #578's, is that the world hang on NVIDIA comes from wave64 mesh and compute programs running as two 32-lane waves. #578 turns that into dropped draws, and the world then renders black. Leonida's translator has a mode for exactly this hardware limit, and it is documented, so it may save a design round. Pinned at d0da7dad of the continuation:

  • The scheme (design.md L401): wave64 compute and mesh programs run exactly on any host wave size, with no host wave operation at all. One invocation is still one lane. Everything a lane needs from the rest of its wave goes through a group-shared buffer: votes (s_cbranch_vccz/execz and friends), whole-mask words (s_bcnt1, s_ff1, v_mbcnt), v_readlane, v_readfirstlane, ds_bpermute, ds_swizzle, v_permlane16. The program runs in rounds: each wave runs one segment (a basic block, cut at each cross-lane op), then the whole group meets at one barrier in uniform control flow. A cross-lane op ends its segment after the lane has stored its value or ORed its bit; the code after it runs one round later, when all 64 lanes have written. s_barrier becomes a scheduler state. A memory access that conflicts with an earlier one in the same segment starts a new round, so the two halves touch memory in instruction order, as one hardware wave does.
  • Why two free-running halves hang or go wrong follows from that: a vote or a mask word read in one half never sees the other half's lanes, so a loop that waits on a whole-wave condition can spin. That matches a hang that survives a loop limit of 64 on a single mesh group.
  • Vertex and pixel programs don't need it. For those the rule is partition invariance (design.md L498), which agrees with #578 keeping them.
  • Implementation and tests there: tools/wave64_emulate_opt.py, and 21 hand-written *_w64x_* GPU fixtures under runtime/test/shaders/ (ballots, ds_bpermute, s_barrier chains, LDS read-after-write, partial waves, a 128-thread group, one mesh program).
  • Measured today on an RTX 5070 Ti (driver 621.24, 32-lane waves, Leonida Continued main d0da7dad): that GPU suite passes 198 of 249 natively, with every wave64 compute and mesh fixture skipped for lack of 64-lane waves, and 230 of 249 with the emulation on. The 32 that flip are exactly those fixtures. The 2 failures are the same on both runs and unrelated.

It costs performance (a barrier per round, state through memory), and Leonida targets SPIR-V, so this is a design to port, not code. But it would let NVIDIA and Intel hosts run these programs instead of dropping them. I don't have the title, so I can't say how many of the world's wave64 mesh programs contain a cross-lane op at all; ones that don't could run as plain 32-lane halves, and a count of that from someone with the files would size the work. AI-assisted (Claude Code).

**@⁠c4k3ss** on GitHub · 2026-11-24 14:49 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7135014844) **A way to run the wave64 programs on 32-lane hosts instead of refusing them: Leonida's emulation scheme (pointers, no game data)** The finding here, and #578's, is that the world hang on NVIDIA comes from wave64 mesh and compute programs running as two 32-lane waves. #578 turns that into dropped draws, and the world then renders black. Leonida's translator has a mode for exactly this hardware limit, and it is documented, so it may save a design round. Pinned at `d0da7dad` of the continuation: - **The scheme** ([design.md L401](https://github.com/ubiquitarianism/leonida/blob/d0da7dade8b688f2e0f7f23f4155d6cbb438809e/docs/design.md#L401)): wave64 compute and mesh programs run exactly on any host wave size, with no host wave operation at all. One invocation is still one lane. Everything a lane needs from the rest of its wave goes through a group-shared buffer: votes (`s_cbranch_vccz/execz` and friends), whole-mask words (`s_bcnt1`, `s_ff1`, `v_mbcnt`), `v_readlane`, `v_readfirstlane`, `ds_bpermute`, `ds_swizzle`, `v_permlane16`. The program runs in rounds: each wave runs one segment (a basic block, cut at each cross-lane op), then the whole group meets at one barrier in uniform control flow. A cross-lane op ends its segment after the lane has stored its value or ORed its bit; the code after it runs one round later, when all 64 lanes have written. `s_barrier` becomes a scheduler state. A memory access that conflicts with an earlier one in the same segment starts a new round, so the two halves touch memory in instruction order, as one hardware wave does. - **Why two free-running halves hang or go wrong** follows from that: a vote or a mask word read in one half never sees the other half's lanes, so a loop that waits on a whole-wave condition can spin. That matches a hang that survives a loop limit of 64 on a single mesh group. - **Vertex and pixel programs** don't need it. For those the rule is partition invariance ([design.md L498](https://github.com/ubiquitarianism/leonida/blob/d0da7dade8b688f2e0f7f23f4155d6cbb438809e/docs/design.md#L498)), which agrees with #578 keeping them. - **Implementation and tests there**: [`tools/wave64_emulate_opt.py`](https://github.com/ubiquitarianism/leonida/blob/d0da7dade8b688f2e0f7f23f4155d6cbb438809e/tools/wave64_emulate_opt.py), and 21 hand-written `*_w64x_*` GPU fixtures under `runtime/test/shaders/` (ballots, `ds_bpermute`, `s_barrier` chains, LDS read-after-write, partial waves, a 128-thread group, one mesh program). - **Measured today on an RTX 5070 Ti** (driver 621.24, 32-lane waves, Leonida Continued `main` `d0da7dad`): that GPU suite passes 198 of 249 natively, with every wave64 compute and mesh fixture skipped for lack of 64-lane waves, and **230 of 249 with the emulation on**. The 32 that flip are exactly those fixtures. The 2 failures are the same on both runs and unrelated. It costs performance (a barrier per round, state through memory), and Leonida targets SPIR-V, so this is a design to port, not code. But it would let NVIDIA and Intel hosts run these programs instead of dropping them. I don't have the title, so I can't say how many of the world's wave64 mesh programs contain a cross-lane op at all; ones that don't could run as plain 32-lane halves, and a count of that from someone with the files would size the work. AI-assisted (Claude Code).
Author
Owner

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

@⁠ByMateos, on the question of whether the "all 255" luminance targets are Inf/NaN: on an RTX 3060 Ti (621.24, 32-lane) with nearly your tree, they aren't, and the saturated blue target isn't lighting.

Tree: main ffe310e + #439 + #578 (head's PSV0 rule, applied locally) + #493 + #587 + #431 + #539 + #704 (with #193) + #452 + #489 (with #302) + cybx's #645 port onto #439 + 2^18 dynamic slots (#747), wave64 mesh allowed with Peppacodes' host-lane numbering (#940) ported onto #439. Diag build, VICTORY_SHADER_LOOP_LIMIT=1024, eeed82b877b44b5f and 269b802f878c24e1 skipped. With the PSV0 rule the shader-binning, meshlet-culling and graph-ops compute programs stop being refused; a world frame went from ~2,600 to ~5,400 draws.

I patched the target dump locally to also log, per target, the count of NaN, Inf and exact-zero channels, and to print targets of 16 pixels or fewer exactly. Frame 2000 (cutscene, title card on screen):

Target Values
1280x720 R16G16B16A16F (solid blue with black silhouettes of people and plants) 0 NaN, 0 Inf, 0 zeros; max 9984 (half of 10000) over the whole background, the silhouettes lower. Shaped like a half-res distance buffer with "far" = 10000, not light
its 160x90 / 10x6 / 1x1 reductions finite, up to 9984; the 1x1 holds three values in the thousands
every 2560x1440 R16G16B16A16F and R11G11B10F target (5 + 4) exactly 0 in every channel, 0 NaN, 0 Inf
luminance chain (640x360 → 10x5 R11G11B10F) exactly 0
1x1 R32G32B32A32F targets after it finite, small (around 1e-3 and 1e-6)

So on this tree the black frame isn't a NaN/Inf exposure: the full-res HDR scene targets are never written, and the saturated target is a depth-like buffer whose sky value is 10000. Earlier frames (1500–2100 over several runs) look the same. The R32_UINT 2560x1440 targets that presumably hold the packed G-buffer were also 0 in those frames.

The dump patch is a few lines in capture.rs::to_rgba (diagnostics only). Happy to put it on a fork branch if it's useful to others.

AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.

**@⁠lines9686-rgb** on GitHub · 2026-11-24 14:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7135093539) @⁠ByMateos, on the question of whether the "all 255" luminance targets are Inf/NaN: on an RTX 3060 Ti (621.24, 32-lane) with nearly your tree, they aren't, and the saturated blue target isn't lighting. **Tree:** `main` `ffe310e` + #439 + #578 (head's PSV0 rule, applied locally) + #493 + #587 + #431 + #539 + #704 (with #193) + #452 + #489 (with #302) + cybx's #645 port onto #439 + 2^18 dynamic slots (#747), wave64 mesh allowed with Peppacodes' host-lane numbering (#940) ported onto #439. Diag build, `VICTORY_SHADER_LOOP_LIMIT=1024`, `eeed82b877b44b5f` and `269b802f878c24e1` skipped. With the PSV0 rule the shader-binning, meshlet-culling and graph-ops compute programs stop being refused; a world frame went from ~2,600 to ~5,400 draws. I patched the target dump locally to also log, per target, the count of NaN, Inf and exact-zero channels, and to print targets of 16 pixels or fewer exactly. Frame 2000 (cutscene, title card on screen): | Target | Values | |---|---| | 1280x720 R16G16B16A16F (solid blue with black silhouettes of people and plants) | 0 NaN, 0 Inf, 0 zeros; max 9984 (half of 10000) over the whole background, the silhouettes lower. Shaped like a half-res distance buffer with "far" = 10000, not light | | its 160x90 / 10x6 / 1x1 reductions | finite, up to 9984; the 1x1 holds three values in the thousands | | every 2560x1440 R16G16B16A16F and R11G11B10F target (5 + 4) | exactly 0 in every channel, 0 NaN, 0 Inf | | luminance chain (640x360 → 10x5 R11G11B10F) | exactly 0 | | 1x1 R32G32B32A32F targets after it | finite, small (around 1e-3 and 1e-6) | So on this tree the black frame isn't a NaN/Inf exposure: the full-res HDR scene targets are never written, and the saturated target is a depth-like buffer whose sky value is 10000. Earlier frames (1500–2100 over several runs) look the same. The R32_UINT 2560x1440 targets that presumably hold the packed G-buffer were also 0 in those frames. The dump patch is a few lines in `capture.rs::to_rgba` (diagnostics only). Happy to put it on a fork branch if it's useful to others. AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.
Author
Owner

@⁠KenzoPortela on GitHub · 2026-11-24 15:39 UTC · original

avgLuminanceCompute_ColorDownsample(Init)CS now translates: fix on a fork branch (one file, with a test)

@⁠ByMateos, this is the second gap you mentioned. It isn't #302/#645 territory. The address isn't a root argument: it points into a constant table appended to the program's own code. The compiler builds it as s_getpc_b64 + literal, adds a per-lane index with v_add_co_u32 / v_add_co_ci_u32, then moves it back to SGPRs with v_readfirstlane_b32 before an s_load_dword. Resource tracking stopped at the readfirstlane, which gives "an address not from a root parameter".

Branch: https://github.com/KenzoPortela/VIctory/tree/codetable-readfirstlane (one commit on main ffe310e, resource.rs only)

  • sum() looks through v_readfirstlane_b32 only when what it reads is s_getpc_b64-based. A root parameter's address seen through a lane read keeps its old refusal. carried() does the same for the high half.
  • The emitter's existing code_dword() already lowers a computed index into the table, so nothing changed there.
  • New unit test code_table_address_through_readfirstlane, which fails without the change. victory-shader lib tests: 121 passed on main. On my #439 stack: 161 passed.
  • Both programs emit and validate with dxil.dll (victory translate --validate).

World run, RTX 3070 (32-lane): #439 stack + #587 #493 #282 #302 #489 #490/#464 #953 + loop budget + 2^18 slots + this fix. 15 min, no removal, 1.2 fps, ~2,450 draws/frame, 0 host refusals.

  • Both ColorDownsample programs bind and run. A 1×1 R32G32B32A32F target in the luminance chain now reads ~6500 instead of ~1e-6.
  • The image is still black, and this matches @⁠lines9686-rgb's reading:
    • every 2560×1440 R16G16B16A16F / R11G11B10F target is exactly 0;
    • the only large non-zero targets are the depth-like ones (max 9984 / 10000).
  • So exposure was one broken link, but not the reason for black. The full-res HDR scene targets are never written.

Largest remaining drops in that run (per frame, summed over the log), for anyone picking the next one:

Shader Refusal Open PR
ComputeImposterTransform unknown stride #704 / #193
PedTransformPreSkinD mesh variants "a lane mask read as data" / "a descriptor's address or format read as data" —
VisHair / AlphaPrepass 64-bit image atomics #539
Several compute programs not in shaders.rpf (probably the RT/BVH builder, cf. #614) "a root UAV or typed root view" #294 / #709
PrescalarizeLightLoop (tiled lighting) "a descriptor's address or format read as data" —
ShadowRenderTiled* (18 cascade-shadow programs) 128-thread groups, outside #439's 64-thread flow —

AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.

**@⁠KenzoPortela** on GitHub · 2026-11-24 15:39 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7136388705) **`avgLuminanceCompute_ColorDownsample(Init)CS` now translates: fix on a fork branch (one file, with a test)** @⁠ByMateos, this is the second gap you mentioned. It isn't #302/#645 territory. The address isn't a root argument: it points into a **constant table appended to the program's own code**. The compiler builds it as `s_getpc_b64` + literal, adds a per-lane index with `v_add_co_u32` / `v_add_co_ci_u32`, then moves it back to SGPRs with `v_readfirstlane_b32` before an `s_load_dword`. Resource tracking stopped at the readfirstlane, which gives "an address not from a root parameter". Branch: https://github.com/KenzoPortela/VIctory/tree/codetable-readfirstlane (one commit on `main` `ffe310e`, `resource.rs` only) - `sum()` looks through `v_readfirstlane_b32` only when what it reads is `s_getpc_b64`-based. A root parameter's address seen through a lane read keeps its old refusal. `carried()` does the same for the high half. - The emitter's existing `code_dword()` already lowers a computed index into the table, so nothing changed there. - New unit test `code_table_address_through_readfirstlane`, which fails without the change. `victory-shader` lib tests: 121 passed on `main`. On my #439 stack: 161 passed. - Both programs emit and validate with dxil.dll (`victory translate --validate`). **World run, RTX 3070 (32-lane):** #439 stack + #587 #493 #282 #302 #489 #490/#464 #953 + loop budget + 2^18 slots + this fix. 15 min, no removal, 1.2 fps, ~2,450 draws/frame, 0 host refusals. - Both ColorDownsample programs bind and run. A 1×1 R32G32B32A32F target in the luminance chain now reads ~6500 instead of ~1e-6. - **The image is still black**, and this matches @⁠lines9686-rgb's reading: - every 2560×1440 R16G16B16A16F / R11G11B10F target is exactly 0; - the only large non-zero targets are the depth-like ones (max 9984 / 10000). - So exposure was one broken link, but not the reason for black. The full-res HDR scene targets are never written. Largest remaining drops in that run (per frame, summed over the log), for anyone picking the next one: | Shader | Refusal | Open PR | |---|---|---| | `ComputeImposterTransform` | unknown stride | #704 / #193 | | `PedTransformPreSkinD` mesh variants | "a lane mask read as data" / "a descriptor's address or format read as data" | — | | VisHair / AlphaPrepass | 64-bit image atomics | #539 | | Several compute programs not in `shaders.rpf` (probably the RT/BVH builder, cf. #614) | "a root UAV or typed root view" | #294 / #709 | | `PrescalarizeLightLoop` (tiled lighting) | "a descriptor's address or format read as data" | — | | `ShadowRenderTiled*` (18 cascade-shadow programs) | 128-thread groups, outside #439's 64-thread flow | — | AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.
Author
Owner

@⁠VibePorter on GitHub · 2026-11-24 16:07 UTC · original · edited 2026-11-24 16:31 UTC

RTX 5080: the world hang is translated loops that never end. VICTORY_SHADER_LOOP_LIMIT=64 on top of exp/mesh-host-lanes removes it and the title reaches gameplay (the cap alone on main does not)

Setup

  • Windows 11 (26300), NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves only
  • Ryzen 7 9800X3D, 32 GB RAM, page file 32–48 GB (commit limit ~63 GB)
  • --profile diag --features diagnostics, VICTORY_D3D12_DRED=1, VICTORY_KEYS pressing Enter every 3 s from 15 s to 360 s, no VICTORY_SKIP_* unless stated
  • Base tree: main @ ffe310e + Peppacodes exp/mesh-host-lanes @ ed9afc0 (incl. #189) + #587 + #493
    (one conflict in draw.rs: kept #493's bounded root-SRV tables and the branch's null-root-view fallback)

Runs (same machine, one after another)

Run Tree / settings Device removed DRED: list stopped at Mesh / pixel shader Null descriptors read
0 plain main @ ffe310e, release build ~25 s into the world (no DRED) (51ff151f75cd5759 seen in the log)
A base tree 130 s (~75 s into the world) command 560/716, DispatchMesh 3 51ff151f75cd5759 / 7fe75645c406cac6 u8, u9
B A + VICTORY_SKIP_PIPELINES=51ff151f75cd5759 450 s command 226/228, DispatchMesh 2 f2f6c9ab8aea0f06 / a5d8f39892a63276 u8
C A + #1039 #1057 #1014 #1084 #1073 #1074 72 s (~15 s into the world) command 168/170, DispatchMesh 4 04b9be3756e8f41c / 1af4a50c7fb40c97 u8, u9, u10
D C + #568 95 s (~40 s into the world) command 212/222, DispatchMesh 3 b0c25c474da417b3 / 9a3acc60433be38a u8, u9, u10
E D + VICTORY_SHADER_LOOP_LIMIT=64 none in 600 s (stopped by my 10-minute cap) — — —
F plain main @ ffe310e (diag) + VICTORY_SHADER_LOOP_LIMIT=64, nothing else 126 s (~45 s into the world) command 860/3765, DispatchMesh 29 (barrier range 713..945, first listed command 714) f0c7efd2aceb2aaa / 7d85c9cab3c80721 u8, u9

(The merges of #1014/#1084/#1073/#1074/#568 had conflicts only in test code or adjacent additions; the fixes themselves were kept, a few of their new tests were left out. #573 was not used because it clashes with #189's lane numbering.)

Run E in numbers

  • World entered at ~55 s, then about 9 minutes in the world with no hang; the title showed its control tutorial ("Move around" / "Move the camera") and moved on to further tutorial prompts.
  • 0.7–2.2 fps (1.6 average), ~2,430 draws/frame of which ~1,360 dropped (no host pipeline; ~600 "shader does not translate"), 0 host pipelines refused.
  • Peak private memory 26.8 GB, rising slowly over the 10 minutes; no crashes.log.
  • The 3D scene itself stays black; only the tutorial overlay is visible.

Takeaways

  1. On this RTX 5080 every hang is a wave64 mesh draw, a different mesh shader each time, and each one reads one to three null descriptors.
  2. Skipping the hanging shader only moves the hang to the next one (A → B).
  3. The pixel helper-lane loop fix (#1039) does not cure it (C), and neither do typed null descriptors for empty table slots (#568) (D).
  4. Capping translated loops at 64 removes the hang completely (E), so on NVIDIA this is a loop that never ends, not an invalid access or a barrier problem. But the loop cap alone on plain main is not enough (F): there it still hangs on another wave64 mesh draw, and main also refuses 127 host pipelines that the patched tree builds. So the loop cap only works together with the wave64 lane handling from exp/mesh-host-lanes (#189 + ed9afc0) and the PRs listed above. My guess is a loop whose exit depends on the null-descriptor reads or on lanes 32–63 of a wave64 mesh program run as two 32-lane halves, but I haven't confirmed that.

With run E, a render-target dump (VICTORY_CAPTURE_FRAMES + VICTORY_DUMP_TARGETS=1, frame ~2 minutes into the world) shows the 3D scene in the depth buffer and the G-buffer targets, while the lighting-sized target is flat grey and most other full-size targets stay empty: geometry renders, the lighting/composite stage does not, hence the black frame.

Happy to rerun with other branches, a different loop limit, VICTORY_D3D12_GBV=1, or a specific shader dump if that helps narrow down which loop it is.

image
**@⁠VibePorter** on GitHub · 2026-11-24 16:07 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7137145025) · edited 2026-11-24 16:31 UTC **RTX 5080: the world hang is translated loops that never end. `VICTORY_SHADER_LOOP_LIMIT=64` on top of `exp/mesh-host-lanes` removes it and the title reaches gameplay (the cap alone on `main` does not)** **Setup** - Windows 11 (26300), NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves only - Ryzen 7 9800X3D, 32 GB RAM, page file 32–48 GB (commit limit ~63 GB) - `--profile diag --features diagnostics`, `VICTORY_D3D12_DRED=1`, `VICTORY_KEYS` pressing Enter every 3 s from 15 s to 360 s, no `VICTORY_SKIP_*` unless stated - Base tree: `main` @ `ffe310e` + Peppacodes `exp/mesh-host-lanes` @ `ed9afc0` (incl. #189) + #587 + #493 (one conflict in `draw.rs`: kept #493's bounded root-SRV tables and the branch's null-root-view fallback) **Runs (same machine, one after another)** | Run | Tree / settings | Device removed | DRED: list stopped at | Mesh / pixel shader | Null descriptors read | |---|---|---|---|---|---| | 0 | plain `main` @ `ffe310e`, release build | ~25 s into the world | (no DRED) | (`51ff151f75cd5759` seen in the log) | | | A | base tree | 130 s (~75 s into the world) | command 560/716, `DispatchMesh` 3 | `51ff151f75cd5759` / `7fe75645c406cac6` | `u8`, `u9` | | B | A + `VICTORY_SKIP_PIPELINES=51ff151f75cd5759` | 450 s | command 226/228, `DispatchMesh` 2 | `f2f6c9ab8aea0f06` / `a5d8f39892a63276` | `u8` | | C | A + #1039 #1057 #1014 #1084 #1073 #1074 | 72 s (~15 s into the world) | command 168/170, `DispatchMesh` 4 | `04b9be3756e8f41c` / `1af4a50c7fb40c97` | `u8`, `u9`, `u10` | | D | C + #568 | 95 s (~40 s into the world) | command 212/222, `DispatchMesh` 3 | `b0c25c474da417b3` / `9a3acc60433be38a` | `u8`, `u9`, `u10` | | **E** | **D + `VICTORY_SHADER_LOOP_LIMIT=64`** | **none in 600 s** (stopped by my 10-minute cap) | — | — | — | | F | plain `main` @ `ffe310e` (diag) + `VICTORY_SHADER_LOOP_LIMIT=64`, nothing else | 126 s (~45 s into the world) | command 860/3765, `DispatchMesh` 29 (barrier range 713..945, first listed command 714) | `f0c7efd2aceb2aaa` / `7d85c9cab3c80721` | `u8`, `u9` | (The merges of #1014/#1084/#1073/#1074/#568 had conflicts only in test code or adjacent additions; the fixes themselves were kept, a few of their new tests were left out. #573 was not used because it clashes with #189's lane numbering.) **Run E in numbers** - World entered at ~55 s, then **about 9 minutes in the world with no hang**; the title showed its control tutorial ("Move around" / "Move the camera") and moved on to further tutorial prompts. - 0.7–2.2 fps (1.6 average), ~2,430 draws/frame of which ~1,360 dropped (no host pipeline; ~600 "shader does not translate"), **0 host pipelines refused**. - Peak private memory 26.8 GB, rising slowly over the 10 minutes; no `crashes.log`. - The 3D scene itself stays black; only the tutorial overlay is visible. **Takeaways** 1. On this RTX 5080 every hang is a wave64 **mesh** draw, a different mesh shader each time, and each one reads one to three **null** descriptors. 2. Skipping the hanging shader only moves the hang to the next one (A → B). 3. The pixel helper-lane loop fix (#1039) does not cure it (C), and neither do typed null descriptors for empty table slots (#568) (D). 4. **Capping translated loops at 64 removes the hang completely (E)**, so on NVIDIA this is a loop that never ends, not an invalid access or a barrier problem. **But the loop cap alone on plain `main` is not enough (F)**: there it still hangs on another wave64 mesh draw, and `main` also refuses 127 host pipelines that the patched tree builds. So the loop cap only works together with the wave64 lane handling from `exp/mesh-host-lanes` (#189 + `ed9afc0`) and the PRs listed above. My guess is a loop whose exit depends on the null-descriptor reads or on lanes 32–63 of a wave64 mesh program run as two 32-lane halves, but I haven't confirmed that. With run E, a render-target dump (`VICTORY_CAPTURE_FRAMES` + `VICTORY_DUMP_TARGETS=1`, frame ~2 minutes into the world) shows the 3D scene in the depth buffer and the G-buffer targets, while the lighting-sized target is flat grey and most other full-size targets stay empty: geometry renders, the lighting/composite stage does not, hence the black frame. Happy to rerun with other branches, a different loop limit, `VICTORY_D3D12_GBV=1`, or a specific shader dump if that helps narrow down which loop it is. <img width="1834" height="1032" alt="image" src="https://github.com/user-attachments/assets/3e898169-430f-49e8-854c-e666d962b3d5" />
Author
Owner

@⁠Ilokaxt on GitHub · 2026-11-24 19:27 UTC · original

RTX 3070 Ti Laptop: two more dropped links on the way to the lit image (the deferred resolve shader, the tiled-lighting rectangle draws). The frame is still black with both fixed.

I agree with @⁠lines9686-rgb and @⁠KenzoPortela: the full-resolution HDR targets are never written. Below is what I found on the way from the G-buffer to those targets, and what did not help.

Setup

  • Windows 11 (26300), RTX 3070 Ti Laptop (32-lane waves only), NVIDIA driver 621.40.
  • --profile diag --features diagnostics, VICTORY_SKIP_PIPELINES=eeed82b877b44b5f, 2^18 dynamic slots (#747).
  • Tree: main ffe310e + #439 #431 #587 #493 #539 #704 #452 #650, plus the device created on the high-performance adapter (#94/#208).

1. Stability. With #650, the world runs 9 minutes with no device removal. I got that several times, from 9-minute runs up to one 20-minute run.

2. NaN in the scattering chain, real but not the cause of black.

  • scattering_transmittance_system:CS_DownsampleFarDistanceTargetDepth (4e65e4280be47b4b) writes a 960×540 R32F that is 100% NaN every world frame.
  • CS_GenerateRayCoords (022eb4531da1421b) carries that NaN into 480×270.
  • The 2560×1440 inputs I could dump are NaN-free. The R32G8X24 depth input never appears in the dump.
  • Neither #154 nor #651 changes it.
  • Skipping 4e65e4280be47b4b removes those NaN. The 80×45 R16F written by CS_IntegrateDiffusion / CS_GatherDiffusion stays NaN, and the scene still does not appear.

3. The G-buffer has the scene, the HDR targets don't.

  • The 2560×1440 R8G8B8A8 targets hold the world geometry (packed normals and albedo of the street, rocks and machines).
  • Every 2560×1440 R16G16B16A16F / R11G11B10F target is exactly 0 in the same frames.

4. PS_ResolveDeferred_3 (4536a8bd77616602) does not translate: "a lane-mask join of an untracked mask" at 0x8420.

  • It is bound at world entry in every run. Variants 0–2 translate.
  • I checked the open PRs offline on ffe310e, translating only this program and validating with dxil.dll:
PR PS_ResolveDeferred_3
main refused
#1074 translates, validates
#298 translates, validates
#1084, #585, #1269, #660, #1270, #1073 still refused
  • #1074 merges onto my stack with one trivial conflict in structure.rs: paired_masks is already there from another PR, so I kept that one.
  • With #1074 the pipeline is created in the game (host pipeline shaders=[vertex 24abbd85477b8da6, pixel 4536a8bd77616602]).

5. Tiled-lighting rectangle draws are dropped, and #1020 fixes that.

  • The largest single drop was indirect kind 0: prepare failed (compute false, mesh false), up to 256 per frame.
  • A temporary probe that adds topology and pipeline to that reason shows they are all topology 17 (rectangle list) draws of one pipeline: VS_TiledLighting_44ece319 + PS_SSSResolve_44ece319.
  • The per-material tiled lighting (VS_TiledLighting + about 90 TL_PS_PBR_MATERIAL_*) gets host pipelines for every program.
  • With #1020 on top (clean merge), the log shows a rectangle geometry stage made twice, and the prepare failed drops are gone.

6. Result: still black.

  • Tree: the stack above + #1074 + #1020, 20-minute run.
  • Every presented world frame I captured (1820–1980) has a maximum of 2/255. Amplified, it is only the dither pattern.
  • I have not yet dumped the HDR targets with #1074 + #1020. At about 0.2 fps the title reaches the world at a different frame every run, and my dump frames missed it. So I can't say yet whether the tiled-lighting draws now write anything that a later pass loses.

Still refused in the lighting path on this tree, for whoever picks the next link:

  • tiled_lighting:CS_PrescalarizeLightLoop ("a descriptor's address or format read as data").
  • deferred_tiled:CS_ComputeClosestDepth ("an address not from a root parameter").
  • shadowmask:CS_TraceShadowRays_Checkerboard (same reason).
  • shadowmask:CS_DenoiseShadowMaskLDSPacked ("an LDS write of bytes or halves").
  • PS_FogComposite* (same lane-mask join as PS_ResolveDeferred_3).
  • Every material's CS_RaytracingResolve (mostly "a descriptor read only as data").

AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.

**@⁠Ilokaxt** on GitHub · 2026-11-24 19:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7142127673) **RTX 3070 Ti Laptop: two more dropped links on the way to the lit image (the deferred resolve shader, the tiled-lighting rectangle draws). The frame is still black with both fixed.** I agree with @⁠lines9686-rgb and @⁠KenzoPortela: the full-resolution HDR targets are never written. Below is what I found on the way from the G-buffer to those targets, and what did not help. **Setup** - Windows 11 (26300), RTX 3070 Ti Laptop (32-lane waves only), NVIDIA driver 621.40. - `--profile diag --features diagnostics`, `VICTORY_SKIP_PIPELINES=eeed82b877b44b5f`, 2^18 dynamic slots (#747). - Tree: `main` `ffe310e` + #439 #431 #587 #493 #539 #704 #452 #650, plus the device created on the high-performance adapter (#94/#208). **1. Stability.** With #650, the world runs 9 minutes with no device removal. I got that several times, from 9-minute runs up to one 20-minute run. **2. NaN in the scattering chain, real but not the cause of black.** - `scattering_transmittance_system:CS_DownsampleFarDistanceTargetDepth` (`4e65e4280be47b4b`) writes a 960×540 R32F that is 100% NaN every world frame. - `CS_GenerateRayCoords` (`022eb4531da1421b`) carries that NaN into 480×270. - The 2560×1440 inputs I could dump are NaN-free. The R32G8X24 depth input never appears in the dump. - Neither #154 nor #651 changes it. - Skipping `4e65e4280be47b4b` removes those NaN. The 80×45 R16F written by `CS_IntegrateDiffusion` / `CS_GatherDiffusion` stays NaN, and the scene still does not appear. **3. The G-buffer has the scene, the HDR targets don't.** - The 2560×1440 R8G8B8A8 targets hold the world geometry (packed normals and albedo of the street, rocks and machines). - Every 2560×1440 R16G16B16A16F / R11G11B10F target is exactly 0 in the same frames. **4. `PS_ResolveDeferred_3` (`4536a8bd77616602`) does not translate: "a lane-mask join of an untracked mask" at `0x8420`.** - It is bound at world entry in every run. Variants 0–2 translate. - I checked the open PRs offline on `ffe310e`, translating only this program and validating with dxil.dll: | PR | `PS_ResolveDeferred_3` | |---|---| | `main` | refused | | #1074 | **translates, validates** | | #298 | **translates, validates** | | #1084, #585, #1269, #660, #1270, #1073 | still refused | - #1074 merges onto my stack with one trivial conflict in `structure.rs`: `paired_masks` is already there from another PR, so I kept that one. - With #1074 the pipeline is created in the game (`host pipeline shaders=[vertex 24abbd85477b8da6, pixel 4536a8bd77616602]`). **5. Tiled-lighting rectangle draws are dropped, and #1020 fixes that.** - The largest single drop was `indirect kind 0: prepare failed (compute false, mesh false)`, up to 256 per frame. - A temporary probe that adds topology and pipeline to that reason shows they are all topology 17 (rectangle list) draws of one pipeline: `VS_TiledLighting_44ece319` + `PS_SSSResolve_44ece319`. - The per-material tiled lighting (`VS_TiledLighting` + about 90 `TL_PS_PBR_MATERIAL_*`) gets host pipelines for every program. - With #1020 on top (clean merge), the log shows `a rectangle geometry stage made` twice, and the `prepare failed` drops are gone. **6. Result: still black.** - Tree: the stack above + #1074 + #1020, 20-minute run. - Every presented world frame I captured (1820–1980) has a maximum of 2/255. Amplified, it is only the dither pattern. - I have not yet dumped the HDR targets with #1074 + #1020. At about 0.2 fps the title reaches the world at a different frame every run, and my dump frames missed it. So I can't say yet whether the tiled-lighting draws now write anything that a later pass loses. **Still refused in the lighting path on this tree, for whoever picks the next link:** - `tiled_lighting:CS_PrescalarizeLightLoop` ("a descriptor's address or format read as data"). - `deferred_tiled:CS_ComputeClosestDepth` ("an address not from a root parameter"). - `shadowmask:CS_TraceShadowRays_Checkerboard` (same reason). - `shadowmask:CS_DenoiseShadowMaskLDSPacked` ("an LDS write of bytes or halves"). - `PS_FogComposite*` (same lane-mask join as `PS_ResolveDeferred_3`). - Every material's `CS_RaytracingResolve` (mostly "a descriptor read only as data"). AI-assisted (Claude Code); runs on my machine with my own copy, nothing from the game attached.
Author
Owner

@⁠vladbondarenko97 on GitHub · 2026-11-24 19:43 UTC · original

RTX 3080 Ti data point for this recipe, on today's main.

Build: main ffe310e + #578 (b8b04ef) + #454 (d2c93fa) + #206 (05981dd) + #493 (c48b240), merged locally, diag profile. Env: VICTORY_NO_WATCHDOG=1 VICTORY_SHADER_LOOP_LIMIT=4096 VICTORY_SKIP_PIPELINES=eeed82b877b44b5f VICTORY_D3D12_DRED=1. Host: RTX 3080 Ti 12 GB (32-lane waves), i7-12700KF, 32 GB RAM + 64 GB page file, Windows 11 26300, TDR delay 60 s. Retail 1.0.2.1 (exe BLAKE3 b99f876b…), network blocked by firewall. 900 s run; first-run screens driven by VICTORY_KEYS.

Result

  • No device removal or hang in 900 s (no DRED output).
  • Menus and both legal screens render; the game then goes past them into a black screen. Presents there are slow: 0.8–2.5 fps for the last ~12 minutes.
  • Draws per frame climb to 452–472, so world work is being submitted. 519 shader does not translate; its pipelines' draws are dropped warnings; per frame, about 50 draws are dropped for refused mesh / compute pipelines (the wave64 ones #578 refuses here).
  • Where the frame time goes (victory_gpu::host), e.g. 0.8 fps, 1233 ms/frame (250 preparing: copies 133 ms 20.9 MB, textures 26.5 ms 106 MB; 128 on the GPU; 838 copying back 27.4 MB) and 1.2 fps, 850 ms/frame (234 preparing: copies 160 ms; 108 on the GPU; 480 copying back 21.6 MB). The GPU part is about 50–130 ms; copying back is 85–840 ms and preparing 160–590 ms. On this card, readback, not GPU time, is most of the frame.
  • 200 dstorage: request failed: reading the source warnings.

So on an RTX 3080-class card this recipe reaches the same state as here (no TDR, black world, about 1 fps), and the next limit after the refused wave64 programs looks like the CPU-side copies back from the GPU. Logs can be shared on request (no game data in them beyond shader hashes).

AI use: Claude Code (Claude Opus 5.5) ran the box queue, read the logs and wrote this report; the numbers are copied from the log lines above.

**@⁠vladbondarenko97** on GitHub · 2026-11-24 19:43 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7142501795) RTX 3080 Ti data point for this recipe, on today's `main`. **Build**: `main` `ffe310e` + #578 (`b8b04ef`) + #454 (`d2c93fa`) + #206 (`05981dd`) + #493 (`c48b240`), merged locally, `diag` profile. **Env**: `VICTORY_NO_WATCHDOG=1 VICTORY_SHADER_LOOP_LIMIT=4096 VICTORY_SKIP_PIPELINES=eeed82b877b44b5f VICTORY_D3D12_DRED=1`. **Host**: RTX 3080 Ti 12 GB (32-lane waves), i7-12700KF, 32 GB RAM + 64 GB page file, Windows 11 26300, TDR delay 60 s. Retail 1.0.2.1 (exe BLAKE3 `b99f876b…`), network blocked by firewall. 900 s run; first-run screens driven by `VICTORY_KEYS`. **Result** - No device removal or hang in 900 s (no DRED output). - Menus and both legal screens render; the game then goes past them into a black screen. Presents there are slow: 0.8–2.5 fps for the last ~12 minutes. - Draws per frame climb to 452–472, so world work is being submitted. 519 `shader does not translate; its pipelines' draws are dropped` warnings; per frame, about 50 draws are dropped for refused mesh / compute pipelines (the wave64 ones #578 refuses here). - **Where the frame time goes** (`victory_gpu::host`), e.g. `0.8 fps, 1233 ms/frame (250 preparing: copies 133 ms 20.9 MB, textures 26.5 ms 106 MB; 128 on the GPU; 838 copying back 27.4 MB)` and `1.2 fps, 850 ms/frame (234 preparing: copies 160 ms; 108 on the GPU; 480 copying back 21.6 MB)`. The GPU part is about 50–130 ms; copying back is 85–840 ms and preparing 160–590 ms. On this card, readback, not GPU time, is most of the frame. - 200 `dstorage: request failed: reading the source` warnings. So on an RTX 3080-class card this recipe reaches the same state as here (no TDR, black world, about 1 fps), and the next limit after the refused wave64 programs looks like the CPU-side copies back from the GPU. Logs can be shared on request (no game data in them beyond shader hashes). AI use: Claude Code (Claude Opus 5.5) ran the box queue, read the logs and wrote this report; the numbers are copied from the log lines above.
Author
Owner

@⁠wildheathen on GitHub · 2026-11-24 20:56 UTC · original

RTX 5080, one data point on #650 alone: on main ffe310e + #650 06657a8 (merged locally; the only conflict was in valu_tests.rs, where I kept main's), the device is still removed, 23 s into the world. DRED stops at DispatchMesh, command 346 of 394, mesh 51ff151f75cd5759 / pixel 7fe75645c406cac6. That's the same program as @⁠VibePorter's run A above. On plain main the same setup stops on 4adfa13bea1c556a after 84 s.

So on this card #650 by itself moves the mesh hang rather than removing it. @⁠Ilokaxt's 3070 Ti result had #439, #431, #579 and #587 in the tree too, so this doesn't contradict it. It only says #650 isn't enough on its own here.

Setup: Windows 11, RTX 5080, driver 32.0.16.2124, diag build, VICTORY_D3D12_DRED=1, fresh copy of one save, VICTORY_KEYS, 480 s cap. One run.

AI-assisted (Claude Code).

**@⁠wildheathen** on GitHub · 2026-11-24 20:56 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7144252476) **RTX 5080, one data point on #650 alone:** on main `ffe310e` + #650 `06657a8` (merged locally; the only conflict was in `valu_tests.rs`, where I kept main's), the device is still removed, **23 s into the world**. DRED stops at `DispatchMesh`, command 346 of 394, mesh `51ff151f75cd5759` / pixel `7fe75645c406cac6`. That's the same program as @⁠VibePorter's run A above. On plain main the same setup stops on `4adfa13bea1c556a` after 84 s. So on this card #650 by itself moves the mesh hang rather than removing it. @⁠Ilokaxt's 3070 Ti result had #439, #431, #579 and #587 in the tree too, so this doesn't contradict it. It only says #650 isn't enough on its own here. Setup: Windows 11, RTX 5080, driver 32.0.16.2124, diag build, `VICTORY_D3D12_DRED=1`, fresh copy of one save, `VICTORY_KEYS`, 480 s cap. One run. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:52 UTC · original

Automated triage for the maintainers. Complete run report (RTX 3070, driver 32.0.16.2124, Windows 11 26200, 8e79c80, DRED per run), with useful follow-ups from other 32-lane NVIDIA cards (3060 Ti, 3070 Ti, 3080, 3080 Ti, 4070 SUPER, 4090, 5060 Ti, 5080). The failure, DEVICE_HUNG in a mesh dispatch (op 42) once the world loads that moves to other mesh or compute work when one program is skipped, is the NVIDIA world hang tracked in #71, the oldest complete report; please follow it there. The data here (all mesh programs are 128-thread wave64 groups, the per-PR A/B runs, the loop-guard results, the compute stop at eeed82b877b44b5f) is a good reference for that work.

Open PRs touching it: #1922 (refuse wave64 mesh/compute on 32-lane hosts, rebase of #578), #579 (VICTORY_SKIP_WAVE64 switch), #587 (mesh output bounds), #439 and #1929 (wave64 on 32-lane hosts), #961 (mesh compute fallback). The black image that remains once the hang is gone is discussed in #841. Several changes in this thread exist only as fork branches (loop budget, code-table v_readfirstlane, wave64 mesh emulation, mesh-census); pull requests are open to everyone, so please open them as PRs if they are meant for upstream.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/778#issuecomment-7152315415) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T20:56:06Z at=2026-11-25T03:52:08Z --> Automated triage for the maintainers. Complete run report (RTX 3070, driver 32.0.16.2124, Windows 11 26200, `8e79c80`, DRED per run), with useful follow-ups from other 32-lane NVIDIA cards (3060 Ti, 3070 Ti, 3080, 3080 Ti, 4070 SUPER, 4090, 5060 Ti, 5080). The failure, `DEVICE_HUNG` in a mesh dispatch (op 42) once the world loads that moves to other mesh or compute work when one program is skipped, is the NVIDIA world hang tracked in **#71**, the oldest complete report; please follow it there. The data here (all mesh programs are 128-thread wave64 groups, the per-PR A/B runs, the loop-guard results, the compute stop at `eeed82b877b44b5f`) is a good reference for that work. Open PRs touching it: #1922 (refuse wave64 mesh/compute on 32-lane hosts, rebase of #578), #579 (`VICTORY_SKIP_WAVE64` switch), #587 (mesh output bounds), #439 and #1929 (wave64 on 32-lane hosts), #961 (mesh compute fallback). The black image that remains once the hang is gone is discussed in #841. Several changes in this thread exist only as fork branches (loop budget, code-table `v_readfirstlane`, wave64 mesh emulation, `mesh-census`); pull requests are open to everyone, so please open them as PRs if they are meant for upstream. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#778
No description provided.