Fix RDNA 4 amdxc64.dll shader compiler crash and 30s GPU watchdog stalls #7
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!7
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@manoel0810 on GitHub · 2026-11-25 16:58 UTC · original
manoel0810:fix/crash-investigation→main· +240 −16 · 4 files · 3 commits · openSummary
Fixes two distinct crash classes encountered on AMD RDNA 4 (tested on Windows 11 / AMD Radeon RX 9060 XT, Series X target, both standard and
--rtmodes):1. Root-cause fix for
amdxc64.dll+0x861b9f(0xc0000005, read0x8) — related to #2 (c238ae5)CreateComputePipelineStatecrashed insideamdxc64.dll(8.18.10.0514,+0x861b9f,mov rdi, [rcx+8]withrcx = 0) on background pipeline workers (victory-pipelines-*), reproducibly triggered byCS_RaytracingResolveshadera1266cc7391ae0d6.crates/victory-shader/src/emit/bitcode/opt.rs,dx.op.createHandleFromHeapanddx.op.annotateHandlewere classified asEffect::Pure. This allowed the dominator-tree CSE pass (REUSE) to shareannotateHandle(createHandleFromHeap(...))values across basic blocks / control-flow boundaries, triggering the null dereference in AMD's RDNA 4 DXIL compiler.createHandleFromHeapandannotateHandleasEffect::Lanesineffect(), preventing cross-block CSE while preserving intra-block deduplication (LOADS) and dead-code elimination (DEAD).crashed.txtso it never runs), this fixes the emitted DXIL pattern at the root soa1266cc7391ae0d6and similar shaders validate, compile cleanly, and execute normally with zero driver exceptions.emit::bitcode::opt::tests::heap_handles_are_not_reused_across_blocks.2. Prevent 30 s title GPU watchdog crashes on heavy
--rt/ world-load frames (27d8c36,3ac8713)victory-image-...dll+0x23cf683/+0x2215c35, intentional write to0x0) terminated runs during cold world-load /--rtframes.pipeline::make::wait()granted two independent 12 s budgets per frame (graphics+compute= up to 24 s) keyed byframe::current()rather than actual wall-clock time since the last completedPresent, leaving insufficient headroom for preparation, copies, and GPU work.pipeline::builder_runs()called synchronousmake::now()on the title's recording thread and launched all 52 BVH structure-builder dispatches even on a first world frame that had already spent >10 s allocating and refreshing shadow buffers.LAST_PRESENT_MSincrates/victory-gpu/src/queue.rs(since_last_present()) and cap combined pipeline waits incrates/victory-gpu/src/pipeline/make.rsatWATCHDOG_WAIT_CEILING = 10ssince the last completedPresent(explicitVICTORY_PIPELINE_WAIT_MSoverrides are still respected).make::poll()and updatepipeline::builder_runs()to queue missing builder pipelines asynchronously and apply a strict all-or-none per-frame deferral (Builder::frame_decision) when a frame has already exceededWATCHDOG_WAIT_CEILINGsince the lastPresent.pipeline::make::loading_tests::watchdog_cap_stops_pipeline_waits_past_present_ceilingandpipeline::make::tests::poll_queues_without_blocking_and_reports_completion.Verification
a1266cc7391ae0d6.container):victory translate --validate --pipelineschanged from0xc0000005to1 validated, 1 pipelines(exit=0).cargo test --locked -p victory-shader: 234 passed, 0 failed.cargo test --locked -p victory-gpu pipeline::make: 9 passed, 0 failed.--rtmodes): passed all early pipelines (1,203loaded/made), survived the first heavy world-load frame in--rtmode, and eliminated bothamdxc64.dll+0x861b9fand the 30 s GPU watchdog crashes.@h0useadv on GitHub · 2026-11-25 16:59 UTC · original
An independent report from an RX 9070 XT (RDNA4, driver 32.0.32029.2010, Windows 11), on
main921d8d3without this PR. It's the same crash, a second shader that triggers it, and a switch that already avoids it.Crash.
0xc0000005atamdxc64.dll+0x861b9f(read0x8) onvictory-pipelines-7, about 70 s after the world's first frame. To find the shader, I ran each compute program translated in the last second before the crash alone throughVICTORY_TRANSLATE_ONLY=<hash> victory translate --pipelines --list --jobs 1 shaders.rpf, one process each:501f0865fdf45dfd(ped_standard_lod_muv_cutout:CS_RaytracingResolve_b1139868_Wrapped)0xC0000005, same offset (Windows' crash record)CS_RaytracingResolveprograms (b2ff2ef0…,2bf91065…,476446ed…,2582aab1…,e5742545…,4c573a76…,2cc6decf…)translate --validatepasses501f0865fdf45dfdwith the SDK'sdxil.dll(10.0.26100), so the input is valid DXIL and the crash is in AMD's compiler. This is a different hash from youra1266cc7391ae0d6, from the same family. If it helps, I can run the same one-shader check with this branch.Switch that already avoids it. With
VICTORY_RT_RESOLVE=0(pipeline/make.rs,without_structures), none of the ~1,000CS_RaytracingResolveprograms get built while the structure builder is off. With it, the same save got past the 70 s point and ran about 2 minutes of the world without a compiler crash. Since these programs have nothing to shade without the builder, and each costs AMD's compiler 5–9 s (the code comment's figure), setting it invictory-playwhen--rtisn't given could be a cheap safety net on RDNA4 next to this fix.World frame time on RX 9070 XT, Ryzen 7 7800X3D (default renderer,
VICTORY_GPU_TIMING=1, frame lines after the first heavy frames):In the copy-back, shader-written ranges compared only ~31 MB per frame (0.9 ms finding the 246 differing pieces, 2.4 ms putting them back). One range,
0x22360000+0xae00000, was compared 2×/frame, ~365 MB/frame, with ~1 MB of it written back.What ended that run (separate from this PR): about 3 min after the world's first frame, the GPU page-faulted at
0x23a3000("no title memory copy below it"),a list stopped at command 409 of 2856 (op 5),indirect kind 2 max 1 … [compute fc5e66f8f873d3bb], device removed0x887A0005. ztrx hit the same pattern on this card with another program (indirect kind 2,compute 0452fc2d2e2fc4c3, Zettrox/ztrx#81), so it's probably shared code from upstream.AI-assisted (Claude Code). I ran everything on my own machine with my own copy. Only hashes and the runtime's log lines here, no game data or captures.
@Artking175 on GitHub · 2026-11-25 18:35 UTC · original
Independent Windows 10 / RTX 2060 data point for the PSO-wait part of this PR. GU runs Windows 10 22H2 (19045), NVIDIA 531.41, Rust 1.98.1 MSVC. On an earlier game run at
921d8d3, the default wait coincided with 12–25 s frames during world entry.I found a separate loading-allowance accounting issue on
main(2e01ab4), inpipeline::make. The current charge is calculated per waiter. With a 500 ms base, three sequential waits of 400 + 400 + 200 ms consume 500 ms of loading allowance for the frame, but each individual wait charges zero. Two simultaneous 800 ms waits can charge 600 ms even though the shared window spent only 300 ms beyond the base.My local follow-up charges the excess from cumulative per-frame waiting. In the default shared-window mode, overlapping waits count once. That accounting is separate from the cap since last
Presentin this PR.cargo test --locked -p victory-gpu --lib pipeline::make -- --test-threads=1onmainplus the local change yielded 10 passed, including two new regressions for those cases.cargo test --locked -p victory-gpu --lib -- --test-threads=1yielded 187 passed on cleanmainand 189 with the change. Both runs had the samedepth_bounds_pipeline_loads_and_filters_drawsfailure (0x80070057creating the root signature) and three ignored tests.I have not run this PR's head or measured a gameplay FPS change from the accounting patch.
@molodayamama on GitHub · 2026-11-25 18:53 UTC · original
Cross-vendor regression check on NVIDIA GeForce RTX 4060 8 GB (wave32) / AMD Ryzen 5 5600 / Windows 10 22H2 (
19045.5794) / Rust1.98.1(x86_64-pc-windows-msvc):main(2e01ab4)cargo test --locked -p xtask: 4 passed, 0 failed (191 files ok)cargo clippy --workspace --all-targets --locked -- -D warnings(default &--all-features): 0 warningsmain+ Agility SDK1.614.1via #12 for Windows 10 SM 6.6; no game files):emit::bitcode::opt::tests::heap_handles_are_not_reused_across_blocks: passedemit::wave64_tests: 7 passed, 0 failedemit::intersect_tests::the_64_bit_node_test_over_title_memory_matches_the_reference_on_the_card: passed (0.87s)cargo test --locked -p victory-gpu --lib: 190 passed, 0 failed (including both newpipeline::makewatchdog-cap andpollregression tests)No regressions observed on NVIDIA wave32 or BVH traversal from the
Effect::LanesCSE change.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.