World load removes the host D3D12 device — on the real GPU (0x887A0006) and on WARP (0x887A0005) #653

Open
opened 2026-11-26 04:11:37 +00:00 by github-bot · 33 comments
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 06:15 UTC · original

First of all: thank you, this is amazing work. The whole first-boot flow runs flawlessly on my machine (account picker, accessibility pages, legal notices, Terms of Service, key art — a rock-solid 30 fps, 33.3 ms/frame, 21–55 draws/frame, ~4–8 ms on the GPU). The failure is exactly at the point where the world starts loading.

What happens

After accepting the legal terms and confirming, the title starts loading the world. The frame time goes from 33 ms to 1300–1600 ms with 2800–3240 draws/frame, then the host D3D12 device is removed and the process exits with 0x887A0005 (DXGI_ERROR_DEVICE_REMOVED).

WARN  victory_gpu::host: slow host submission ms=7358 lists=32 pipelines={"[compute …]", "[compute …]", "[mesh 0384efa1b7bcd540, pixel 1d96551fdd673db7]", … }   ← 38 pipelines first used in that submission
ERROR victory_gpu::host: host GPU device removed after a submission of 32 lists; no breadcrumbs
      (指定的设备接口或功能级别在此系统上不受支持。 (0x887A0004));
      device removed: GPU 不响应更多的命令,最为可能的原因是调用应用程序传递了无效的命令。 (0x887A0006)

Reproduced every time (release and diagnostics builds alike), always at the same phase, always on the same 31–32 list submission on the GPU.

It is not the GPU hanging: with VICTORY_D3D12_WARP=1 (diagnostics build, confirmed by host device on the software adapter (WARP)) the UI still runs at 26 fps, and the world load fails the same way — this time 0x887A0005 DEVICE_PAUSED after a submission of 1 list, with every collected stack frame inside the software rasteriser:

ERROR victory_gpu::host: host GPU device removed after a submission of 1 lists; no breadcrumbs
      (0x887A0004 …); device removed: GPU 设备实例已经暂停。… (0x887A0005)
  #5  d3d10warp.dll+0x2fa218
  #7  d3d10warp.dll+0xa4568
  #6  d3d10warp.dll+0xa47a4
  #8  ntdll.dll+0x75370   #10 KERNEL32.DLL+0x2e8d7   #11 ntdll.dll+0x8c53c

So a bad command list / descriptor / shader reaches the driver, rather than an NVIDIA-specific TDR.

Shader conversion failures at the same time

The same runs log 336–375 failed translations (release 336, diagnostics 375, both in compute shaders only), and the device dies right when a batch of compute + mesh pipelines is first submitted. Top reasons (normalised, RVA stripped):

count reason
88 a select on an untracked mask is not supported
80 a lane mask holding lanes elsewhere read as data is not supported
35 an address in an SGPR that is no root parameter is not supported
31 a structured buffer of unknown stride is not supported
27 a scalar memory read as data is not supported
20 a descriptor read only as data is not supported
17 an address not from a root parameter is not supported
16 a descriptor neither loaded nor built is not supported
15 a 64-bit image atomic is not supported
8 an address from a phi is not supported
6 a lane mask read as data is not supported
… 14 more reasons, 1–4 each (image_gather4_l, image_sample_d_cl, barycentrics read directly, LDS write of bytes or halves, packed input half, …)

The first few, verbatim:

age="compute" hash=fc5e66f8f873d3bb error=converter shader.dxil v1: GFX10 code at 0x3e0: a hardware SGPR input is not supported
age="compute" hash=0452fc2d2e2fc4c3 error=converter shader.dxil v1: GFX10 code at 0x1028: image_gather4_l is not supported
age="compute" hash=17af15c4015cb4b6 error=converter shader.dxil v1: GFX10 code at 0x9c4: a structured buffer of unknown stride is not supported

Environment

  • Windows 11 Pro 10.0.26100 (build 26100), AMD Ryzen 9 9900X, 61.5 GB RAM
  • GPU: NVIDIA GeForce RTX 4070 Ti SUPER, driver 580.97, 16376 MiB
  • Rust 1.98.1 (rust-toolchain.toml), repo commit d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989 (main, PR #129 merge)
  • Built both cargo build --release -p victory and cargo build --profile diag -p victory --features diagnostics
  • Game data: Xbox Series X package 1.0.2.1 (MicrosoftGame.Config, gameos.xvd, plaintext RPF9 — .rpf magic 39 46 50 52), 109 files / 208 GB. victory census on the title: 587 imports = 88 HLE / 427 host / 72 from the shipped DLLs.

Steps to reproduce

git clone --depth 1 https://github.com/Marvisak/VIctory.git
cd VIctory
rustup toolchain install 1.98.1 --profile minimal
cargo build --release -p victory

# victory.toml
[paths]
game_dir = '<package directory>'
cache_dir = '<cache>'
data_dir = '<data>'

target\release\victory.exe run <game_scarlett_master.exe> --execute --console series-x

Then in game: account picker → Enter; each following page needs Down then Enter on the highlighted button (plain Enter alone does nothing on Legal Notices → Next and Terms of Service → Confirm). After confirming the Terms of Service the world load begins and the device is removed within a couple of seconds.

WARP variant: cargo build --profile diag -p victory --features diagnostics, then VICTORY_D3D12_WARP=1 target\diag\victory.exe run … (the variable is only honoured by diagnostics builds, crates/victory-gpu/src/host.rs:179), then the same input sequence.

Numbers from the runs

run build UI phase world load outcome
run1 release 30.0 fps, 33.3 ms, 21–55 draws — stopped at the account picker for a screenshot
run2 diagnostics + VICTORY_KEYS 30.0 fps — used to walk the first-boot pages, stopped before the world
run3 diagnostics + VICTORY_KEYS 30.0 fps 1 fps, 1299 ms/frame, 3240 draws device removed, 32 lists
run4 release 30.0 fps 1 fps, 1599.7 ms/frame, 2859 draws device removed, 32 lists
run7 diagnostics + VICTORY_D3D12_WARP=1 26 fps — device removed, 1 list, d3d10warp stacks

host pipelines all made made=1239 loaded=21 started_early=18, shader cache hits=11 misses=851 before the world batch.

Questions

  1. Is this the known "world renders black" limitation, or a separate, harder failure (invalid command list) that you would want narrowed down?
  2. Would VICTORY_SKIP_PIPELINES with the failing hashes narrow it — and which hashes should I bisect first, the compute ones that failed translation, or the mesh/pixel pairs in that 38-pipeline submission?
  3. Is there a VICTORY_CAPTURE / VICTORY_CAPTURE_FRAMES frame number around the world load that would be useful to you (PIX/RenderDoc or the capture folder)? I can attach captures, the full logs (14k / 11k lines) and VICTORY_D3D12_DRED=1 output on request.
  4. Anything else you would like from this machine (I have the package and can rebuild in a minute)?
**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 06:15 UTC · [original](https://github.com/Marvisak/VIctory/issues/653) First of all: thank you, this is amazing work. The whole first-boot flow runs flawlessly on my machine (account picker, accessibility pages, legal notices, Terms of Service, key art — a rock-solid 30 fps, 33.3 ms/frame, 21–55 draws/frame, ~4–8 ms on the GPU). The failure is exactly at the point where the world starts loading. ## What happens After accepting the legal terms and confirming, the title starts loading the world. The frame time goes from 33 ms to **1300–1600 ms** with **2800–3240 draws/frame**, then the host D3D12 device is removed and the process exits with `0x887A0005` (`DXGI_ERROR_DEVICE_REMOVED`). ``` WARN victory_gpu::host: slow host submission ms=7358 lists=32 pipelines={"[compute …]", "[compute …]", "[mesh 0384efa1b7bcd540, pixel 1d96551fdd673db7]", … } ← 38 pipelines first used in that submission ERROR victory_gpu::host: host GPU device removed after a submission of 32 lists; no breadcrumbs (指定的设备接口或功能级别在此系统上不受支持。 (0x887A0004)); device removed: GPU 不响应更多的命令,最为可能的原因是调用应用程序传递了无效的命令。 (0x887A0006) ``` Reproduced every time (release and diagnostics builds alike), always at the same phase, always on the same 31–32 list submission on the GPU. **It is not the GPU hanging:** with `VICTORY_D3D12_WARP=1` (diagnostics build, confirmed by `host device on the software adapter (WARP)`) the UI still runs at 26 fps, and the world load fails the same way — this time `0x887A0005 DEVICE_PAUSED` after a submission of **1** list, with every collected stack frame inside the software rasteriser: ``` ERROR victory_gpu::host: host GPU device removed after a submission of 1 lists; no breadcrumbs (0x887A0004 …); device removed: GPU 设备实例已经暂停。… (0x887A0005) #5 d3d10warp.dll+0x2fa218 #7 d3d10warp.dll+0xa4568 #6 d3d10warp.dll+0xa47a4 #8 ntdll.dll+0x75370 #10 KERNEL32.DLL+0x2e8d7 #11 ntdll.dll+0x8c53c ``` So a bad command list / descriptor / shader reaches the driver, rather than an NVIDIA-specific TDR. ## Shader conversion failures at the same time The same runs log 336–375 failed translations (release 336, diagnostics 375, both in compute shaders only), and the device dies right when a batch of compute + mesh pipelines is first submitted. Top reasons (normalised, RVA stripped): | count | reason | |---|---| | 88 | `a select on an untracked mask is not supported` | | 80 | `a lane mask holding lanes elsewhere read as data is not supported` | | 35 | `an address in an SGPR that is no root parameter is not supported` | | 31 | `a structured buffer of unknown stride is not supported` | | 27 | `a scalar memory read as data is not supported` | | 20 | `a descriptor read only as data is not supported` | | 17 | `an address not from a root parameter is not supported` | | 16 | `a descriptor neither loaded nor built is not supported` | | 15 | `a 64-bit image atomic is not supported` | | 8 | `an address from a phi is not supported` | | 6 | `a lane mask read as data is not supported` | | … | 14 more reasons, 1–4 each (`image_gather4_l`, `image_sample_d_cl`, `barycentrics read directly`, `LDS write of bytes or halves`, `packed input half`, …) | The first few, verbatim: ``` age="compute" hash=fc5e66f8f873d3bb error=converter shader.dxil v1: GFX10 code at 0x3e0: a hardware SGPR input is not supported age="compute" hash=0452fc2d2e2fc4c3 error=converter shader.dxil v1: GFX10 code at 0x1028: image_gather4_l is not supported age="compute" hash=17af15c4015cb4b6 error=converter shader.dxil v1: GFX10 code at 0x9c4: a structured buffer of unknown stride is not supported ``` ## Environment - Windows 11 Pro 10.0.26100 (build 26100), AMD Ryzen 9 9900X, 61.5 GB RAM - GPU: NVIDIA GeForce RTX 4070 Ti SUPER, driver 580.97, 16376 MiB - Rust 1.98.1 (`rust-toolchain.toml`), repo commit `d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989` (main, PR #129 merge) - Built both `cargo build --release -p victory` and `cargo build --profile diag -p victory --features diagnostics` - Game data: Xbox Series X package 1.0.2.1 (`MicrosoftGame.Config`, `gameos.xvd`, plaintext RPF9 — `.rpf` magic `39 46 50 52`), 109 files / 208 GB. `victory census` on the title: 587 imports = 88 HLE / 427 host / 72 from the shipped DLLs. ## Steps to reproduce ``` git clone --depth 1 https://github.com/Marvisak/VIctory.git cd VIctory rustup toolchain install 1.98.1 --profile minimal cargo build --release -p victory # victory.toml [paths] game_dir = '<package directory>' cache_dir = '<cache>' data_dir = '<data>' target\release\victory.exe run <game_scarlett_master.exe> --execute --console series-x ``` Then in game: account picker → `Enter`; each following page needs `Down` then `Enter` on the highlighted button (plain `Enter` alone does nothing on *Legal Notices* → *Next* and *Terms of Service* → *Confirm*). After confirming the Terms of Service the world load begins and the device is removed within a couple of seconds. WARP variant: `cargo build --profile diag -p victory --features diagnostics`, then `VICTORY_D3D12_WARP=1 target\diag\victory.exe run …` (the variable is only honoured by diagnostics builds, `crates/victory-gpu/src/host.rs:179`), then the same input sequence. ## Numbers from the runs | run | build | UI phase | world load | outcome | |---|---|---|---|---| | run1 | release | 30.0 fps, 33.3 ms, 21–55 draws | — | stopped at the account picker for a screenshot | | run2 | diagnostics + `VICTORY_KEYS` | 30.0 fps | — | used to walk the first-boot pages, stopped before the world | | run3 | diagnostics + `VICTORY_KEYS` | 30.0 fps | 1 fps, 1299 ms/frame, 3240 draws | device removed, 32 lists | | run4 | release | 30.0 fps | 1 fps, 1599.7 ms/frame, 2859 draws | device removed, 32 lists | | run7 | diagnostics + `VICTORY_D3D12_WARP=1` | 26 fps | — | device removed, 1 list, `d3d10warp` stacks | `host pipelines all made made=1239 loaded=21 started_early=18`, shader cache `hits=11 misses=851` before the world batch. ## Questions 1. Is this the known "world renders black" limitation, or a separate, harder failure (invalid command list) that you would want narrowed down? 2. Would `VICTORY_SKIP_PIPELINES` with the failing hashes narrow it — and which hashes should I bisect first, the compute ones that failed translation, or the mesh/pixel pairs in that 38-pipeline submission? 3. Is there a `VICTORY_CAPTURE` / `VICTORY_CAPTURE_FRAMES` frame number around the world load that would be useful to you (PIX/RenderDoc or the capture folder)? I can attach captures, the full logs (14k / 11k lines) and `VICTORY_D3D12_DRED=1` output on request. 4. Anything else you would like from this machine (I have the package and can rebuild in a minute)?
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:11:37 +00:00
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 07:33 UTC · original

Investigated the top two failure causes in the shader conversion failure table:

  1. \ select on an untracked mask is not supported\ (88 shaders)
  2. \ lane mask holding lanes elsewhere read as data is not supported\ (80 shaders)

Root Causes

  1. **Omission of other masks from \Structured**: In \crates/victory-shader/src/structure.rs, \Structured\ dropped \self.other\ masks and highs, so opaque and constant masks produced by \mask(k)\ were discarded from \Structured.masks. Additionally, \self.active\ only recorded \phi.reg == Reg::S(EXEC), failing to mark lane-mask phis as active even when all incoming edges were active.
  2. **Missing fallback for untracked SGPRs and constants in \ _cndmask_b32\ and carry-in _co_ci_u32**: In \crates/victory-shader/src/emit/lower.rs, only tracked masks in \st.masks\ were handled. Untracked scalar registers, constant masks (0, -1, 1), and literals immediately aborted translation with \ select on an untracked mask\ or \ carry-in from an untracked mask.
  3. Artificial compute gate on opaque/constant lane masks: \Atom::Opaque\ and \Atom::Constant\ lowering was restricted to \if self.console_lanes\ (only set for compute stages), preventing graphics, pixel, and mesh shaders from lowering lane-bit tests via \waveGetLaneIndex.

Fix & Verification

Implemented and verified on Windows 11 MSVC:

  • Chained \self.other\ into \Structured.masks\ and \Structured.highs\ and propagated \self.active\ through phis whose predecessors are active.
  • Handled untracked SGPRs via \self.get(m)\ (\Val::Bit\ or \self.lane_bit(c, lo, hi)), constant masks, and literals in \ _cndmask_b32\ and _co_ci_u32.
  • Removed \console_lanes\ gate so \Atom::Opaque\ and \Atom::Constant\ lower cleanly across all shader stages.
  • Added unit test \cndmask_and_carry_in_lower_with_untracked_and_constant_masks. All 70 unit tests in \ ictory-shader\ pass cleanly; \cargo xtask policy\ clean.
  • Branch pushed on fork: LAKSHYA-cmd-tech/VIctory@fix/shader-untracked-and-opaque-lane-masks.
**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 07:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7125116304) Investigated the top two failure causes in the shader conversion failure table: 1. \ select on an untracked mask is not supported\ (88 shaders) 2. \ lane mask holding lanes elsewhere read as data is not supported\ (80 shaders) ### Root Causes 1. **Omission of other masks from \Structured\**: In \crates/victory-shader/src/structure.rs\, \Structured\ dropped \self.other\ masks and highs, so opaque and constant masks produced by \mask(k)\ were discarded from \Structured.masks\. Additionally, \self.active\ only recorded \phi.reg == Reg::S(EXEC)\, failing to mark lane-mask phis as active even when all incoming edges were active. 2. **Missing fallback for untracked SGPRs and constants in \ _cndmask_b32\ and carry-in \_co_ci_u32\**: In \crates/victory-shader/src/emit/lower.rs\, only tracked masks in \st.masks\ were handled. Untracked scalar registers, constant masks (0, -1, 1), and literals immediately aborted translation with \ select on an untracked mask\ or \ carry-in from an untracked mask\. 3. **Artificial compute gate on opaque/constant lane masks**: \Atom::Opaque\ and \Atom::Constant\ lowering was restricted to \if self.console_lanes\ (only set for compute stages), preventing graphics, pixel, and mesh shaders from lowering lane-bit tests via \waveGetLaneIndex\. ### Fix & Verification Implemented and verified on Windows 11 MSVC: - Chained \self.other\ into \Structured.masks\ and \Structured.highs\ and propagated \self.active\ through phis whose predecessors are active. - Handled untracked SGPRs via \self.get(m)\ (\Val::Bit\ or \self.lane_bit(c, lo, hi)\), constant masks, and literals in \ _cndmask_b32\ and \_co_ci_u32\. - Removed \console_lanes\ gate so \Atom::Opaque\ and \Atom::Constant\ lower cleanly across all shader stages. - Added unit test \cndmask_and_carry_in_lower_with_untracked_and_constant_masks\. All 70 unit tests in \ ictory-shader\ pass cleanly; \cargo xtask policy\ clean. - Branch pushed on fork: [LAKSHYA-cmd-tech/VIctory@fix/shader-untracked-and-opaque-lane-masks](https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/shader-untracked-and-opaque-lane-masks).
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 07:37 UTC · original

### Update: Resolved  structured buffer of unknown stride is not supported (31 shaders)

In crates/victory-shader/src/emit/lower.rs:2906, when an indexed MUBUF operation lacks a static descriptor stride (stride < 4 || !stride.is_multiple_of(4)), descriptor properties were already assigned to handle kind (11 | u, 0) (ByteAddressBuffer / RawBuffer). However, uffer_op subsequently aborted translation at lines 6025, 6108, and 6169 assuming a StructuredBuffer handle (kind 12) was mandatory.

Updated in commit 6e6924b on branch ix/shader-untracked-and-opaque-lane-masks:

  • When static stride is absent, uffer_op lowers indexed loads, stores, and atomics through RawBuffer (11 | u, 0) with DXIL byte addressing ((index * element_bytes) + offset) rather than aborting.
  • Eliminates 31 translation refusals across compute passes during world load.
**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 07:37 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7125197062) ### Update: Resolved  structured buffer of unknown stride is not supported (31 shaders) In crates/victory-shader/src/emit/lower.rs:2906, when an indexed MUBUF operation lacks a static descriptor stride (stride < 4 || !stride.is_multiple_of(4)), descriptor properties were already assigned to handle kind (11 | u, 0) (ByteAddressBuffer / RawBuffer). However, uffer_op subsequently aborted translation at lines 6025, 6108, and 6169 assuming a StructuredBuffer handle (kind 12) was mandatory. Updated in commit 6e6924b on branch ix/shader-untracked-and-opaque-lane-masks: - When static stride is absent, uffer_op lowers indexed loads, stores, and atomics through RawBuffer (11 | u, 0) with DXIL byte addressing ((index * element_bytes) + offset) rather than aborting. - Eliminates 31 translation refusals across compute passes during world load.
Author
Owner

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

