Repository navigation
Conversation
A draw whose table starts at a title slot the capped host heap does not have, and that was not made afresh, got the title's offset as its user data; the shader then indexed ResourceDescriptorHeap past the heap's end. On NVIDIA that reads garbage descriptors and the device hangs (#71). In three DRED reports from an RTX 4060 Ti, 13 of 14, 22 of 29 and 20 of 29 of the tables the unfinished draws bound start past slot 1,000,000 (the title's per-draw tables sit at its heap's top, around 1.2 million). Such tables are made afresh, but when that fails (no free dynamic slot: the 65,536 of a capped heap run out seconds into the world; or entries reaching past the title heap's end) the draw fell back to the title's offset. The draw or dispatch is dropped instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Verified on Windows 11 D3D12 (WARP):
- All 43 \�ictory-gpu\ tests pass, clippy clean.
- The fix correctly prevents device hangs on NVIDIA by dropping draws/dispatches whose table offsets exceed the capped host heap (1,000,000 descriptors), instead of letting shaders index past the heap end and read garbage descriptors.
- \�ind()\ returning \�ool\ cleanly propagates through \prepare, \dispatch, and indirect execution.
- \past_host_heap()\ check is scoped to the specific slot, only drops when necessary.
- Asset policy passes (151 files ok).
|
Tested on top of Result: this change does not trigger on this host and the crash is unchanged.
Timeline of the run: menus at 30 fps; world entry; 0.7-0.9 fps at 500-2400 draws/frame with 390-590 pipelines being made and 800-2700 indirect; So on this GPU/driver the failing table does not sit past the host heap - it cannot be created at all because the dynamic slot pool is already full. The diagnostics in Details and the full counters: #597 (comment) No game data in this report: counts, driver version and error strings only. AI-assisted: written by DeepSeek (OpenCode harness) from my run logs and observations; the hardware, the dump and the runs are mine. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested a8be528 on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 43 passed, and with --features diagnostics 45 passed. Clippy's 1 warning is the existing one in host.rs.
- This is the CPU-side check that a heap bound needs.
past_host_heapcompares the table's title index against the host heap the draw actually binds (host.count()). So it catches exactly the slots a capped heap left out, whatever the cap is, and drops the draw with a one-time log instead of handing the shader an offset past the end. bindreturningbool, with every caller honouring it (draw, dispatch, the mesh/compute path), keeps a dropped table from leaving a half-bound root signature behind.
AI-assisted (Claude Code).
…et past the host heap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heap # Conflicts: # crates/victory-gpu/src/draw.rs
|
Tested #550 (head 8560817, on top of main ffe310e) combined with #175 (Agility SDK, needed on Windows 10 for SM 6.6). One run, diagnostics build, Host: RTX 5060 Ti, Windows 10 22H2. Measured
Not established
So on this card, in this run, the #550 guard did not trigger and the device was still removed. The guard result agrees with the AMD report above; the failure pattern differs (n=12 well before the removal, 30 lists, vs n=133 right before it, 1 list), and I have no baseline to say the crash is unchanged. AI-assisted (Claude Code). |
…sak#550) On NVIDIA the shader-visible view heap is capped at 1,000,000 descriptors while the title's is 1,245,184, so title slots past the cap ('title slot past the host heap') have no host slot. When a table there could not be made afresh, the draw fell back to the title's offset and the shader read past the heap's end: garbage descriptors, then device hang. Dropping that draw trades a removed device for one missing draw. Merged with the root-view size bound (Marvisak#650) in State::bind: both fallbacks kept. No unit test upstream: the path needs a bound heap on a live device. Targets symptom 1 (title slot past the host heap). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…heap runs short (PR Marvisak#688) A capped view heap (NVIDIA, 1,000,000) keeps only MIN_DYNAMIC slots past the title's for tables made afresh per draw. A list holds its slots until the title resets it; when the pool runs dry mid-frame the draws fell back to a title offset (now: dropped by Marvisak#550). The lease lets a draw reclaim slots from lists whose submissions already ran. Conflict was only the tests module (both sides added tests): both kept. Upstream adds its own unit tests (lease.rs, heap capacity tests). Targets symptoms 1 and 2 (draws lost once the dynamic range runs out). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Confirming the diagnosis with numbers from a Linux/RADV run (Mesa 26.3.1, RX 7600 XT, Wine 11.22 on a Proton prefix):
So on this title it is not a rare edge: a quarter of the view heap is outside the mirror, and the title writes all of it at start-up. Dropping the tail is what shows up as the checkerboard/stripe artifacts while the loading screen is up. Nothing needed from you, just the data point. |
…ied together Merges Marvisak#72 Marvisak#347 Marvisak#1000 Marvisak#358 Marvisak#352 Marvisak#626 Marvisak#1152 Marvisak#1129 Marvisak#1203 Marvisak#24 Marvisak#642 Marvisak#427 Marvisak#485 Marvisak#550 Marvisak#174 Marvisak#1279 onto main (ffe310e), each head unchanged, no conflicts. One change of mine: three of the PRs each add a `mod tests` at the end of pipeline/host.rs, so the merge defines `tests` three times (E0428). The second and third are named `library_tests` and `blend_tests`; nothing else changes. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (367 passed, 6 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
draw.rs keeps both the breadcrumb user-data arm (Marvisak#1081) and the past-host-heap drop (Marvisak#550). indirect.rs takes the bundle's Wine-compiler clamp (Marvisak#1279), the same fix Marvisak#994 carried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
On NVIDIA the shader-visible view heap is capped at 1,000,000 descriptors (
CreateDescriptorHeapfails above it; the RTX 4060 Ti also reportsMaxViewDescriptorHeapSize= 1,000,000), while Grand Theft Auto VI asks for 1,245,184.HostHeap::newthen mirrors the title's first slots one to one and leaves the rest out, so title slots past the cap have no host slot.Tables that reach past the cap are made afresh (
State::tables), but when that fails — no free dynamic slot (the 65,536 of a capped heap run out seconds into the world), or the table's entries reach past the title heap's end — the draw fell back to the title's offset as its user data. The shader then indexedResourceDescriptorHeappast the end of the host heap, read garbage descriptors, and the device hung (DXGI_ERROR_DEVICE_HUNG, the world hang in #71).DRED evidence from three hangs on an RTX 4060 Ti: 13 of 14, 22 of 29 and 20 of 29 of the tables bound by the unfinished draws started past slot 1,000,000 (the title's per-draw tables sit at the top of its heap, around 1.2 million).
This change drops such a draw or dispatch (warned once) instead of giving the shader an offset past the heap: a missing draw instead of a removed device. Since #336,
State::bindreturns whether the draw may run and its callers skip it when it may not; this adds the past-heap case there. It does not make those draws render; that needs the title's slots past the cap to be remapped (the existingshortcut:inHostHeap::new).Relates to #71.
Tested
cargo build --profile diag -p victory --features diagnostics,VICTORY_D3D12_DRED=1andVICTORY_NO_WATCHDOG=1(Loader: opt-in VICTORY_NO_WATCHDOG hook for the title's watchdog (build 1.0.2.1) #454). Before this change every world run hung the device 30 to 90 s after the first mesh draws. After it, two runs of several minutes each reached the world's first frames with no device hung and no DRED report.cargo test --workspace(264 passed, 0 failed),cargo clippy --workspace --all-targets(no new warnings; the one left,host.rs:267unsafe block without a safety comment, is on main too),cargo xtask policy(151 files ok).cargo fmt --checkreports differences that are already on main (fmt: Format all files #502 reformats them); this change adds none. After merging main @ffe310e (to resolve the conflict with GPU: drop draws whose fresh tables cannot be made; 2^18 dynamic slots #336):cargo test -p victory-gpu50 passed, 0 failed;cargo clippy -p victory-gpu --all-targetsno warnings. Not run in game on main alone: main does not reach the world on NVIDIA without the wave64 PRs.Checklist
cargo fmt,cargo clippy --workspace --all-targetsandcargo test --workspacepass (fmt and clippy: only what main already reports, see above).cargo xtask policypasses. The change adds no game files or data taken from them (docs/asset-policy.md).The change, the investigation of the DRED reports and this description were written with Claude Code (Claude Opus 5.5) and tested on the machine above.
🤖 Generated with Claude Code