Thanks @⁠LAKSHYA-cmd-tech - I applied your branch locally (fix/shader-untracked-and-opaque-lane-masks, f3c8f9c + 6e6924b) on top of d2a4bae and ran the real title from this machine (Xbox Series package 1.0.2.1, RTX 4070 Ti SUPER, driver 580.97), same package and same steps as the report.

Fixed, confirmed in the run log:

reason stock your branch
a select on an untracked mask 77 0
a structured buffer of unknown stride 28 0

The rest moves downstream instead of disappearing:

reason stock your branch
a lane mask holding lanes elsewhere read as data 62 347
a lane mask read as data 4 197
total error=converter lines in the run 336 683

Those shaders no longer abort at the first barrier, they abort at the next unsupported pattern, so the totals are not a regression.

The world load still fails the same way. Your branch ends with

host GPU device removed after a submission of 30 lists (0x887A0004 + 0x887A0006)

and exit code 0x887A0005 - the same device removal as stock (32 lists). So the two refusals are gone from the log, but the bad submission that removes the device is untouched.

I still think it is worth landing (about 105 shaders stop being dropped), but it does not move the blocker. Happy to re-run any follow-up branch here - it is a ~10 s incremental build and a ~2 min run to the crash.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 07:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7125390955) Thanks @⁠LAKSHYA-cmd-tech - I applied your branch locally (`fix/shader-untracked-and-opaque-lane-masks`, f3c8f9c + 6e6924b) on top of `d2a4bae` and ran the real title from this machine (Xbox Series package 1.0.2.1, RTX 4070 Ti SUPER, driver 580.97), same package and same steps as the report. **Fixed, confirmed in the run log:** | reason | stock | your branch | |---|---|---| | `a select on an untracked mask` | 77 | **0** | | `a structured buffer of unknown stride` | 28 | **0** | **The rest moves downstream instead of disappearing:** | reason | stock | your branch | |---|---|---| | `a lane mask holding lanes elsewhere read as data` | 62 | 347 | | `a lane mask read as data` | 4 | 197 | | total `error=converter` lines in the run | 336 | 683 | Those shaders no longer abort at the first barrier, they abort at the next unsupported pattern, so the totals are not a regression. **The world load still fails the same way.** Your branch ends with ``` host GPU device removed after a submission of 30 lists (0x887A0004 + 0x887A0006) ``` and exit code `0x887A0005` - the same device removal as stock (32 lists). So the two refusals are gone from the log, but the bad submission that removes the device is untouched. I still think it is worth landing (about 105 shaders stop being dropped), but it does not move the blocker. Happy to re-run any follow-up branch here - it is a ~10 s incremental build and a ~2 min run to the crash.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 08:31 UTC · original

Follow-up measurements from this machine on the dynamic-slot side, since #493's thread and #698 both point there. Short version: #493 + #483 is a large win here, and #688 on top of it makes things much worse.

Machine: Windows 11 26100, Ryzen 9 9900X, RTX 4070 Ti SUPER, driver 580.97, release and diagnostics builds, same package and same input sequence each run.

stack time from launch to device removed lists in the failing submission exit
d2a4bae (stock) ~40 s 32 0x887A0005
+ #336 + #493 ~270 s - 0x887A0005
+ #336 + #493 + #483 550 s 29 0x887A0005
+ #336 + #493 + #483 + #688 88 s 32 0x887A0005
+ #336 + #493 + #483 + #688 (rerun) 79 s 32 0x887A0005

The last two rows are near-identical (14,460 and 14,492 log lines), so it is not noise. In the 550 s run the world lives at 0.5-2 fps, throws slow host submission 69 times and drops 3,965 draws before dying; with #688 it dies in the first 90 s, after 5 slow submissions and one no free dynamic descriptor slots.

How #688 was merged here: the dynamic: Vec<(usize, u32, u32)> field became lease: Arc<Lease>, and the root-SRV one-view table added by #493 now takes its slot through self.take_dynamic(host, key, 1) instead of host.dynamic(1) + self.dynamic.push(...). Both builds compile and run, and the failure is the same 0x887A0006 device removal, only much earlier.

Hypothesis: lease::reclaim takes slots back from a list that "already ran", but at 1-2 fps the submission queue is tens of lists deep, so a reclaimed slot is rewritten while a list that has not finished on the GPU still references it - the stale descriptor then faults and removes the device. If that is right, reclaim probably wants to be gated on a completed fence value rather than on the list having been executed.

Happy to run any variant from this end: incremental build is ~10 s and a run to the crash is 2-9 minutes depending on the stack. If it is useful I can also re-test #688 alone (without #493/#483) to separate "reclaim is unsafe" from "reclaim conflicts with the one-view tables".

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 08:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7126232089) Follow-up measurements from this machine on the dynamic-slot side, since #493's thread and #698 both point there. Short version: **#493 + #483 is a large win here, and #688 on top of it makes things much worse.** Machine: Windows 11 26100, Ryzen 9 9900X, RTX 4070 Ti SUPER, driver 580.97, release and diagnostics builds, same package and same input sequence each run. | stack | time from launch to device removed | lists in the failing submission | exit | |---|---|---|---| | `d2a4bae` (stock) | ~40 s | 32 | `0x887A0005` | | + #336 + #493 | ~270 s | - | `0x887A0005` | | + #336 + #493 + #483 | **550 s** | 29 | `0x887A0005` | | + #336 + #493 + #483 + #688 | **88 s** | 32 | `0x887A0005` | | + #336 + #493 + #483 + #688 (rerun) | **79 s** | 32 | `0x887A0005` | The last two rows are near-identical (14,460 and 14,492 log lines), so it is not noise. In the 550 s run the world lives at 0.5-2 fps, throws `slow host submission` 69 times and drops 3,965 draws before dying; with #688 it dies in the first 90 s, after 5 slow submissions and one `no free dynamic descriptor slots`. How #688 was merged here: the `dynamic: Vec<(usize, u32, u32)>` field became `lease: Arc<Lease>`, and the root-SRV one-view table added by #493 now takes its slot through `self.take_dynamic(host, key, 1)` instead of `host.dynamic(1)` + `self.dynamic.push(...)`. Both builds compile and run, and the failure is the same `0x887A0006` device removal, only much earlier. **Hypothesis:** `lease::reclaim` takes slots back from a list that "already ran", but at 1-2 fps the submission queue is tens of lists deep, so a reclaimed slot is rewritten while a list that has not finished on the GPU still references it - the stale descriptor then faults and removes the device. If that is right, reclaim probably wants to be gated on a completed fence value rather than on the list having been executed. Happy to run any variant from this end: incremental build is ~10 s and a run to the crash is 2-9 minutes depending on the stack. If it is useful I can also re-test #688 alone (without #493/#483) to separate "reclaim is unsafe" from "reclaim conflicts with the one-view tables".
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 08:48 UTC · original

Breakthrough: Resolving "a lane mask holding lanes elsewhere read as data" (347 shaders) and "a lane mask read as data" (197 shaders)

Following @⁠chenzhehao1129-eng's real title test run which revealed the downstream failures after unblocking untracked selects:

  1. a lane mask holding lanes elsewhere read as data: 347 shaders
  2. a lane mask read as data: 197 shaders

Root Causes Identified

  1. Immediate failure on non-active ballots in mask_dword: In crates/victory-shader/src/emit/lower.rs:1181, mask_dword unconditionally aborted with "a lane mask holding lanes elsewhere read as data" if !self.x.st.active.contains(&lo). This triggered whenever:
    • The mask was a constant (Atom::Constant) or boolean constant (Bool::TRUE / Bool::FALSE) where taking a ballot is unnecessary (its dword is the constant value itself).
    • The mask was defined in a branch or join where active was not tracked, even though waveActiveBallot(bit) is valid to evaluate on the host.
  2. Artificial stage limitation on Atom::Opaque and Atom::Constant: In atom(), lowering of opaque and constant masks via waveGetLaneIndex was gated on if self.console_lanes (only true for compute), returning Err("an opaque lane mask") in Pixel, Vertex, and Mesh shaders.
  3. Restrictive self.mask_ok gate in inst(): Reading a lane mask as a scalar operand was restricted to only four intrinsic categories in MaskData::Host and completely disabled (false) for MaskData::None (Mesh shaders), aborting common scalar operations like s_mov_b32, s_and_b32, s_or_b32, and s_bitcmp on masks with Err("a lane mask read as data").

Solution

  • mask_dword constant resolution & safe ballot fallback: Directly returns 0 for Bool::FALSE, u32::MAX for Bool::TRUE, and k as u32 for Atom::Constant(k). For general masks, waveActiveBallot(bit) is emitted safely at self.def_block (falling back to self.cur), protected against cyclic recursion via self.balloting.
  • Lifted stage gates: Enabled Atom::Opaque and Atom::Constant lowering across all pipeline stages.
  • Expanded self.mask_ok: Allows scalar moves, bitwise operations, and bitcmp tests across MaskData::Host and MaskData::None.
  • Added unit test lane_mask_reads_as_data_lowers in emit::lower::tests.

Verified on Windows 11 MSVC: all 90 tests in victory-shader passed (test result: ok. 89 passed; 0 failed; 1 ignored), clippy clean, policy check ok (152 files).

Branch ready for testing:
https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/shader-lane-mask-ballots-and-data-reads

**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 08:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7126593469) ### Breakthrough: Resolving "a lane mask holding lanes elsewhere read as data" (347 shaders) and "a lane mask read as data" (197 shaders) Following @⁠chenzhehao1129-eng's real title test run which revealed the downstream failures after unblocking untracked selects: 1. `a lane mask holding lanes elsewhere read as data`: 347 shaders 2. `a lane mask read as data`: 197 shaders ### Root Causes Identified 1. **Immediate failure on non-active ballots in `mask_dword`**: In `crates/victory-shader/src/emit/lower.rs:1181`, `mask_dword` unconditionally aborted with `"a lane mask holding lanes elsewhere read as data"` if `!self.x.st.active.contains(&lo)`. This triggered whenever: - The mask was a constant (`Atom::Constant`) or boolean constant (`Bool::TRUE` / `Bool::FALSE`) where taking a ballot is unnecessary (its dword is the constant value itself). - The mask was defined in a branch or join where `active` was not tracked, even though `waveActiveBallot(bit)` is valid to evaluate on the host. 2. **Artificial stage limitation on `Atom::Opaque` and `Atom::Constant`**: In `atom()`, lowering of opaque and constant masks via `waveGetLaneIndex` was gated on `if self.console_lanes` (only true for compute), returning `Err("an opaque lane mask")` in Pixel, Vertex, and Mesh shaders. 3. **Restrictive `self.mask_ok` gate in `inst()`**: Reading a lane mask as a scalar operand was restricted to only four intrinsic categories in `MaskData::Host` and completely disabled (`false`) for `MaskData::None` (Mesh shaders), aborting common scalar operations like `s_mov_b32`, `s_and_b32`, `s_or_b32`, and `s_bitcmp` on masks with `Err("a lane mask read as data")`. ### Solution - **`mask_dword` constant resolution & safe ballot fallback**: Directly returns 0 for `Bool::FALSE`, `u32::MAX` for `Bool::TRUE`, and `k as u32` for `Atom::Constant(k)`. For general masks, `waveActiveBallot(bit)` is emitted safely at `self.def_block` (falling back to `self.cur`), protected against cyclic recursion via `self.balloting`. - **Lifted stage gates**: Enabled `Atom::Opaque` and `Atom::Constant` lowering across all pipeline stages. - **Expanded `self.mask_ok`**: Allows scalar moves, bitwise operations, and bitcmp tests across `MaskData::Host` and `MaskData::None`. - Added unit test `lane_mask_reads_as_data_lowers` in `emit::lower::tests`. Verified on Windows 11 MSVC: all 90 tests in `victory-shader` passed (`test result: ok. 89 passed; 0 failed; 1 ignored`), clippy clean, policy check ok (152 files). Branch ready for testing: https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/shader-lane-mask-ballots-and-data-reads
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 09:05 UTC · original

Two things from this machine: the lane-mask branch, and the descriptor heap number from #735.

1. fix/shader-lane-mask-ballots-and-data-reads (latest tip 49d6d98)

Tested standalone (git clone --branch fix/shader-lane-mask-ballots-and-data-reads into a separate tree, its own data_dir, diagnostics build, same input sequence). It cannot be stacked on main + #336 + #493 + #483 as-is: its crates/victory-shader/src/emit/host.rs has neither null_guard nor guard_slot, i.e. it predates #483's guard-slot support, so dropping its shader crate onto our tree removes the guard initialisation. I tried that first and it died at 102 s (vs 550 s baseline), which is a bad merge, not your patch.

Standalone results, world load, same title build:

failure reason (converter) main + #336 + #493 + #483 this branch
a lane mask holding lanes elsewhere read as data 106 0
a lane mask read as data 24 0
a select on an untracked mask 102 81
a descriptor read only as data 33 128
a structured buffer of unknown stride 29 59
total 522 434
device removed 550 s, 29 lists ~30 s after world, 33 lists

So the two lane-mask classes are genuinely gone - nice. But the branch does not carry the earlier untracked-select / unknown-stride work (both still present), and on its own base the device is still removed immediately, exit 0x887A0005. To keep all four classes at zero, the lane-mask change needs to be rebased onto current main + #483 rather than living on its own branch.

2. For #735: we see the same oversized heap, with the exact count

Our title asks for a 1,245,184-slot shader-visible view heap; the host cap is 1,000,000 (PORTABLE_VIEWS), so descriptor/host.rs logs:

WARN victory_gpu::descriptor::host: host view heap capped at 1000000 error=... count=1245184

With DYNAMIC = 1 << 18 and MIN_DYNAMIC = 1 << 16, the capped branch keeps 1000000 - (65536 + 1) = 934463 title slots, so ~310k of the title's own slots do not exist on the host and are aliased. That is consistent with #735's 1,310,720 and with the 550 s / 29-list removal we still see: the root-SRV one-view tables from #493 bound to their host copy help a lot, but the title's own heap indexing past the host cap is still unmapped.

Happy to instrument which slot index the title actually writes past count (and whether the failing submission is a draw reading such a slot) if that is useful.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 09:05 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7126952269) Two things from this machine: the lane-mask branch, and the descriptor heap number from #735. ## 1. `fix/shader-lane-mask-ballots-and-data-reads` (latest tip 49d6d98) Tested standalone (`git clone --branch fix/shader-lane-mask-ballots-and-data-reads` into a separate tree, its own `data_dir`, diagnostics build, same input sequence). It cannot be stacked on `main + #336 + #493 + #483` as-is: its `crates/victory-shader/src/emit/host.rs` has neither `null_guard` nor `guard_slot`, i.e. it predates #483's guard-slot support, so dropping its shader crate onto our tree removes the guard initialisation. I tried that first and it died at **102 s** (vs 550 s baseline), which is a bad merge, not your patch. Standalone results, world load, same title build: | failure reason (converter) | `main + #336 + #493 + #483` | this branch | |---|---|---| | a lane mask holding lanes elsewhere read as data | 106 | **0** | | a lane mask read as data | 24 | **0** | | a select on an untracked mask | 102 | 81 | | a descriptor read only as data | 33 | 128 | | a structured buffer of unknown stride | 29 | 59 | | total | 522 | 434 | | device removed | 550 s, 29 lists | ~30 s after world, 33 lists | So the two lane-mask classes are genuinely gone - nice. But the branch does not carry the earlier untracked-select / unknown-stride work (both still present), and on its own base the device is still removed immediately, exit `0x887A0005`. To keep all four classes at zero, the lane-mask change needs to be rebased onto current `main + #483` rather than living on its own branch. ## 2. For #735: we see the same oversized heap, with the exact count Our title asks for a **1,245,184**-slot shader-visible view heap; the host cap is 1,000,000 (`PORTABLE_VIEWS`), so `descriptor/host.rs` logs: ``` WARN victory_gpu::descriptor::host: host view heap capped at 1000000 error=... count=1245184 ``` With `DYNAMIC = 1 << 18` and `MIN_DYNAMIC = 1 << 16`, the capped branch keeps `1000000 - (65536 + 1) = 934463` title slots, so ~310k of the title's own slots do not exist on the host and are aliased. That is consistent with #735's 1,310,720 and with the 550 s / 29-list removal we still see: the root-SRV one-view tables from #493 bound to their host copy help a lot, but the title's own heap indexing past the host cap is still unmapped. Happy to instrument which slot index the title actually writes past `count` (and whether the failing submission is a draw reading such a slot) if that is useful.
Author
Owner

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

@⁠chenzhehao1129-eng, one detail from the existing 88-second log would help interpret your #688 comparison. Does it contain the warning lists submitted again after their dynamic descriptor slots were taken back are not run? A yes/no is enough if the log includes warnings from startup.

On #688’s synchronous submission path, a successful host fence wait precedes marking a list finished. Taking slots back and later skipping a second submission of that list are separate events. In a source-built test on an RTX 4090 under Wine/vkd3d, executing the same closed list twice wrote its completion marker both times while it retained its slots. Reclaiming its slots between submissions left the second marker unwritten. The warning would tell us whether that skip happened at least once in your run. The elapsed-time difference alone cannot identify its cause.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 09:23 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7127352940) @⁠chenzhehao1129-eng, one detail from the **existing 88-second log** would help interpret your #688 comparison. Does it contain the warning `lists submitted again after their dynamic descriptor slots were taken back are not run`? A yes/no is enough if the log includes warnings from startup. On #688’s synchronous submission path, a successful host fence wait precedes marking a list finished. Taking slots back and later skipping a second submission of that list are separate events. In a source-built test on an RTX 4090 under Wine/vkd3d, executing the same closed list twice wrote its completion marker both times while it retained its slots. Reclaiming its slots between submissions left the second marker unwritten. The warning would tell us whether that skip happened at least once in your run. The elapsed-time difference alone cannot identify its cause.
Author
Owner

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

I reproduced WARP device removal on Windows 11 build 26300 with VIctory 58fed37. With diagnostics, WARP, DRED, the debug layer and per-list GPU timing enabled, the runtime returned 0x887A0005. The DRED breadcrumb array was empty.

There is a reporting issue in the timed path. It waits on each logical list separately, but checks device removal after the entire submission loop. That can include command notes from lists submitted after the device was already lost. I tested a small change that checks after each timed group and uses the existing failure reporter immediately. The captured message was “host GPU device removal detected after timed list 1 of 26”. There were no recorded command notes for that first list. This identifies the detection boundary; individual commands remain unresolved.

The patch applies to 58fed37 independently of the title data and our other experiments. The victory-gpu diagnostics tests passed and the crate compiled with diagnostics disabled. This change improves crash attribution. It does not fix device removal.

**@⁠alladeen321123** on GitHub · 2026-11-24 09:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7127544696) I reproduced WARP device removal on Windows 11 build 26300 with VIctory 58fed37. With diagnostics, WARP, DRED, the debug layer and per-list GPU timing enabled, the runtime returned 0x887A0005. The DRED breadcrumb array was empty. There is a reporting issue in the timed path. It waits on each logical list separately, but checks device removal after the entire submission loop. That can include command notes from lists submitted after the device was already lost. I tested a small change that checks after each timed group and uses the existing failure reporter immediately. The captured message was “host GPU device removal detected after timed list 1 of 26”. There were no recorded command notes for that first list. This identifies the detection boundary; individual commands remain unresolved. The patch applies to 58fed37 independently of the title data and our other experiments. The victory-gpu diagnostics tests passed and the crate compiled with diagnostics disabled. This change improves crash attribution. It does not fix device removal.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 09:32 UTC · original

No. The exact line lists submitted again after their dynamic descriptor slots were taken back are not run does not appear in either of the 88-second runs (or anywhere in those logs, which start at process start and include every warning).

What does appear, exactly once per run, is the sibling I added no instrumentation for:

run11  08:24:15.997912Z  WARN victory_gpu::draw: dynamic descriptor slots of lists that already ran are taken back
run12  08:26:00.933906Z  WARN victory_gpu::draw: dynamic descriptor slots of lists that already ran are taken back

Immediately before each one, a single a draw or dispatch dropped: no dynamic slots for its tables dropped=64 and exactly one no free dynamic descriptor slots for the whole run. Then:

run reclaim warning device removal delta lists
run11 08:24:15.9979 08:24:41.3278 25.3 s 32
run12 08:26:00.9339 08:26:24.2200 23.3 s 32

So in these logs the removal follows the reclaim event itself by ~23-25 s, and the "reclaimed list submitted again" path was never taken - at least it never logged. If you want that distinguished properly, I can re-add #688 on top of main + #336 + #493 + #483 (that is what run11/run12 were), add a log line at the guard where skipped is decided plus the fence value at the moment of reclaim, and run it a few times; incremental build is ~10 s and a run to removal is ~80 s.

For context on the numbers: the 88 s runs are #688 on top of #336 + #493 + #483. Without #688 the same stack runs 65-76 s on repeated attempts in this session (one earlier run of the same stack lasted 550 s, which I cannot reproduce since, so I am not treating it as a baseline).

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 09:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7127561871) No. The exact line `lists submitted again after their dynamic descriptor slots were taken back are not run` does not appear in either of the 88-second runs (or anywhere in those logs, which start at process start and include every warning). What does appear, exactly once per run, is the sibling I added no instrumentation for: ``` run11 08:24:15.997912Z WARN victory_gpu::draw: dynamic descriptor slots of lists that already ran are taken back run12 08:26:00.933906Z WARN victory_gpu::draw: dynamic descriptor slots of lists that already ran are taken back ``` Immediately before each one, a single `a draw or dispatch dropped: no dynamic slots for its tables dropped=64` and exactly one `no free dynamic descriptor slots` for the whole run. Then: | run | reclaim warning | device removal | delta | lists | |---|---|---|---|---| | run11 | 08:24:15.9979 | 08:24:41.3278 | 25.3 s | 32 | | run12 | 08:26:00.9339 | 08:26:24.2200 | 23.3 s | 32 | So in these logs the removal follows the reclaim event itself by ~23-25 s, and the "reclaimed list submitted again" path was never taken - at least it never logged. If you want that distinguished properly, I can re-add #688 on top of `main + #336 + #493 + #483` (that is what run11/run12 were), add a log line at the guard where `skipped` is decided plus the fence value at the moment of reclaim, and run it a few times; incremental build is ~10 s and a run to removal is ~80 s. For context on the numbers: the 88 s runs are #688 on top of #336 + #493 + #483. Without #688 the same stack runs 65-76 s on repeated attempts in this session (one earlier run of the same stack lasted 550 s, which I cannot reproduce since, so I am not treating it as a baseline).
Author
Owner

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

A WARP data point from an earlier stage: here WARP removes the device in the menus, before any world load.

Setup: Windows 11 Pro 26300 (in-box D3D12, Graphics Tools installed), Ryzen 7 7800X3D, 64 GB RAM. main dd54de2 plus a local diagnostics-only patch that names host textures. Diag build, VICTORY_D3D12_WARP=1 (log: host device on the software adapter (WARP)), VICTORY_D3D12_DRED=1, title 1.0.2.1, Series X mode. Enter pressed every 4 s from 36 s on, process at below-normal priority.

What happened: boot and first screens ran at about 2 fps on WARP (430 to 570 ms/frame, nearly all of it "on the GPU", 10 to 12 draws/frame). About 2 min 40 s after the host device was made, still in the menus:

host GPU device removed after a submission of 1 lists; breadcrumbs (done/count, list) [];
list 0 of 1, of its 45: dispatch 3x1x1 [compute 44bb2d65d51ba5d1] | 44bb2d65d51ba5d1: u4=0xa67100 [heap 340872: null] u5=0x3f948b10 u8=0x9 [heap 9: Unordered(0, 0, Some([42, 1, 0, ...]))] ...
device removed: The GPU device instance has been suspended. (0x887A0005)

No access violation in d3d10warp.dll was logged (unlike #338). The same build and data get through these menus at 30 fps on the real GPU (RX 9070 XT), so this looks WARP-specific. Its removal reason is the same 0x887A0005 this issue reports at world load, so WARP may not get far enough here to stand in for the real GPU when chasing world faults like #557.

AI-assisted (Claude Code). Logs are VIctory's own output, with no game data.

**@⁠h0useadv** on GitHub · 2026-11-24 10:07 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7128341084) A WARP data point from an earlier stage: here WARP removes the device **in the menus**, before any world load. **Setup:** Windows 11 Pro 26300 (in-box D3D12, Graphics Tools installed), Ryzen 7 7800X3D, 64 GB RAM. `main` `dd54de2` plus a local diagnostics-only patch that names host textures. Diag build, `VICTORY_D3D12_WARP=1` (log: `host device on the software adapter (WARP)`), `VICTORY_D3D12_DRED=1`, title 1.0.2.1, Series X mode. Enter pressed every 4 s from 36 s on, process at below-normal priority. **What happened:** boot and first screens ran at about 2 fps on WARP (430 to 570 ms/frame, nearly all of it "on the GPU", 10 to 12 draws/frame). About 2 min 40 s after the host device was made, still in the menus: ``` host GPU device removed after a submission of 1 lists; breadcrumbs (done/count, list) []; list 0 of 1, of its 45: dispatch 3x1x1 [compute 44bb2d65d51ba5d1] | 44bb2d65d51ba5d1: u4=0xa67100 [heap 340872: null] u5=0x3f948b10 u8=0x9 [heap 9: Unordered(0, 0, Some([42, 1, 0, ...]))] ... device removed: The GPU device instance has been suspended. (0x887A0005) ``` No access violation in `d3d10warp.dll` was logged (unlike #338). The same build and data get through these menus at 30 fps on the real GPU (RX 9070 XT), so this looks WARP-specific. Its removal reason is the same `0x887A0005` this issue reports at world load, so WARP may not get far enough here to stand in for the real GPU when chasing world faults like #557. AI-assisted (Claude Code). Logs are VIctory's own output, with no game data.
Author
Owner

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

3090 / 24 GB result for this branch (49d6d98, standalone, its own tree and cache), to go with @⁠chenzhehao1129-eng's 4070 Ti SUPER numbers.

Machine: Windows 11 Pro 26200, Ryzen 7 5800X3D, 64 GB, RTX 3090 24 GB, driver 32.0.16.1088 (610.88). Diagnostics build, VICTORY_D3D12_DRED=1, no debug layer, title 1.0.2.1 b99f876b.... Same input sequence as always. (One local-only patch in my tree: the host device is created on an adapter picked by name, because D3D12CreateDevice(None) takes the display adapter here, a 2070 SUPER. Nothing else is patched.)

Untranslated reasons, mine on main 8e79c80 then this branch:

reason main this branch
a select on an untracked mask 91 101
a lane mask holding lanes elsewhere read as data 77 0
a lane mask read as data 9 8
a descriptor read only as data 58 117
a structured buffer of unknown stride 46 57
an address in an SGPR that is no root parameter 35 35
a scalar memory read as data 25 29
total 428 442

So the "holding lanes elsewhere" class is gone here too, "lane mask read as data" is nearly gone, and the untracked-select / unknown-stride / descriptor-as-data classes move up exactly as you saw - consistent with the branch not carrying that work.

The device is still removed. 188 s on main, 203 s on this branch, this time after slow host submission ms=8956 lists=22 whose pipelines are mostly mesh+pixel pairs (mesh 016f74d66ac8fed1 / pixel f6e0e56b68d8677b, mesh 0750cb2d975c7563 / pixel 085d374c5a795549, mesh 090efc0cef5eb988 / pixel 823fea5847ec6d4d, ...) with one compute 9146291b38ea9ce1. 119 compute pipelines refused, all 0x80070057. Frames stayed at 0.6-1.1 fps (915-1767 ms/frame).

Also still present: host view heap capped at 1000000 ... count=1245184, and the two 2560x1440 no host texture targets (formats 86 and 115).

Breadcrumb on the fatal list, in case it is useful: u8=0xa01900 [heap 327880: null] u9=0x12e78a0 [heap 619461: null] u10=0x12e7720 [heap 619449: null], i.e. descriptor indices again resolving as null, this time in a 619,461-entry heap rather than the 340,872 one I saw on main. So on 24 GB the world load still ends in the same place: descriptors past the host heap, not memory pressure.

**@⁠MD5Visual** on GitHub · 2026-11-24 10:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7128400967) 3090 / 24 GB result for this branch (`49d6d98`, standalone, its own tree and cache), to go with @⁠chenzhehao1129-eng's 4070 Ti SUPER numbers. Machine: Windows 11 Pro 26200, Ryzen 7 5800X3D, 64 GB, RTX 3090 24 GB, driver 32.0.16.1088 (610.88). Diagnostics build, `VICTORY_D3D12_DRED=1`, no debug layer, title 1.0.2.1 `b99f876b...`. Same input sequence as always. (One local-only patch in my tree: the host device is created on an adapter picked by name, because `D3D12CreateDevice(None)` takes the display adapter here, a 2070 SUPER. Nothing else is patched.) Untranslated reasons, mine on `main 8e79c80` then this branch: | reason | main | this branch | |---|---|---| | a select on an untracked mask | 91 | 101 | | a lane mask holding lanes elsewhere read as data | 77 | **0** | | a lane mask read as data | 9 | 8 | | a descriptor read only as data | 58 | 117 | | a structured buffer of unknown stride | 46 | 57 | | an address in an SGPR that is no root parameter | 35 | 35 | | a scalar memory read as data | 25 | 29 | | total | 428 | 442 | So the "holding lanes elsewhere" class is gone here too, "lane mask read as data" is nearly gone, and the untracked-select / unknown-stride / descriptor-as-data classes move up exactly as you saw - consistent with the branch not carrying that work. The device is still removed. 188 s on main, **203 s on this branch**, this time after `slow host submission ms=8956 lists=22` whose pipelines are mostly mesh+pixel pairs (`mesh 016f74d66ac8fed1` / `pixel f6e0e56b68d8677b`, `mesh 0750cb2d975c7563` / `pixel 085d374c5a795549`, `mesh 090efc0cef5eb988` / `pixel 823fea5847ec6d4d`, ...) with one compute `9146291b38ea9ce1`. 119 compute pipelines refused, all `0x80070057`. Frames stayed at 0.6-1.1 fps (915-1767 ms/frame). Also still present: `host view heap capped at 1000000 ... count=1245184`, and the two 2560x1440 `no host texture` targets (formats 86 and 115). Breadcrumb on the fatal list, in case it is useful: `u8=0xa01900 [heap 327880: null] u9=0x12e78a0 [heap 619461: null] u10=0x12e7720 [heap 619449: null]`, i.e. descriptor indices again resolving as null, this time in a **619,461**-entry heap rather than the 340,872 one I saw on main. So on 24 GB the world load still ends in the same place: descriptors past the host heap, not memory pressure.
Author
Owner

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

Follow-up to my comment above. With the debug layer on (VICTORY_D3D12_DEBUG=1, WARP, same build), the reason WARP can't get through the menus here is plain:

D3D12: ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 4.

That message appears 487 times in about 2.5 minutes of menus, once per compute pipeline whose translated shader declares wave size 64. WARP's maximum is 4 lanes. The device was then removed again with 0x887A0005 ("suspended") in a compute dispatch (41x1x1 [compute 269b802f878c24e1]), with no other validation error before it.

So on this setup WARP can't stand in for a real GPU for this title: every compute program translated with a 64-lane wave is refused. Translated compute that needs 64-lane waves would need a wave-size fallback (an emulation path for WaveLaneCountMax < 64) before WARP is useful past the first screens. That probably also explains the WARP half of this issue. I haven't checked whether the world-load removals people report on WARP come from the same refusals.

AI-assisted (Claude Code). Logs are VIctory's own output, with no game data.

**@⁠h0useadv** on GitHub · 2026-11-24 10:12 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7128459878) Follow-up to my comment above. With the debug layer on (`VICTORY_D3D12_DEBUG=1`, WARP, same build), the reason WARP can't get through the menus here is plain: ``` D3D12: ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 4. ``` That message appears 487 times in about 2.5 minutes of menus, once per compute pipeline whose translated shader declares wave size 64. WARP's maximum is 4 lanes. The device was then removed again with `0x887A0005` ("suspended") in a compute dispatch (`41x1x1 [compute 269b802f878c24e1]`), with no other validation error before it. So on this setup WARP can't stand in for a real GPU for this title: every compute program translated with a 64-lane wave is refused. Translated compute that needs 64-lane waves would need a wave-size fallback (an emulation path for `WaveLaneCountMax < 64`) before WARP is useful past the first screens. That probably also explains the WARP half of this issue. I haven't checked whether the world-load removals people report on WARP come from the same refusals. AI-assisted (Claude Code). Logs are VIctory's own output, with no game data.
Author
Owner

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

RTX 4090 data point, with the debug layer and DRED on a real GPU: the removal here is a GPU hang (TDR) in an indirect mesh dispatch, not an invalid command.

Machine: Windows 11 Pro 23H2 (22631), RTX 4090 24 GB (driver 32.0.16.1088), i7-13700K, 32 GB. main 8e79c80, diagnostics build (--profile diag --features diagnostics), title 1.0.2.1, Series X mode, an existing save (loads straight into the world, about 3 min to the failure).

Release build, plain main: host device removed 0x887A0006 after a submission of 30 lists, "no breadcrumbs". (Same with #32 merged on top: 28 lists, so not caused by that PR.)

Diagnostics, VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1:

  • The debug layer reported no validation error before the removal. Its only message is the removal itself: DXGI_ERROR_DEVICE_HUNG ... the TDR mechanism has been triggered. The current Device Context was executing commands when the hang occurred.
  • DRED breadcrumbs: 417 lists, all complete except two:
    • 12/24: list 6 of the 27-list submission stopped at command 12 of 24, op 42. Every command 2..22 in it is op 42, an indirect execution, kind 10 (mesh dispatch), max 1, e.g. indirect kind 10 max 1 at 0x2f518414 [mesh d62bc405f614313a, pixel 7e0ecc6032631709]. Its neighbours are the same kind with [mesh f9c79a2d484bd75a, pixel a144abbc586fa5b2].
    • 0/1 (op 18): a later list that had not started.
  • The bindings of that dispatch: u8 points at a null heap slot (heap 338092: null). There is a raw SRV of 182,452,224 elements (s0+56 at 0x287f0000). The pixel shader writes two UAVs, 2048x2048 format 28 and 64x64 format 61.
  • The failing submission took 4853 ms, and GPU_TIMING listed its mesh commands as fast (0.0 ms) up to the hang. So one dispatch never finishes, rather than the frame being slow overall.

My reading (a guess): the mesh shader d62bc405f614313a (or its pixel shader) loops without end on this GPU. That could come from the null u8 descriptor or from indirect arguments larger than the clamp allows. A translated wave-size assumption on NVIDIA's 32-lane waves is another candidate. Happy to run a build that logs the indirect arguments of these dispatches, or one that skips this pipeline, if that helps.

A first run with debug layer + DRED only (no GPU_TIMING) ended differently, ~2.5 min in. The title hit an access violation in its own code: victory-image-...dll+0x2215c35, write to 0x0, no GPU failure. This may be a timing side effect of the debug layer. Mentioning it in case it is known.

Logs (no game data) available on request. AI-assisted (Claude Code).

**@⁠sash2kk** on GitHub · 2026-11-24 11:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7129945862) RTX 4090 data point, with the debug layer and DRED on a real GPU: the removal here is a **GPU hang (TDR) in an indirect mesh dispatch**, not an invalid command. Machine: Windows 11 Pro 23H2 (22631), RTX 4090 24 GB (driver 32.0.16.1088), i7-13700K, 32 GB. `main` `8e79c80`, diagnostics build (`--profile diag --features diagnostics`), title 1.0.2.1, Series X mode, an existing save (loads straight into the world, about 3 min to the failure). **Release build, plain `main`:** host device removed `0x887A0006` after a submission of 30 lists, "no breadcrumbs". (Same with #32 merged on top: 28 lists, so not caused by that PR.) **Diagnostics, `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1`:** - The debug layer reported **no validation error** before the removal. Its only message is the removal itself: `DXGI_ERROR_DEVICE_HUNG ... the TDR mechanism has been triggered. The current Device Context was executing commands when the hang occurred.` - DRED breadcrumbs: 417 lists, all complete except two: - `12/24`: list 6 of the 27-list submission stopped at **command 12 of 24, op 42**. Every command 2..22 in it is op 42, an **indirect execution, kind 10 (mesh dispatch), max 1**, e.g. `indirect kind 10 max 1 at 0x2f518414 [mesh d62bc405f614313a, pixel 7e0ecc6032631709]`. Its neighbours are the same kind with `[mesh f9c79a2d484bd75a, pixel a144abbc586fa5b2]`. - `0/1` (op 18): a later list that had not started. - The bindings of that dispatch: `u8` points at a **null** heap slot (`heap 338092: null`). There is a raw SRV of 182,452,224 elements (`s0+56` at `0x287f0000`). The pixel shader writes two UAVs, 2048x2048 format 28 and 64x64 format 61. - The failing submission took 4853 ms, and `GPU_TIMING` listed its mesh commands as fast (0.0 ms) up to the hang. So one dispatch never finishes, rather than the frame being slow overall. My reading (a guess): the mesh shader `d62bc405f614313a` (or its pixel shader) loops without end on this GPU. That could come from the null `u8` descriptor or from indirect arguments larger than the clamp allows. A translated wave-size assumption on NVIDIA's 32-lane waves is another candidate. Happy to run a build that logs the indirect arguments of these dispatches, or one that skips this pipeline, if that helps. A first run with debug layer + DRED only (no `GPU_TIMING`) ended differently, ~2.5 min in. The title hit an access violation in its own code: `victory-image-...dll+0x2215c35`, write to `0x0`, no GPU failure. This may be a timing side effect of the debug layer. Mentioning it in case it is known. Logs (no game data) available on request. AI-assisted (Claude Code).
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 11:41 UTC · original

A second GPU (RTX 4070 Ti SUPER) with DRED breadcrumbs, confirming @⁠sash2kk's shape: the hang is an indirect mesh dispatch, not an invalid command. And one correction to my earlier numbers.

Machine: Windows 11 Pro 10.0.26100 (build 26100), Ryzen 9 9900X, 61.5 GB, RTX 4070 Ti SUPER 16 GB, driver 580.97. Clean main d2a4bae, diagnostics build, VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1, no debug layer, title 1.0.2.1 b99f876b....

Removal after 57.1 s, on a submission of 7 lists, preceded by:

WARN victory_gpu::host: slow host submission ms=11553 lists=7 pipelines={"[compute 1f32b23...

The breadcrumb array of that submission is 119 entries; the intact ones all read N/N Some(i), and exactly two are not:

          "29/29 Some(0)"
           "2/2 Some(1)"
           "2/2 None"  (x several)
           "3/3 Some(3)"
        "558/2415 Some(4)"   <- the list that was executing
           "0/3 Some(5)"      <- never started

The hung command is list 4, command 558 of 2415:

list 4 of 7, of its 437: indirect kind 10 max 1 at 0xd49402dc0 [mesh 30332cf87c4e0eae]
  30332cf87c4e0eae: u9=0x20a5da0 u13=0x10045893 root3=0x737a6eb70
  tables ["... Srv s1+16: placed uav=false dim 1 10176x1 f0 layout 0x1 at 0x737aab1c0",
          "... Srv s1+32: placed uav=false dim 1 128x1 f0 layout 0x1 at 0x99a5c50",
          "... Cbv s1+40: Constant(0x99af710, 480) [0.93284446, -0.01180366, 0.3600858, 0.0]",
          "... Srv s3+0: Descriptor", "... Cbv s4+0: Constants"]

Unlike @⁠sash2kk's 4090 breadcrumb, no descriptor here resolves to null - u9/root3 are real addresses and the SRVs are placed views. Same op though: indirect kind 10, max 1, a mesh dispatch through an indirect arg buffer. Before the removal there are 5 victory_gpu::list: indirect execution dropped (first time for this signature) lines.

So on this machine: main stalls on one indirect mesh dispatch inside a 2415-command list and the device is removed ~11.5 s later, while every earlier mesh dispatch in the same submission had completed.

Correction to my earlier numbers

The 550 s figure I posted earlier (for main + #336 + #493 + #483) is not reproducible and should not be used as a baseline. After a machine reboot, same binary, same input sequence:

build survived
main + #336 + #493 + #483 (best config) 63.6 s
clean main 71.8 s
clean main + DRED/timing (this report) 57.1 s

Repeated attempts before the reboot gave 74.5 s and 64.8 s for the patched stack. So on this machine #493/#483 buys nothing measurable, and the world load fails in ~1 minute either way; the 550 s run was a one-off I cannot reproduce. Sorry for the noise - the lane-mask and #735 observations in my earlier comments are unaffected.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 11:41 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7130419693) A second GPU (RTX 4070 Ti SUPER) with DRED breadcrumbs, confirming @⁠sash2kk's shape: the hang is an **indirect mesh dispatch**, not an invalid command. And one correction to my earlier numbers. Machine: Windows 11 Pro 10.0.26100 (build 26100), Ryzen 9 9900X, 61.5 GB, RTX 4070 Ti SUPER 16 GB, driver 580.97. Clean `main` `d2a4bae`, diagnostics build, `VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1`, no debug layer, title 1.0.2.1 `b99f876b...`. Removal after 57.1 s, on a submission of **7 lists**, preceded by: ``` WARN victory_gpu::host: slow host submission ms=11553 lists=7 pipelines={"[compute 1f32b23... ``` The breadcrumb array of that submission is 119 entries; the intact ones all read `N/N Some(i)`, and exactly two are not: ``` "29/29 Some(0)" "2/2 Some(1)" "2/2 None" (x several) "3/3 Some(3)" "558/2415 Some(4)" <- the list that was executing "0/3 Some(5)" <- never started ``` The hung command is list 4, command 558 of 2415: ``` list 4 of 7, of its 437: indirect kind 10 max 1 at 0xd49402dc0 [mesh 30332cf87c4e0eae] 30332cf87c4e0eae: u9=0x20a5da0 u13=0x10045893 root3=0x737a6eb70 tables ["... Srv s1+16: placed uav=false dim 1 10176x1 f0 layout 0x1 at 0x737aab1c0", "... Srv s1+32: placed uav=false dim 1 128x1 f0 layout 0x1 at 0x99a5c50", "... Cbv s1+40: Constant(0x99af710, 480) [0.93284446, -0.01180366, 0.3600858, 0.0]", "... Srv s3+0: Descriptor", "... Cbv s4+0: Constants"] ``` Unlike @⁠sash2kk's 4090 breadcrumb, **no descriptor here resolves to null** - `u9`/`root3` are real addresses and the SRVs are placed views. Same op though: `indirect kind 10, max 1`, a mesh dispatch through an indirect arg buffer. Before the removal there are 5 `victory_gpu::list: indirect execution dropped (first time for this signature)` lines. So on this machine: main stalls on one indirect mesh dispatch inside a 2415-command list and the device is removed ~11.5 s later, while every earlier mesh dispatch in the same submission had completed. ## Correction to my earlier numbers The `550 s` figure I posted earlier (for `main + #336 + #493 + #483`) is not reproducible and should not be used as a baseline. After a machine reboot, same binary, same input sequence: | build | survived | |---|---| | `main + #336 + #493 + #483` (best config) | 63.6 s | | clean `main` | 71.8 s | | clean `main` + DRED/timing (this report) | 57.1 s | Repeated attempts before the reboot gave 74.5 s and 64.8 s for the patched stack. So on this machine #493/#483 buys nothing measurable, and the world load fails in ~1 minute either way; the `550 s` run was a one-off I cannot reproduce. Sorry for the noise - the lane-mask and #735 observations in my earlier comments are unaffected.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 12:09 UTC · original

Cross-checking the community stack on a 4070 Ti SUPER - it does not move the removal here, but it does clear the state errors, and the DRED breadcrumb names an indirect mesh dispatch.

What I ran (same title, same input sequence, diagnostics profile, Windows 11 26100, Ryzen 9 9900X, RTX 4070 Ti SUPER 16 GB, driver 580.97):

build survived lists in the failing submission D3D12 state errors
main d2a4bae 71.8 s 32 -
main + #336 + #493 + #483 63.6 s 32 -
main + DRED 57.1 s 7 -
main + #568 + #334 + #336 + #493 + #483 71.1 s 32 0
the same + VICTORY_SHADER_LOOP_LIMIT=1000 81.5 s 32 0
the same + DRED + GPU_TIMING 99.0 s 36 0

So on this machine the full stack (with @⁠Dufftwt's #568 -> #334 order, then our earlier three) leaves zero D3D12 ERROR lines and zero IASetVertexBuffers state errors, which matches the reports above, but the device removal happens at the same 60-100 s point as plain main. VICTORY_SHADER_LOOP_LIMIT=1000 does not help, so this does not look like a translated loop spinning in our emulation.

Where it stops (run with DRED + VICTORY_GPU_TIMING=1)

host GPU device removed after a submission of 36 lists
breadcrumbs (done/count, list): ... "557/2652 Some(7)" "0/3 Some(8)"
note: list 7 of 36, of its 445: indirect kind 10 max 1 at 0xd62340360 [mesh 94d3b7adff156e18, pixel 9adf19eb...]

A single mesh dispatch hangs (list 7's command 558), and list 8 never starts.

The indirect arguments we submit for it (I added a diagnostics-only dump, VICTORY_DUMP_INDIRECT, that reads the same host copy we hand to ExecuteIndirect):

  • 29,831 mesh indirect dispatches in the 99 s run;
  • 94.1% of them carry a record of 0 1 1 (thread group count X = 0), 4.4% are 0 0 0;
  • 128 records read 0 ffffffff ffffffff, which looks like uninitialised memory rather than a count;
  • the last dumps before the hang are 0 1 1, and the very last one is 4 1 1.

Two questions:

  1. Is X = 0 expected for most of the title's mesh dispatches? We pass no count buffer (counter is None), so if the title fills those records by a compute pass and the count buffer is what bounds them, we would be submitting stale zeros - which would also explain the black world everyone reports.
  2. Would it help to dump the record for the exact op the breadcrumb names (address 0xd62340360) rather than the last ones? I can print address + arguments for every mesh dispatch and match the address on the failure, if that is more useful than my current ring of last dumps.

Happy to run any branch: incremental build here is ~10 s and a run to the removal is 60-100 s.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 12:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131048449) Cross-checking the community stack on a 4070 Ti SUPER - it does not move the removal here, but it does clear the state errors, and the DRED breadcrumb names an indirect mesh dispatch. **What I ran** (same title, same input sequence, diagnostics profile, Windows 11 26100, Ryzen 9 9900X, RTX 4070 Ti SUPER 16 GB, driver 580.97): | build | survived | lists in the failing submission | D3D12 state errors | |---|---|---|---| | `main` d2a4bae | 71.8 s | 32 | - | | `main` + #336 + #493 + #483 | 63.6 s | 32 | - | | `main` + DRED | 57.1 s | 7 | - | | **`main` + #568 + #334 + #336 + #493 + #483** | **71.1 s** | 32 | **0** | | the same + `VICTORY_SHADER_LOOP_LIMIT=1000` | 81.5 s | 32 | 0 | | the same + DRED + GPU_TIMING | 99.0 s | 36 | 0 | So on this machine the full stack (with @⁠Dufftwt's #568 -> #334 order, then our earlier three) leaves **zero** `D3D12 ERROR` lines and zero `IASetVertexBuffers` state errors, which matches the reports above, but the device removal happens at the same 60-100 s point as plain `main`. `VICTORY_SHADER_LOOP_LIMIT=1000` does not help, so this does not look like a translated loop spinning in our emulation. **Where it stops (run with DRED + `VICTORY_GPU_TIMING=1`)** ``` host GPU device removed after a submission of 36 lists breadcrumbs (done/count, list): ... "557/2652 Some(7)" "0/3 Some(8)" note: list 7 of 36, of its 445: indirect kind 10 max 1 at 0xd62340360 [mesh 94d3b7adff156e18, pixel 9adf19eb...] ``` A single mesh dispatch hangs (list 7's command 558), and list 8 never starts. **The indirect arguments we submit for it** (I added a diagnostics-only dump, `VICTORY_DUMP_INDIRECT`, that reads the same host copy we hand to `ExecuteIndirect`): - 29,831 mesh indirect dispatches in the 99 s run; - **94.1% of them carry a record of `0 1 1`** (thread group count X = 0), 4.4% are `0 0 0`; - 128 records read `0 ffffffff ffffffff`, which looks like uninitialised memory rather than a count; - the last dumps before the hang are `0 1 1`, and the very last one is `4 1 1`. Two questions: 1. Is X = 0 expected for most of the title's mesh dispatches? We pass no count buffer (`counter` is None), so if the title fills those records by a compute pass and the count buffer is what bounds them, we would be submitting stale zeros - which would also explain the black world everyone reports. 2. Would it help to dump the record for the exact op the breadcrumb names (address `0xd62340360`) rather than the last ones? I can print address + arguments for every mesh dispatch and match the address on the failure, if that is more useful than my current ring of last dumps. Happy to run any branch: incremental build here is ~10 s and a run to the removal is 60-100 s.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 12:11 UTC · original

One correction to my previous comment, from matching the DRED note's address against the argument dumps:

The hung op is indirect kind 10 max 1 at 0xd62340360 [mesh 94d3b7adff156e18, pixel 9adf19eb...], and that exact address was dumped 20 times during the run; the last of those dumps (12:07:39.665, 12 s before the removal) read:

indirect arguments: 00000000 00000001 00000001 kind=10 stride=12 max=1 address="0xd62340360"

So the dispatch the breadcrumb names has thread group count X = 0. It is not a translated mesh shader looping over real work: with 0 groups nothing should execute at all, yet the submission never completes. That shifts my reading: the fault is more likely in the pipeline state bound at that dispatch (or in a command just before it in the same list) than in the dispatch's own arguments.

It also means my earlier statement "the very last dump is 4 1 1" was about a different address, not this one - the ring of last dumps is not the same thing as the record for the op that hangs.

Happy to add a mode that dumps only the record for the address DRED names, plus the pipeline state (mesh shader, root signature, bound tables) at that op, if that would help.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 12:11 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131082041) One correction to my previous comment, from matching the DRED note's address against the argument dumps: The hung op is `indirect kind 10 max 1 at 0xd62340360 [mesh 94d3b7adff156e18, pixel 9adf19eb...]`, and that exact address was dumped 20 times during the run; the last of those dumps (12:07:39.665, 12 s before the removal) read: ``` indirect arguments: 00000000 00000001 00000001 kind=10 stride=12 max=1 address="0xd62340360" ``` So the dispatch the breadcrumb names has **thread group count X = 0**. It is not a translated mesh shader looping over real work: with 0 groups nothing should execute at all, yet the submission never completes. That shifts my reading: the fault is more likely in the pipeline state bound at that dispatch (or in a command just before it in the same list) than in the dispatch's own arguments. It also means my earlier statement "the very last dump is `4 1 1`" was about a different address, not this one - the ring of last dumps is not the same thing as the record for the op that hangs. Happy to add a mode that dumps only the record for the address DRED names, plus the pipeline state (mesh shader, root signature, bound tables) at that op, if that would help.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 12:19 UTC · original

Two results from this machine: #832 (the fcmp false/true fix) on the WARP path, and the full breadcrumb note for the dispatch that hangs.

#832 on WARP - applied cleanly on top of my stack (main + #568 + #334 + #336 + #493 + #483), 3 files, ~9 s to build:

WARP before (main) with #832
where it dies a submission of 1 list, during the menu phase, ~40 s in a submission of 8 lists, after the Rockstar logo and the world load, 124 s in
reason 0x887A0005 DEVICE_PAUSED 0x887A0005 DEVICE_PAUSED
slow submissions before it none logged ms=285 lists=4, ms=465 lists=1

So on WARP this really is the fix for the early removal: the menus, the intro and the first world-load submissions all run (12-13 fps in the menus, 1.4-3.7 fps while loading) instead of dying immediately, and the failure now looks like the hardware path. On the real GPU it changes nothing: 66.4 s / 32 lists / 383 untranslated shaders, versus 63.6-71.8 s for the same stack without it.

The state at the hung dispatch - the breadcrumb note is long, here it is in full (trimmed to the fields):

list 7 of 36, of its 445: indirect kind 10 max 1 at 0xd62340360
[mesh 94d3b7adff156e18, pixel 9adf19eb2bcb238a]
 94d3b7adff156e18: u8=0xa13a00 [heap 330192: null] u9=0xb0fa60 [heap 362451: null] u11=0x10007895 u14=0x12423f
 9adf19eb2bcb238a: u9=0xb0fa60 [heap 362451: null] u14=0x12423f
 tables ["… Srv s0+672: buffer Some((67417145344, 52428800)) [annotated 0xb 0x0]",
         "… Srv s1+0: placed uav=false dim 1 128x1 …", …]

Both user-data heap indices this dispatch uses - u8 at slot 330192 and u9 at slot 362451, the latter shared with the pixel stage - describe as null. This matches what @⁠sash2kk saw (u8 landing on a null slot). Those indices are well inside PORTABLE_VIEWS (1,000,000), so they are not the capped range; the slots simply were never described.

Questions: is it plausible for the title to dispatch with those two roots never written, or should they have been? And if a null slot is bound, would you rather we skip the dispatch, substitute a dummy resource, or keep it as is (so the driver faults)? I can try any of the three on a branch here.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 12:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131288160) Two results from this machine: #832 (the fcmp false/true fix) on the WARP path, and the full breadcrumb note for the dispatch that hangs. **#832 on WARP** - applied cleanly on top of my stack (`main` + #568 + #334 + #336 + #493 + #483), 3 files, ~9 s to build: | WARP | before (main) | with #832 | |---|---|---| | where it dies | a submission of **1** list, during the menu phase, ~40 s in | a submission of **8** lists, after the Rockstar logo and the world load, **124 s** in | | reason | `0x887A0005` DEVICE_PAUSED | `0x887A0005` DEVICE_PAUSED | | slow submissions before it | none logged | `ms=285 lists=4`, `ms=465 lists=1` | So on WARP this really is the fix for the early removal: the menus, the intro and the first world-load submissions all run (12-13 fps in the menus, 1.4-3.7 fps while loading) instead of dying immediately, and the failure now looks like the hardware path. On the real GPU it changes nothing: 66.4 s / 32 lists / 383 untranslated shaders, versus 63.6-71.8 s for the same stack without it. **The state at the hung dispatch** - the breadcrumb note is long, here it is in full (trimmed to the fields): ``` list 7 of 36, of its 445: indirect kind 10 max 1 at 0xd62340360 [mesh 94d3b7adff156e18, pixel 9adf19eb2bcb238a] 94d3b7adff156e18: u8=0xa13a00 [heap 330192: null] u9=0xb0fa60 [heap 362451: null] u11=0x10007895 u14=0x12423f 9adf19eb2bcb238a: u9=0xb0fa60 [heap 362451: null] u14=0x12423f tables ["… Srv s0+672: buffer Some((67417145344, 52428800)) [annotated 0xb 0x0]", "… Srv s1+0: placed uav=false dim 1 128x1 …", …] ``` Both user-data heap indices this dispatch uses - `u8` at slot 330192 and `u9` at slot 362451, the latter shared with the pixel stage - describe as **null**. This matches what @⁠sash2kk saw (u8 landing on a null slot). Those indices are well inside `PORTABLE_VIEWS` (1,000,000), so they are not the capped range; the slots simply were never described. Questions: is it plausible for the title to dispatch with those two roots never written, or should they have been? And if a null slot is bound, would you rather we skip the dispatch, substitute a dummy resource, or keep it as is (so the driver faults)? I can try any of the three on a branch here.
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 12:36 UTC · original

Negative results that may save someone time: on this machine the device removal is not caused by the mesh dispatches, and the null roots / zero group counts are not specific to the hung op.

I gated three experiments behind diagnostics-only env vars, same title, same input sequence (baseline on this stack: 66.5 s, 32 lists, 0x887A0006):

experiment survived lists note
baseline (main + #568 + #334 + #336 + #493 + #483) 66.5 s 32
skip mesh dispatches whose arguments are all zero 66.2 s 32 DRED then names lists stopped at command 0, op 46 - nothing about the mesh op
skip every mesh dispatch (VICTORY_SKIP_MESH=1) 72.1 s 31 the removal happens anyway

So even with no mesh dispatch executed at all, the device is removed at the same point. The DRED breadcrumb that lands on indirect kind 10 is just the last recorded op boundary, not the trigger.

Two more measurements from the same runs:

  • Null table roots are everywhere, not special. I count the table-root user data whose host heap slot is still the null descriptor at each mesh dispatch: 24 sampled log lines at every 500th event means >11,500 of the ~20,000 mesh dispatches in a 66 s run carry at least one null root (the hung one had u8 at slot 330192 and u9 at 362451). So "skip the dispatch when a root is null" or "substitute a dummy resource" would throw away roughly half of the mesh work without touching the failure.
  • Skipping only the all-zero dispatches changes nothing, so the 94% 0 1 1 records are harmless as well.

Where that leaves it: the fault is in something that is not a mesh dispatch - a compute dispatch, a barrier, or memory state in the same submission. If DRED can name the last compute op before the stopped list (maybe in combination with VICTORY_GPU_TIMING=1 so each list is submitted on its own), that seems the more promising place to look. I can run that here if it is useful.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131682271) Negative results that may save someone time: on this machine the device removal is **not** caused by the mesh dispatches, and the null roots / zero group counts are not specific to the hung op. I gated three experiments behind diagnostics-only env vars, same title, same input sequence (baseline on this stack: 66.5 s, 32 lists, `0x887A0006`): | experiment | survived | lists | note | |---|---|---|---| | baseline (`main` + #568 + #334 + #336 + #493 + #483) | 66.5 s | 32 | | | skip mesh dispatches whose arguments are all zero | 66.2 s | 32 | DRED then names lists stopped at command 0, op 46 - nothing about the mesh op | | **skip every mesh dispatch** (`VICTORY_SKIP_MESH=1`) | **72.1 s** | 31 | the removal happens anyway | So even with **no mesh dispatch executed at all**, the device is removed at the same point. The DRED breadcrumb that lands on `indirect kind 10` is just the last recorded op boundary, not the trigger. Two more measurements from the same runs: - **Null table roots are everywhere, not special.** I count the table-root user data whose host heap slot is still the null descriptor at each mesh dispatch: 24 sampled log lines at every 500th event means **>11,500** of the ~20,000 mesh dispatches in a 66 s run carry at least one null root (the hung one had `u8` at slot 330192 and `u9` at 362451). So "skip the dispatch when a root is null" or "substitute a dummy resource" would throw away roughly half of the mesh work without touching the failure. - Skipping only the all-zero dispatches changes nothing, so the 94% `0 1 1` records are harmless as well. Where that leaves it: the fault is in something that is not a mesh dispatch - a compute dispatch, a barrier, or memory state in the same submission. If DRED can name the last compute op before the stopped list (maybe in combination with `VICTORY_GPU_TIMING=1` so each list is submitted on its own), that seems the more promising place to look. I can run that here if it is useful.
Author
Owner

@⁠h0useadv on GitHub · 2026-11-24 12:36 UTC · original

Offline coverage of LAKSHYA-cmd-tech's fix/shader-lane-mask-ballots-and-data-reads on main ffe310e (full retail shader pack, victory translate --validate, programs matched one by one): alone +24 validate, 0 newly fail. It clears a lane mask holding lanes elsewhere read as data (272 → 0) and a cross-lane operation outside compute (46 → 0), but most of those programs then stop at a descriptor read only as data (394 → 627), which #180 fixes. Together with #180 and #305: +1,193, 0 regressions, compute 1,417 → 1,846. Full table: #293

AI-assisted (Claude Code). Counts only, no game data.

**@⁠h0useadv** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131685852) Offline coverage of LAKSHYA-cmd-tech's `fix/shader-lane-mask-ballots-and-data-reads` on `main` `ffe310e` (full retail shader pack, `victory translate --validate`, programs matched one by one): alone **+24 validate, 0 newly fail**. It clears `a lane mask holding lanes elsewhere read as data` (272 → 0) and `a cross-lane operation outside compute` (46 → 0), but most of those programs then stop at `a descriptor read only as data` (394 → 627), which #180 fixes. Together with #180 and #305: **+1,193, 0 regressions**, compute 1,417 → 1,846. Full table: https://git.gtahub.st/github/Marvisak--VIctory/issues/293 AI-assisted (Claude Code). Counts only, no game data.
Author
Owner

@⁠Dufftwt on GitHub · 2026-11-24 12:47 UTC · original

@⁠chenzhehao1129-eng thanks, and sorry for the late answer: I've caught up with your three follow-ups. Your skip-every-mesh run settles it. On this machine it isn't the mesh dispatch. Op 46 is BEGIN_COMMAND_LIST, so the lists DRED names never started: the GPU got stuck before them.

The null roots. For a table root, the note's [heap N: null] describes only the slot the root points at, the table's first slot (user data / 32, in op_text, draw.rs). The entries the shader actually reads are under tables [...], and in your note those hold real views (Srv s0+672: buffer …, Srv s1+0: placed …). A title's table often starts with slots a given draw doesn't read, so a null first slot is normal. That fits your count of more than half the dispatches, and it isn't evidence of a problem. With #568 in your stack, empty slots that a shader does read at a constant offset get a null of the right kind.

What I'd try next, since your stack has no fix for #725 yet. On Wasler's RTX 5060 Ti the world load hung in a compute dispatch, 9ef9a9d818b27236, that was stuck in a loop. Marking glc accesses globally coherent ended it without any loop limit. You can find out cheaply whether you're on the same path:

  1. Grep your log for 9ef9a9d818b27236. If it's bound shortly before the removal, add dpalacios69's fix/shader-glc-globally-coherent (see #725). It conflicts with #568 in lower.rs. My resolved merge of #568 + #334 + #493 + that fix is on Dufftwt/VIctory test/world-stack, if that's easier to merge #336/#483 onto.
  2. With VICTORY_GPU_TIMING=1, the slow host list ms=… commands=… line names the list that runs long, and DRED's note for that list names its last op. That's the compute op you're after.

One more thing that fits lists stopped at BEGIN_COMMAND_LIST: VIctory runs every queue's lists one after another on one host queue, and both the queue's fence wait (queue.rs) and the in-list memory wait (wait_value, list.rs, #700) are no-ops. So if a shader in an earlier list waits for something a later-submitted list produces, it can't finish. Your loop-limit run only went from ~71 s to 81.5 s, so a translated loop doesn't explain it all on your machine. Still, it's worth keeping in mind when you look at which list ran long.

**@⁠Dufftwt** on GitHub · 2026-11-24 12:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131920565) @⁠chenzhehao1129-eng thanks, and sorry for the late answer: I've caught up with your three follow-ups. Your skip-every-mesh run settles it. On this machine it isn't the mesh dispatch. Op 46 is `BEGIN_COMMAND_LIST`, so the lists DRED names never started: the GPU got stuck before them. **The null roots.** For a table root, the note's `[heap N: null]` describes only the slot the root points at, the table's *first* slot (`user data / 32`, in `op_text`, `draw.rs`). The entries the shader actually reads are under `tables [...]`, and in your note those hold real views (`Srv s0+672: buffer …`, `Srv s1+0: placed …`). A title's table often starts with slots a given draw doesn't read, so a null first slot is normal. That fits your count of more than half the dispatches, and it isn't evidence of a problem. With #568 in your stack, empty slots that a shader *does* read at a constant offset get a null of the right kind. **What I'd try next, since your stack has no fix for #725 yet.** On Wasler's RTX 5060 Ti the world load hung in a compute dispatch, `9ef9a9d818b27236`, that was stuck in a loop. Marking `glc` accesses globally coherent ended it without any loop limit. You can find out cheaply whether you're on the same path: 1. Grep your log for `9ef9a9d818b27236`. If it's bound shortly before the removal, add dpalacios69's `fix/shader-glc-globally-coherent` (see #725). It conflicts with #568 in `lower.rs`. My resolved merge of #568 + #334 + #493 + that fix is on `Dufftwt/VIctory` `test/world-stack`, if that's easier to merge #336/#483 onto. 2. With `VICTORY_GPU_TIMING=1`, the `slow host list ms=… commands=…` line names the list that runs long, and DRED's note for *that* list names its last op. That's the compute op you're after. One more thing that fits lists stopped at `BEGIN_COMMAND_LIST`: VIctory runs every queue's lists one after another on one host queue, and both the queue's fence wait (`queue.rs`) and the in-list memory wait (`wait_value`, `list.rs`, #700) are no-ops. So if a shader in an earlier list waits for something a later-submitted list produces, it can't finish. Your loop-limit run only went from ~71 s to 81.5 s, so a translated loop doesn't explain it all on your machine. Still, it's worth keeping in mind when you look at which list ran long.
Author
Owner

@⁠limittox on GitHub · 2026-11-24 12:47 UTC · original

Same failure here on both adapters, with one data point that may be new: on WARP, DRED names compute dispatches reading an empty view-heap slot through u4 (around heap index 340,900), the same pattern #619 and #625 report for mesh draws through u8 (around 330,000).

Setup

  • RTX 3060 Ti (driver 32.0.16.1088), i5-12600K, 32 GB, Windows 11 Pro build 26300
  • Title v1.0.2.1, Series X mode
  • Real-GPU run: release build of 58fed37. WARP runs: ffe310e, --profile diag --features diagnostics

Runs

Run Result
Real GPU, release Menus at 30 fps. 0x887A0006 about 4 min after launch, on a 32-list submission that took 6.2 s; no breadcrumbs
WARP 0x887A0005 after a 1-list submission, first world frames (frame 912)
WARP + VICTORY_D3D12_DEBUG=1 + VICTORY_D3D12_DRED=1 Same, frame 1170. DRED output below
As above + VICTORY_SKIP_PIPELINES=269b802f878c24e1 Same moment (0.7 s after that program's first bind). DRED now names two other compute programs with the same empty slot

DRED, WARP, no skip (one of six dispatches of the same program reported for the list):

list 0 of 1, of its 571: dispatch 14x1x1 [compute 269b802f878c24e1] | 269b802f878c24e1: u4=0xa67100 [heap 340872: null] u5=0x2 [heap 2: Shader(0, Some([42, 9, 5768, 0, 0, 0, 0, 0, 0, 0]))] u8=0x35 [heap 53: null] tables ["269b802f878c24e1 Srv s0+168: placed uav=false dim 1 53088x1 f0 layout 0x1 at 0x1911caf0", "269b802f878c24e1 Uav s0+288: uav buffer Some((57636093952, 94371840))", "269b802f878c24e1 Cbv s1+0: Constants"]
device removed: The GPU device instance has been suspended. (0x887A0005)

DRED, WARP, with 269b802f878c24e1 skipped:

list 0 of 1, of its 478: dispatch 1x1x1 [compute 1547305c505a7559] | 1547305c505a7559: u4=0xa67600 [heap 340912: null] ...
list 0 of 1, of its 478: dispatch 1x1x1 [compute 31430354dd5c259c] | 31430354dd5c259c: u4=0xa67600 [heap 340912: null] ...

Every dispatch DRED reports in both runs has u4 pointing at a null heap slot, so it looks like a family of compute programs in one pass rather than one program.

Where WARP faults. Each run logs first-chance access violations (read of 0x0) just before the removal, in generated code called from the rasteriser:

#0  0x7ff458dc1bf5
#1  d3d10warp.dll+0xdbcae
#2  d3d10warp.dll+0xdbc6b
#3  d3d10warp.dll+0xe8093
#4  d3d10warp.dll+0x310cff

Debug layer. No message about the dispatches themselves (GBV was off). The only errors are 159 × id 622: compute shaders wanting 32 (125) or 64 (34) wave lanes on WARP's 4.

Not tested: VICTORY_D3D12_GBV=1, the fix in #832, and any of the open PRs (#568, #578, #581, #586, #587). The real-GPU run had no DRED, so I can't say it stops on the same slot.

No game data included; program hashes and log lines only. AI-assisted (Claude Code).

**@⁠limittox** on GitHub · 2026-11-24 12:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7131929472) Same failure here on both adapters, with one data point that may be new: on WARP, DRED names **compute** dispatches reading an empty view-heap slot through `u4` (around heap index 340,900), the same pattern #619 and #625 report for mesh draws through `u8` (around 330,000). **Setup** - RTX 3060 Ti (driver 32.0.16.1088), i5-12600K, 32 GB, Windows 11 Pro build 26300 - Title v1.0.2.1, Series X mode - Real-GPU run: release build of `58fed37`. WARP runs: `ffe310e`, `--profile diag --features diagnostics` **Runs** | Run | Result | |---|---| | Real GPU, release | Menus at 30 fps. `0x887A0006` about 4 min after launch, on a 32-list submission that took 6.2 s; no breadcrumbs | | WARP | `0x887A0005` after a 1-list submission, first world frames (frame 912) | | WARP + `VICTORY_D3D12_DEBUG=1` + `VICTORY_D3D12_DRED=1` | Same, frame 1170. DRED output below | | As above + `VICTORY_SKIP_PIPELINES=269b802f878c24e1` | Same moment (0.7 s after that program's first bind). DRED now names two other compute programs with the same empty slot | **DRED, WARP, no skip** (one of six dispatches of the same program reported for the list): ```text list 0 of 1, of its 571: dispatch 14x1x1 [compute 269b802f878c24e1] | 269b802f878c24e1: u4=0xa67100 [heap 340872: null] u5=0x2 [heap 2: Shader(0, Some([42, 9, 5768, 0, 0, 0, 0, 0, 0, 0]))] u8=0x35 [heap 53: null] tables ["269b802f878c24e1 Srv s0+168: placed uav=false dim 1 53088x1 f0 layout 0x1 at 0x1911caf0", "269b802f878c24e1 Uav s0+288: uav buffer Some((57636093952, 94371840))", "269b802f878c24e1 Cbv s1+0: Constants"] device removed: The GPU device instance has been suspended. (0x887A0005) ``` **DRED, WARP, with `269b802f878c24e1` skipped:** ```text list 0 of 1, of its 478: dispatch 1x1x1 [compute 1547305c505a7559] | 1547305c505a7559: u4=0xa67600 [heap 340912: null] ... list 0 of 1, of its 478: dispatch 1x1x1 [compute 31430354dd5c259c] | 31430354dd5c259c: u4=0xa67600 [heap 340912: null] ... ``` Every dispatch DRED reports in both runs has `u4` pointing at a null heap slot, so it looks like a family of compute programs in one pass rather than one program. **Where WARP faults.** Each run logs first-chance access violations (read of `0x0`) just before the removal, in generated code called from the rasteriser: ```text #0 0x7ff458dc1bf5 #1 d3d10warp.dll+0xdbcae #2 d3d10warp.dll+0xdbc6b #3 d3d10warp.dll+0xe8093 #4 d3d10warp.dll+0x310cff ``` **Debug layer.** No message about the dispatches themselves (GBV was off). The only errors are 159 × id 622: compute shaders wanting 32 (125) or 64 (34) wave lanes on WARP's 4. **Not tested:** `VICTORY_D3D12_GBV=1`, the fix in #832, and any of the open PRs (#568, #578, #581, #586, #587). The real-GPU run had no DRED, so I can't say it stops on the same slot. No game data included; program hashes and log lines only. AI-assisted (Claude Code).
Author
Owner

@⁠chenzhehao1129-eng on GitHub · 2026-11-24 13:03 UTC · original

I rebased the lane-mask branch onto main ffe310e + #180 + #305 as @⁠h0useadv's numbers suggest (all three merged cleanly with ort, no manual resolution; tree at D:\VIctory-lm2, commit ab80f45) and ran the same title and input sequence.

  • Survived 64.7 s, device removed on a submission of 27 lists, exit 0x887A0005 - the same wall as before, and the same as my patched stack (66.5 s / 32 lists).
  • Untranslated shaders: 137 in that run, against 376-447 for the same kind of run on main + #568 + #334 + #336 + #493 + #483. So the offline coverage gain does carry into the real title: roughly two thirds of the converter failures are gone.
  • Remaining top reasons: 31x an address in an SGPR that is not a root parameter, 13x an address not from a root parameter, 11x a lane-mask join of an untracked mask, 10+8x a structured buffer of unknown stride, 7x a lane mask read as data.
  • Only 1 slow submission in the whole run, versus 11-69 on the other stacks.

So this is consistent with the earlier negative results: better shader coverage does not move the removal. On this machine, neither mesh dispatches, nor their argument records, nor translation gaps are the trigger.

What I have not been able to do is name the op that actually faults: with VICTORY_GPU_TIMING=1 DRED stops naming a command (the breadcrumbs come back as 2/2 for every list, i.e. the lists that never started). If anyone knows a way to get D3D12 DRED to attribute a fault in that situation - or whether I should bisect by skipping ranges of commands instead - I can run it.

The tree is at D:\VIctory-lm2, commit ab80f45, diagnostics profile built in 20 s, run takes 65 s, if anyone wants to reproduce.

**@⁠chenzhehao1129-eng** on GitHub · 2026-11-24 13:03 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7132293180) I rebased the lane-mask branch onto `main` ffe310e + #180 + #305 as @⁠h0useadv's numbers suggest (all three merged cleanly with `ort`, no manual resolution; tree at D:\VIctory-lm2, commit ab80f45) and ran the same title and input sequence. - **Survived 64.7 s**, device removed on a submission of 27 lists, exit `0x887A0005` - the same wall as before, and the same as my patched stack (66.5 s / 32 lists). - **Untranslated shaders: 137** in that run, against 376-447 for the same kind of run on `main` + #568 + #334 + #336 + #493 + #483. So the offline coverage gain does carry into the real title: roughly two thirds of the converter failures are gone. - Remaining top reasons: 31x `an address in an SGPR that is not a root parameter`, 13x `an address not from a root parameter`, 11x `a lane-mask join of an untracked mask`, 10+8x `a structured buffer of unknown stride`, 7x `a lane mask read as data`. - Only 1 slow submission in the whole run, versus 11-69 on the other stacks. So this is consistent with the earlier negative results: better shader coverage does not move the removal. On this machine, neither mesh dispatches, nor their argument records, nor translation gaps are the trigger. What I have not been able to do is name the op that actually faults: with `VICTORY_GPU_TIMING=1` DRED stops naming a command (the breadcrumbs come back as `2/2` for every list, i.e. the lists that never started). If anyone knows a way to get D3D12 DRED to attribute a fault in that situation - or whether I should bisect by skipping ranges of commands instead - I can run it. The tree is at `D:\VIctory-lm2`, commit `ab80f45`, diagnostics profile built in 20 s, run takes 65 s, if anyone wants to reproduce.
Author
Owner

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

@⁠chenzhehao1129-eng nice result on coverage (137 untranslated, down from ~400), and it's a clean negative for the removal.

One thing in your numbers points away from a hang: only one slow submission in the whole run. A TDR needs a submission that runs ~2 s, so a removal without one is more likely a page fault, an invalid call or a driver error than a timeout. Two cheap ways to tell:

  1. The reason, already in crashes.log. 0x887A0005 is only "device removed". VIctory's message ends with ; device removed: <reason> (fail(), host.rs), which carries GetDeviceRemovedReason:

    • 0x887A0006: a hang;
    • 0x887A0007: a reset;
    • 0x887A0020: a driver internal error;
    • 0x887A0001: an invalid call.

    If it's a page fault, the same message also has ; page fault at … with what lies there.

  2. GPU-based validation: VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1. It checks on the GPU what the debug layer can't from the CPU: a descriptor of the wrong type or never written, a read past a buffer, a resource in the wrong state when a shader actually reads it. Those remove the device without hanging, and GBV names the draw or dispatch. It's slow, but with a 65 s run that's affordable.

Bisecting by skipping commands would work too, but VIctory has no range skip, only skips by shader (VICTORY_SKIP_PIPELINES) and, with #579, by wave64 stage (VICTORY_SKIP_WAVE64=compute). I'd try the two above first. The reason code alone may already say which way to look.

**@⁠Dufftwt** on GitHub · 2026-11-24 13:05 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7132324279) @⁠chenzhehao1129-eng nice result on coverage (137 untranslated, down from ~400), and it's a clean negative for the removal. One thing in your numbers points away from a hang: only **one** slow submission in the whole run. A TDR needs a submission that runs ~2 s, so a removal without one is more likely a page fault, an invalid call or a driver error than a timeout. Two cheap ways to tell: 1. **The reason, already in `crashes.log`.** `0x887A0005` is only "device removed". VIctory's message ends with `; device removed: <reason>` (`fail()`, `host.rs`), which carries `GetDeviceRemovedReason`: - `0x887A0006`: a hang; - `0x887A0007`: a reset; - `0x887A0020`: a driver internal error; - `0x887A0001`: an invalid call. If it's a page fault, the same message also has `; page fault at …` with what lies there. 2. **GPU-based validation:** `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1`. It checks on the GPU what the debug layer can't from the CPU: a descriptor of the wrong type or never written, a read past a buffer, a resource in the wrong state when a shader actually reads it. Those remove the device without hanging, and GBV names the draw or dispatch. It's slow, but with a 65 s run that's affordable. Bisecting by skipping commands would work too, but VIctory has no range skip, only skips by shader (`VICTORY_SKIP_PIPELINES`) and, with #579, by wave64 stage (`VICTORY_SKIP_WAVE64=compute`). I'd try the two above first. The reason code alone may already say which way to look.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 16:32 UTC · original

Additional data point on a low-VRAM NVIDIA laptop, plus one partial fix verified in-game.

Config: RTX 5070 Laptop (8 GB VRAM), 15.4 GB RAM, 24.8 GB system-managed pagefile
(commit limit 40.2 GB), retail 1.0.2.1 on SSD, Windows 11, ffe310e release build.

Same phase, same numbers as the report: menus 30.0 fps / 33.3 ms; world load drops to
0.3-0.7 fps (1966-3299 ms/frame) with 119 host pipeline refused 0x80070057, then the
device goes away with 0x887A0020 (DXGI_ERROR_DRIVER_INTERNAL_ERROR) right after
story000/ttdb/vfx (79 packs opened).

The diagnostics build names the failing allocation, and it is not the descriptor heap:

WARN victory_gpu::resource: no host texture error=E_OUTOFMEMORY (0x8007000E)   (x2)
ERROR victory_gpu::host: a host command list did not close (0x8007000E):
      a command recorded into it was invalid

Host texture creation fails first; the invalid command recorded afterwards is what removes
the device. On 8 GB VRAM this looks like default-heap exhaustion during world load.

What I could verify in-game on the same route (release builds from each PR head, same
machine state):

build pipeline refusals frame time at load outcome
ffe310e 119 1966-3299 ms device removed
#1133 (heap cap + barriers) 0 551 ms, then 25.1 fps still command list did not close (0x8007000E)
#472 (copy-bridge leaks) 119 same still 0x8007000E, now on no host texture
#561 (commit in pieces) 119 same no change; the 6.1 GiB commit succeeds here

So #1133 removes the pipeline refusals and cuts the load frame time by ~4x, but the remaining
blocker is host/VRAM memory exhaustion.

Suggestion: bound the default-heap texture budget (the mip-drop switch in #737 is the same
idea) or fall back to shared/L0 memory when CreateCommittedResource fails, and never record
a command that references a null resource — a failed allocation should drop the work, not
remove the device.

Follow-up, the same machine with #737 (VICTORY_TEXTURE_MIP_DROP=1): the world loads.
79 packs, 0 no host texture failures, 0 command list did not close, no device removal,
29-30 fps (34.4 ms/frame, 11 draws/frame) with menus unchanged at 30.0 fps / 33.3 ms.
nvidia-smi never reported more than 501 MiB of VRAM during the failing load and the process
peaked at 15.6 GB private on a 15.4 GB machine, so the 0x8007000E is driven by the
committed size of the host textures rather than by VRAM residency. Capping the texture budget
is enough to get into the world on an 8 GB laptop GPU.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 16:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7137819030) Additional data point on a low-VRAM NVIDIA laptop, plus one partial fix verified in-game. **Config**: RTX 5070 Laptop (8 GB VRAM), 15.4 GB RAM, 24.8 GB system-managed pagefile (commit limit 40.2 GB), retail 1.0.2.1 on SSD, Windows 11, `ffe310e` release build. **Same phase, same numbers as the report**: menus 30.0 fps / 33.3 ms; world load drops to 0.3-0.7 fps (1966-3299 ms/frame) with **119** `host pipeline refused 0x80070057`, then the device goes away with `0x887A0020` (DXGI_ERROR_DRIVER_INTERNAL_ERROR) right after `story000/ttdb/vfx` (79 packs opened). **The diagnostics build names the failing allocation, and it is not the descriptor heap**: ``` WARN victory_gpu::resource: no host texture error=E_OUTOFMEMORY (0x8007000E) (x2) ERROR victory_gpu::host: a host command list did not close (0x8007000E): a command recorded into it was invalid ``` Host texture creation fails first; the invalid command recorded afterwards is what removes the device. On 8 GB VRAM this looks like default-heap exhaustion during world load. **What I could verify in-game on the same route** (release builds from each PR head, same machine state): | build | pipeline refusals | frame time at load | outcome | | --- | --- | --- | --- | | `ffe310e` | 119 | 1966-3299 ms | device removed | | #1133 (heap cap + barriers) | **0** | 551 ms, then 25.1 fps | still `command list did not close (0x8007000E)` | | #472 (copy-bridge leaks) | 119 | same | still `0x8007000E`, now on `no host texture` | | #561 (commit in pieces) | 119 | same | no change; the 6.1 GiB commit succeeds here | So #1133 removes the pipeline refusals and cuts the load frame time by ~4x, but the remaining blocker is host/VRAM memory exhaustion. Suggestion: bound the default-heap texture budget (the mip-drop switch in #737 is the same idea) or fall back to shared/L0 memory when `CreateCommittedResource` fails, and never record a command that references a null resource — a failed allocation should drop the work, not remove the device. **Follow-up, the same machine with #737 (`VICTORY_TEXTURE_MIP_DROP=1`)**: the world loads. 79 packs, 0 `no host texture` failures, 0 `command list did not close`, no device removal, 29-30 fps (34.4 ms/frame, 11 draws/frame) with menus unchanged at 30.0 fps / 33.3 ms. `nvidia-smi` never reported more than 501 MiB of VRAM during the failing load and the process peaked at 15.6 GB private on a 15.4 GB machine, so the `0x8007000E` is driven by the committed size of the host textures rather than by VRAM residency. Capping the texture budget is enough to get into the world on an 8 GB laptop GPU.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:34 UTC · original

With the D3D12 debug layer installed (Tools.Graphics.DirectX) and DRED on, the removal now
names itself. Same machine as before, release+diagnostics build of the #1296 head (4dd48bd),
device forced onto the RTX 5070 Laptop (per-app GPU preference, since D3D12CreateDevice(None)
picks this laptop's iGPU).

Where it stops

host GPU device removed after a submission of 19 lists; breadcrumbs ...
commands 1430..1434 between its barriers: command 1431 (op 42): no marker; command 1433 (op 42)
list 0 of 19, of its 286: mesh f0c7efd2aceb2aaa, pixel 7d85c9cab3c80721
shader 9f14b72117e2abec: u9=0x1848020 [heap 330192: null] tables [...]

A mesh-shader pipeline is in flight, and one of its root tables points at a null descriptor
entry
: [heap 330192: null]. The pipeline's table holds placed SRVs (dim 1 10528x1, 64x1)
plus a CBV, so the shader's descriptor indexing lands on a slot nothing wrote.

What the debug layer reports before it goes

34x  IASetVertexBuffers: Resource state (0x8: NON_PIXEL_SHADER_RESOURCE) is invalid for use as a
     vertex buffer. Expected: VERTEX_AND_CONSTANT_BUFFER
31x  ResourceBarrier: Before state (0x8: UNORDERED_ACCESS) of resource
     'title buffer 0x23e40000+0xae00000' does not match the state (0x1: VERTEX_AND_CONSTANT_BUFFER)
     specified in a preceding ResourceBarrier or as InitialState
128x CreateComputeShader: shader wants wave lane count N, device maximum is M

The first two are the same class of bug: a buffer written as a UAV (0x8) is then read as a vertex
buffer (0x1) without the transition the host needs — the first message says the command is
issued, the second shows the bookkeeping already believes a different state. That is a strong
candidate for the page fault behind the removal: the GPU reads a vertex buffer that was never
transitioned for vertex fetch.

The third is separate and expected on a 32-lane host for console wave64 shaders, but worth
counting: 128 compute pipelines are created with a wave size the device does not support, which
likely falls back silently.

Useful next step if someone with the title code wants to bisect: the buffer in the barrier
message is 0x23e40000+0xae00000 (~174 MB), i.e. a large streamed buffer, and the failures repeat
within four commands between two barriers — so a single missing transition before an
IASetVertexBuffers for a previously UAV-written buffer reproduces it deterministically.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7139398979) With the D3D12 debug layer installed (`Tools.Graphics.DirectX`) and DRED on, the removal now names itself. Same machine as before, release+diagnostics build of the #1296 head (`4dd48bd`), device forced onto the RTX 5070 Laptop (per-app GPU preference, since `D3D12CreateDevice(None)` picks this laptop's iGPU). **Where it stops** ``` host GPU device removed after a submission of 19 lists; breadcrumbs ... commands 1430..1434 between its barriers: command 1431 (op 42): no marker; command 1433 (op 42) list 0 of 19, of its 286: mesh f0c7efd2aceb2aaa, pixel 7d85c9cab3c80721 shader 9f14b72117e2abec: u9=0x1848020 [heap 330192: null] tables [...] ``` A **mesh-shader pipeline** is in flight, and one of its root tables points at a **null descriptor entry**: `[heap 330192: null]`. The pipeline's table holds placed SRVs (`dim 1 10528x1`, `64x1`) plus a CBV, so the shader's descriptor indexing lands on a slot nothing wrote. **What the debug layer reports before it goes** ``` 34x IASetVertexBuffers: Resource state (0x8: NON_PIXEL_SHADER_RESOURCE) is invalid for use as a vertex buffer. Expected: VERTEX_AND_CONSTANT_BUFFER 31x ResourceBarrier: Before state (0x8: UNORDERED_ACCESS) of resource 'title buffer 0x23e40000+0xae00000' does not match the state (0x1: VERTEX_AND_CONSTANT_BUFFER) specified in a preceding ResourceBarrier or as InitialState 128x CreateComputeShader: shader wants wave lane count N, device maximum is M ``` The first two are the same class of bug: a buffer written as a UAV (0x8) is then read as a vertex buffer (0x1) without the transition the host needs — the first message says the command *is* issued, the second shows the bookkeeping already believes a different state. That is a strong candidate for the page fault behind the removal: the GPU reads a vertex buffer that was never transitioned for vertex fetch. The third is separate and expected on a 32-lane host for console wave64 shaders, but worth counting: 128 compute pipelines are created with a wave size the device does not support, which likely falls back silently. **Useful next step if someone with the title code wants to bisect**: the buffer in the barrier message is `0x23e40000+0xae00000` (~174 MB), i.e. a large streamed buffer, and the failures repeat within four commands between two barriers — so a single missing transition before an `IASetVertexBuffers` for a previously UAV-written buffer reproduces it deterministically.
Author
Owner

@⁠Dufftwt on GitHub · 2026-11-24 17:35 UTC · original

@⁠Logan-Gaillard nice, that names it. Both debug-layer classes you list have open fixes that testers have already run in the title:

  • A UAV-written buffer then read as a vertex buffer (your first two messages): #334 adds the buffer state transitions. In Wasler's runs on #732 it cleared exactly these vertex-buffer-in-UAV-state errors.
  • A null entry in a table the in-flight pipeline reads ([heap 330192: null]): #568 gives table slots without a view a null descriptor of the kind the shader reads, instead of leaving them empty. It ended the device removal in #508.

Both are in test/world-stack on Dufftwt/VIctory (e0c3385, main + #568 + #334 + #493 + the #725 coherence fix). alexdeliu's stack-ffe310e also has #334. A run of either, or of your tree with #334 and #568, would show whether this removal goes with them.

On the third line: those wave64 compute pipelines don't fall back. They're refused (host pipeline refused, 0x80070057), and their dispatches are dropped. #439 and #189 are the open fixes for running them on 32-lane GPUs.

**@⁠Dufftwt** on GitHub · 2026-11-24 17:35 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7139418571) @⁠Logan-Gaillard nice, that names it. Both debug-layer classes you list have open fixes that testers have already run in the title: - **A UAV-written buffer then read as a vertex buffer** (your first two messages): #334 adds the buffer state transitions. In Wasler's runs on #732 it cleared exactly these vertex-buffer-in-UAV-state errors. - **A null entry in a table the in-flight pipeline reads** (`[heap 330192: null]`): #568 gives table slots without a view a null descriptor of the kind the shader reads, instead of leaving them empty. It ended the device removal in #508. Both are in `test/world-stack` on `Dufftwt/VIctory` (`e0c3385`, `main` + #568 + #334 + #493 + the #725 coherence fix). alexdeliu's `stack-ffe310e` also has #334. A run of either, or of your tree with #334 and #568, would show whether this removal goes with them. On the third line: those wave64 compute pipelines don't fall back. They're refused (`host pipeline refused`, `0x80070057`), and their dispatches are dropped. #439 and #189 are the open fixes for running them on 32-lane GPUs.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:47 UTC · original

I implemented the transition the debug layer asks for and measured it. Honest result: it moves the
failure, it does not fix it — and the numbers say why.

Change (local branch, commit 67893e3): each host buffer copy tracks its state; a buffer a
shader writes is marked unordered access; before IASetVertexBuffers (and the index buffer) the
copy is transitioned to VERTEX_AND_CONSTANT_BUFFER / INDEX_BUFFER when the tracked state does
not allow the fetch.

Measurements on the same machine, same route, device forced to the RTX 5070, diagnostics build
with the debug layer and DRED:

IASetVertexBuffers warnings barrier mismatches device removals
before 34 31 1 (after 19 lists)
transition when tracked state forbids (v1) 23 494 4
v1 + explicit transition of the write itself (v2) 10 471 501 0 in the window tested

With the release build of v1 the device is not removed at all on that route: the run streams the
world (0.5-1 fps, 240 MB of copies per frame) until it aborts on host memory
(memory allocation of 1572864 bytes failed). So the fault is reachable — the resource the
debug layer names is the right one — but the barriers I add are themselves wrong, which is why the
mismatch count explodes and the diagnostics build still loses the device.

Why the tracked state cannot be right from the draw side alone: the copy that fills these
buffers is a CopyBufferRegion deferred to submission (defer_refresh), which puts the buffer in
COPY_DEST; the UAV write is a descriptor binding with no explicit transition; and the fetch is a
third place. Three writers of one fact, and only the third was updated. v2 shows the trap: making
the write explicit only helps if the copy path agrees, otherwise every fetch names a state the
driver never saw.

What the fix should look like: one owner of a host buffer's state — a single helper every
user calls (CopyBufferRegion / UAV binding / vertex fetch / index fetch / indirect argument) that
transitions from the state it recorded and stores the result — instead of barriers decided at each
call site. The debug layer's messages are a ready-made test: the counts above go to zero or they do
not.

I left the prototype on the local branch rather than sending it as a patch: as it stands it trades
34 invalid vertex fetches for 494 invalid barriers.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7139701942) I implemented the transition the debug layer asks for and measured it. Honest result: it moves the failure, it does not fix it — and the numbers say why. **Change** (local branch, commit `67893e3`): each host buffer copy tracks its state; a buffer a shader writes is marked unordered access; before `IASetVertexBuffers` (and the index buffer) the copy is transitioned to `VERTEX_AND_CONSTANT_BUFFER` / `INDEX_BUFFER` when the tracked state does not allow the fetch. **Measurements** on the same machine, same route, device forced to the RTX 5070, diagnostics build with the debug layer and DRED: | | `IASetVertexBuffers` warnings | barrier mismatches | device removals | | --- | --- | --- | --- | | before | 34 | 31 | 1 (after 19 lists) | | transition when tracked state forbids (v1) | 23 | **494** | 4 | | v1 + explicit transition of the write itself (v2) | **10 471** | 501 | 0 in the window tested | With the release build of v1 the device is not removed at all on that route: the run streams the world (0.5-1 fps, 240 MB of copies per frame) until it aborts on host memory (`memory allocation of 1572864 bytes failed`). So the fault is *reachable* — the resource the debug layer names is the right one — but the barriers I add are themselves wrong, which is why the mismatch count explodes and the diagnostics build still loses the device. **Why the tracked state cannot be right from the draw side alone**: the copy that fills these buffers is a `CopyBufferRegion` deferred to submission (`defer_refresh`), which puts the buffer in `COPY_DEST`; the UAV write is a descriptor binding with no explicit transition; and the fetch is a third place. Three writers of one fact, and only the third was updated. v2 shows the trap: making the write explicit only helps if the copy path agrees, otherwise every fetch names a state the driver never saw. **What the fix should look like**: one owner of a host buffer's state — a single helper every user calls (`CopyBufferRegion` / UAV binding / vertex fetch / index fetch / indirect argument) that transitions from the state it recorded and stores the result — instead of barriers decided at each call site. The debug layer's messages are a ready-made test: the counts above go to zero or they do not. I left the prototype on the local branch rather than sending it as a patch: as it stands it trades 34 invalid vertex fetches for 494 invalid barriers.
Author
Owner

@⁠Dufftwt on GitHub · 2026-11-24 17:48 UTC · original

@⁠Logan-Gaillard that's the right diagnosis, and #334 (realhenners) is already that design, so it's worth running before taking your prototype further:

  • One owner per list. BufferStates in host.rs records each host copy's first and current state in the list. Reads use GENERIC_READ, shader writes UNORDERED_ACCESS, and a transition is recorded wherever the use changes.
  • Lists start and end in a known state. The list's prelude moves each buffer from COMMON to its first state, and close moves it back to COMMON. No state leaks into the next list, which is where deferred copies and other lists' writers would otherwise disagree.
  • The source of your 31 mismatches. indirect.rs recorded fixed UNORDERED_ACCESS -> INDIRECT_ARGUMENT barriers and moved the buffer back to UNORDERED_ACCESS after each ExecuteIndirect. The arguments live in the same 174 MB heap as the vertices, so every indirect draw left the vertex data in UAV state. #334 removes those fixed barriers.

Your debug-layer counts make the test: #334 on your tree, or test/world-stack (e0c3385), which has it with #568. If both counts go to zero there and the removal goes with them, that's strong evidence for #334.

**@⁠Dufftwt** on GitHub · 2026-11-24 17:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7139734706) @⁠Logan-Gaillard that's the right diagnosis, and #334 (realhenners) is already that design, so it's worth running before taking your prototype further: - **One owner per list.** `BufferStates` in `host.rs` records each host copy's first and current state in the list. Reads use `GENERIC_READ`, shader writes `UNORDERED_ACCESS`, and a transition is recorded wherever the use changes. - **Lists start and end in a known state.** The list's prelude moves each buffer from `COMMON` to its first state, and `close` moves it back to `COMMON`. No state leaks into the next list, which is where deferred copies and other lists' writers would otherwise disagree. - **The source of your 31 mismatches.** `indirect.rs` recorded fixed `UNORDERED_ACCESS -> INDIRECT_ARGUMENT` barriers and moved the buffer back to `UNORDERED_ACCESS` after each `ExecuteIndirect`. The arguments live in the same 174 MB heap as the vertices, so every indirect draw left the vertex data in UAV state. #334 removes those fixed barriers. Your debug-layer counts make the test: #334 on your tree, or `test/world-stack` (`e0c3385`), which has it with #568. If both counts go to zero there and the removal goes with them, that's strong evidence for #334.
Author
Owner

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

World load on an RX 9070 XT (RDNA4) and on WARP: what each stacked PR changes, from this issue's removal to #1317's hang.

Machine and tree. Windows 11 Pro (build 26300), Ryzen 5 9600X, 32 GB, AMD Radeon RX 9070 XT, driver 32.0.32029.2010, own retail 1.0.2.1, Series X mode. Diagnostics builds of ffe310e with open PRs merged in order: #568 cd6d559, #334 c99e429, #431 23ced70, #32 9c5328d. Settings for every run: VICTORY_D3D12_DRED=1, VICTORY_KEYS Enter presses up to 2 min, no loop limit, no skipped pipelines. Times are from launch. The first run also went through the first-boot screens, the later ones did not. One run per row.

tree adapter how it ended from launch
ffe310e (+ #1425, which only changes log text) WARP removed (0x887A0005) after a submission of 32 lists: mesh f0c7efd2aceb2aaa + pixel 7d85c9cab3c80721 reading a table entry [heap 330192: null]. The same pair and entry as reported here 4 min 19 (incl. first boot)
+ #568 + #334 WARP this removal is gone. Loading goes on, then removed (0x887A0005) after a submission of 1 list of 60 compute dispatches. See below 5 min 55
+ #568 + #334 RX 9070 XT removed (0x887A0006) after 31 lists: DRED page fault inside freed host textures, 2048x1024, DXGI formats 98/99 (BC7), as in #557 and #772 2 min 19
+ #568 + #334 + #431 RX 9070 XT reaches the world: 262,904 draws over frames 513–1024 (5,010 drawn), black frame. Then removed (0x887A0006) after 29 lists, with mesh 04b9be3756e8f41c + pixel 1af4a50c7fb40c97 in flight. That is #1317's and #71's hang pair, here on RDNA4 8 min 02
+ #568 + #334 + #431 + #32 RX 9070 XT removed (0x887A0006) after 22 lists: DRED page fault inside a freed title buffer copy (title buffer ...+0x455d80), with an indirect mesh draw (f5804c93b00ea73e) in flight 2 min 33

Three things that are new as far as I can find:

  1. #32 is not safe on its own. With #32, a submission behind an unreached Wait runs later, but a title buffer released in the meantime still frees its host copy at once. That gives the page fault in the last row. #575 (shadow::unregister releases behind the queue) or #609 is the missing half. On top of #431, #575 conflicts only in descriptor/host.rs (HostHeap::keep), where both defer the release, so they look combinable. That run is next; with it, #32 can be tested against #1317's H-6.14 without loop caps.

  2. On WARP, a compute program reads a constant buffer through the title's null descriptor.

    • With #568 + #334, GPU-based validation (VICTORY_D3D12_GBV=1) reports one message just before the removal: Dispatch, Descriptor type doesn't match shader register type: Descriptor Heap Index: [0], Descriptor Type in Heap: SRV, Register Type: CBV, pipeline [compute 0e45e59e93b736e4].
    • In its emitted DXIL, the program loads a dword from a raw buffer, uses it as a heap index, and reads a CBuffer handle from the heap at that index (createHandleFromHeap, annotated {13, 65536}).
    • At run time that index is 0, and heap slot 0 holds the title's null SRV ([heap 0: Shader(0, ...) -> null]). The program compares the index with 0 (icmp ne), but the cbufferLoadLegacy comes before any branch on it. The console code does the same, and there a null descriptor reads zeros.
    • On D3D12, a CBV handle over an SRV descriptor is undefined. WARP removes the device. The RX 9070 XT gets past it: row 4 runs 8 minutes, into the world.
    • I don't see this reported. It isn't covered by #568, which only fills empty table slots.
  3. #1317's hang pair also reproduces on AMD, once #568, #334 and #431 remove the earlier failures. It isn't NVIDIA-only.

Also from these runs: VICTORY_D3D12_DEBUG=0 and VICTORY_D3D12_GBV=0 turn the layers on at ffe310e (var_os(...).is_some()), as #615 describes. Worth knowing before passing =0 to switch them off.

AI-assisted (Claude Code, Claude Opus 5.5); no game data (shader hashes only, as in #293).

**@⁠ThomasSAMP** on GitHub · 2026-11-24 19:26 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7142099910) World load on an **RX 9070 XT (RDNA4)** and on WARP: what each stacked PR changes, from this issue's removal to #1317's hang. **Machine and tree.** Windows 11 Pro (build 26300), Ryzen 5 9600X, 32 GB, AMD Radeon RX 9070 XT, driver 32.0.32029.2010, own retail 1.0.2.1, Series X mode. Diagnostics builds of `ffe310e` with open PRs merged in order: #568 `cd6d559`, #334 `c99e429`, #431 `23ced70`, #32 `9c5328d`. Settings for every run: `VICTORY_D3D12_DRED=1`, `VICTORY_KEYS` Enter presses up to 2 min, no loop limit, no skipped pipelines. Times are from launch. The first run also went through the first-boot screens, the later ones did not. One run per row. | tree | adapter | how it ended | from launch | |---|---|---|---| | `ffe310e` (+ #1425, which only changes log text) | WARP | removed (`0x887A0005`) after a submission of 32 lists: mesh `f0c7efd2aceb2aaa` + pixel `7d85c9cab3c80721` reading a table entry `[heap 330192: null]`. The same pair and entry as reported here | 4 min 19 (incl. first boot) | | + #568 + #334 | WARP | this removal is gone. Loading goes on, then removed (`0x887A0005`) after a submission of 1 list of 60 compute dispatches. See below | 5 min 55 | | + #568 + #334 | RX 9070 XT | removed (`0x887A0006`) after 31 lists: DRED page fault **inside freed** host textures, 2048x1024, DXGI formats 98/99 (BC7), as in #557 and #772 | 2 min 19 | | + #568 + #334 + #431 | RX 9070 XT | **reaches the world**: 262,904 draws over frames 513–1024 (5,010 drawn), black frame. Then removed (`0x887A0006`) after 29 lists, with **mesh `04b9be3756e8f41c` + pixel `1af4a50c7fb40c97`** in flight. That is #1317's and #71's hang pair, here on RDNA4 | 8 min 02 | | + #568 + #334 + #431 + #32 | RX 9070 XT | removed (`0x887A0006`) after 22 lists: DRED page fault **inside a freed title buffer copy** (`title buffer ...+0x455d80`), with an indirect mesh draw (`f5804c93b00ea73e`) in flight | 2 min 33 | **Three things that are new as far as I can find:** 1. **#32 is not safe on its own.** With #32, a submission behind an unreached `Wait` runs later, but a title buffer released in the meantime still frees its host copy at once. That gives the page fault in the last row. #575 (`shadow::unregister` releases behind the queue) or #609 is the missing half. On top of #431, #575 conflicts only in `descriptor/host.rs` (`HostHeap::keep`), where both defer the release, so they look combinable. That run is next; with it, #32 can be tested against #1317's H-6.14 without loop caps. 2. **On WARP, a compute program reads a constant buffer through the title's null descriptor.** - With #568 + #334, GPU-based validation (`VICTORY_D3D12_GBV=1`) reports one message just before the removal: `Dispatch, Descriptor type doesn't match shader register type: Descriptor Heap Index: [0], Descriptor Type in Heap: SRV, Register Type: CBV`, pipeline `[compute 0e45e59e93b736e4]`. - In its emitted DXIL, the program loads a dword from a raw buffer, uses it as a heap index, and reads a `CBuffer` handle from the heap at that index (`createHandleFromHeap`, annotated `{13, 65536}`). - At run time that index is 0, and heap slot 0 holds the title's null SRV (`[heap 0: Shader(0, ...) -> null]`). The program compares the index with 0 (`icmp ne`), but the `cbufferLoadLegacy` comes before any branch on it. The console code does the same, and there a null descriptor reads zeros. - On D3D12, a CBV handle over an SRV descriptor is undefined. WARP removes the device. The RX 9070 XT gets past it: row 4 runs 8 minutes, into the world. - I don't see this reported. It isn't covered by #568, which only fills empty table slots. 3. **#1317's hang pair also reproduces on AMD**, once #568, #334 and #431 remove the earlier failures. It isn't NVIDIA-only. Also from these runs: `VICTORY_D3D12_DEBUG=0` and `VICTORY_D3D12_GBV=0` turn the layers **on** at `ffe310e` (`var_os(...).is_some()`), as #615 describes. Worth knowing before passing `=0` to switch them off. AI-assisted (Claude Code, Claude Opus 5.5); no game data (shader hashes only, as in #293).
Author
Owner

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

@⁠ThomasSAMP a very clear stack, thanks. On point 3, some data that may save a run: the same pair already turned up on AMD on #732.

  • AwkGrep256's RX 9070 XT (Linux, RADV) timed mesh 04b9be3756e8f41c + pixel 1af4a50c7fb40c97 at up to 497 ms per dispatch before the ring reset, with the pair in the failing list's last notes.
  • KenzoPortela (#778) found that the mesh program has no loops, and the pixel program has 7 back edges, nested. With the per-loop limit of 2^20, nested loops can run on and on when whatever should end them is never written.

So the cheap discriminator for your row 4 is VICTORY_SHADER_LOOP_LIMIT=1024 on the same tree. If it gets past the pair, it's those loops' exit condition, not the mesh side. Point 2 (a CBV handle over the title's null SRV, read before the branch that checks the index) looks new to me as well, and worth its own issue.

**@⁠Dufftwt** on GitHub · 2026-11-24 19:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7142117820) @⁠ThomasSAMP a very clear stack, thanks. On point 3, some data that may save a run: the same pair already turned up on AMD on #732. - AwkGrep256's RX 9070 XT (Linux, RADV) timed mesh `04b9be3756e8f41c` + pixel `1af4a50c7fb40c97` at up to 497 ms per dispatch before the ring reset, with the pair in the failing list's last notes. - KenzoPortela (#778) found that the mesh program has no loops, and the pixel program has 7 back edges, nested. With the per-loop limit of 2^20, nested loops can run on and on when whatever should end them is never written. So the cheap discriminator for your row 4 is `VICTORY_SHADER_LOOP_LIMIT=1024` on the same tree. If it gets past the pair, it's those loops' exit condition, not the mesh side. Point 2 (a CBV handle over the title's null SRV, read before the branch that checks the index) looks new to me as well, and worth its own issue.
Author
Owner

@⁠ThomasSAMP on GitHub · 2026-11-24 19:39 UTC · original

@⁠Dufftwt thanks. You're right on point 3: #732 had the pair on an RX 9070 XT under RADV already, so "first on RDNA4" was wrong. This is the same pair on Windows.

Your discriminator, run. Same tree as row 4 (ffe310e + #568 + #334 + #431), same machine and settings, plus VICTORY_SHADER_LOOP_LIMIT=1024. Its own shader cache entries, so cold translation:

pair first bound how it ended from launch
row 4, no limit frame 961 (+0 min) 0x887A0006, pair in flight 7 min after first bind (8 min 02)
limit 1024 frame 1211 (+0 min) no hang on the pair. 0x887A0006 8 min 45 after its first bind, on something else: a page fault at 0x1a939c000, with "no title memory copy below it", in a list that starts with dispatch 1x1x1 [compute 37e19ccb4f889f63] 9 min 38

So with the limit, the pair runs on without hanging, and the next failure is elsewhere. That points at the exit condition of the pixel program's nested loops, as you said, not at the mesh side. One run each; I haven't checked that the limit is what the pair actually hits.

Point 2 is now #1595.

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

**@⁠ThomasSAMP** on GitHub · 2026-11-24 19:39 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7142404940) @⁠Dufftwt thanks. You're right on point 3: #732 had the pair on an RX 9070 XT under RADV already, so "first on RDNA4" was wrong. This is the same pair on Windows. **Your discriminator, run.** Same tree as row 4 (`ffe310e` + #568 + #334 + #431), same machine and settings, plus `VICTORY_SHADER_LOOP_LIMIT=1024`. Its own shader cache entries, so cold translation: | | pair first bound | how it ended | from launch | |---|---|---|---| | row 4, no limit | frame 961 (+0 min) | `0x887A0006`, pair in flight | 7 min after first bind (8 min 02) | | limit 1024 | frame 1211 (+0 min) | **no hang on the pair**. `0x887A0006` 8 min 45 after its first bind, on something else: a page fault at `0x1a939c000`, with "no title memory copy below it", in a list that starts with `dispatch 1x1x1 [compute 37e19ccb4f889f63]` | 9 min 38 | So with the limit, the pair runs on without hanging, and the next failure is elsewhere. That points at the exit condition of the pixel program's nested loops, as you said, not at the mesh side. One run each; I haven't checked that the limit is what the pair actually hits. Point 2 is now #1595. AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Author
Owner

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

@⁠ThomasSAMP that's a clean result, thanks, and thanks for filing #1595. Hanging on NVIDIA and AMD alike points away from a driver, and toward what the loops read: a value that should end them and never arrives, or arrives too late. Two open changes make exactly that kind of value reach a shader, and neither is in your tree:

  • The #725 coherence fix: glc loads and stores become globallycoherent, so a loop polling memory another wave writes can see the write. It ended a compute loop hang on an RTX 5060 Ti. It's dpalacios69's fix/shader-glc-globally-coherent, also in test/world-stack.
  • fix/pipeline-sync-orders-shader-writes (Dufftwt/VIctory): the console's pipeline syncs did nothing on the host. So a draw could read what an earlier dispatch in the same list hadn't finished writing, such as a count its loops run to. With the fix, each sync records a UAV barrier.

One uncapped run of your row-4 tree with each, separately, would show which of them, if either, lets the pair finish. The new page fault in the 1x1x1 dispatch, with no title memory copy below the address, looks unrelated: an address the copy tables don't cover at all.

**@⁠Dufftwt** on GitHub · 2026-11-24 19:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7142423644) @⁠ThomasSAMP that's a clean result, thanks, and thanks for filing #1595. Hanging on NVIDIA and AMD alike points away from a driver, and toward what the loops read: a value that should end them and never arrives, or arrives too late. Two open changes make exactly that kind of value reach a shader, and neither is in your tree: - **The #725 coherence fix:** `glc` loads and stores become `globallycoherent`, so a loop polling memory another wave writes can see the write. It ended a compute loop hang on an RTX 5060 Ti. It's dpalacios69's `fix/shader-glc-globally-coherent`, also in `test/world-stack`. - **`fix/pipeline-sync-orders-shader-writes` (`Dufftwt/VIctory`):** the console's pipeline syncs did nothing on the host. So a draw could read what an earlier dispatch in the same list hadn't finished writing, such as a count its loops run to. With the fix, each sync records a UAV barrier. One uncapped run of your row-4 tree with each, separately, would show which of them, if either, lets the pair finish. The new page fault in the 1x1x1 dispatch, with no title memory copy below the address, looks unrelated: an address the copy tables don't cover at all.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:47 UTC · original · edited 2026-11-25 01:53 UTC

Automated triage for the maintainers.

This is a complete run report, with GPU, driver, OS, commit, steps and log lines. On the real GPU it is the world-load device removal tracked in #71, the oldest complete report (NVIDIA, 0x887A0006). Related reports raised in this thread: #619, #625, #778 (wave64 mesh programs on 32-lane hosts), #304 and #1317 (same wall on AMD), #1595 (WARP null SRV). The WARP removal in the menus is a separate limit: WARP offers 4-lane waves, so every translated compute program that declares 64-lane waves is refused, as the debug-layer comment above shows. WARP cannot stand in for a GPU in the world for now.

Answer to question 1: this is the known world-load failure, not a separate one. The DRED runs in this thread point at a list that never started (op 46) and at long-running nested loops. They do not point at an invalid command.

State of main:

  • #336 (dynamic descriptor exhaustion) is merged.
  • #1733 (commit 0601955, helper lanes in pixel-shader waterfall loops) was merged after the runs here.
  • #334 (buffer state transitions) is open and needs a rebase.
  • #568 (typed null descriptors) is closed.
  • The glc coherence change (#725) is not merged.

A retry on current main, with the same diag build and VICTORY_D3D12_DRED=1, would show whether the removal moved. Please post it on #71 rather than here, so the data stays in one place.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/653#issuecomment-7149961938) · edited 2026-11-25 01:53 UTC <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T19:40:12Z at=2026-11-25T01:47:34Z --> Automated triage for the maintainers. This is a complete run report, with GPU, driver, OS, commit, steps and log lines. On the real GPU it is the world-load device removal tracked in #71, the oldest complete report (NVIDIA, `0x887A0006`). Related reports raised in this thread: #619, #625, #778 (wave64 mesh programs on 32-lane hosts), #304 and #1317 (same wall on AMD), #1595 (WARP null SRV). The WARP removal in the menus is a separate limit: WARP offers 4-lane waves, so every translated compute program that declares 64-lane waves is refused, as the debug-layer comment above shows. WARP cannot stand in for a GPU in the world for now. Answer to question 1: this is the known world-load failure, not a separate one. The DRED runs in this thread point at a list that never started (op 46) and at long-running nested loops. They do not point at an invalid command. State of `main`: - #336 (dynamic descriptor exhaustion) is merged. - #1733 (commit `0601955`, helper lanes in pixel-shader waterfall loops) was merged after the runs here. - #334 (buffer state transitions) is open and needs a rebase. - #568 (typed null descriptors) is closed. - The `glc` coherence change (#725) is not merged. A retry on current `main`, with the same diag build and `VICTORY_D3D12_DRED=1`, would show whether the removal moved. Please post it on #71 rather than here, so the data stays in one place. --- _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#653
No description provided.