D3D12.X: snapshot queue progress before a presentation stall aborts #1189
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1189
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1189"
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?
@rison1337 on GitHub · 2026-11-24 13:01 UTC · original
rison1337:codex/stall-snapshot→main· +312 −0 · 8 files · 1 commits · openA title can stop presenting and abort through its watchdog before device removal provides a useful report. Add opt-in
XCL_STALL_SECONDS=8snapshots of submission stages, existing allocator fence progress and unfinished pipeline jobs. Part of #505.What is in it
Tested
cargo build --locked --release --workspace --target x86_64-pc-windows-msvc -j4succeeded.cargo test --locked --release --workspace --target x86_64-pc-windows-msvc -j4 --no-fail-fast -- --test-threads=4 --nocapture: 746 passed, 0 failed, 41 ignored. Four bodies reported SKIPPED: two wave64 checks and two requiring the absent D3D12 debug layer (these returns are included in Cargo's passed count).XCL_STALL_SECONDS=8.Regression run
Main:
This commit:
Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 13:25 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
cargo test -p xcl --lib stall: 7 passed, 0 failed — includes the newstall::tests(snapshots_wait_for_the_first_frame_and_are_bounded_until_progress,stall_timeout_is_opt_in_and_bounded,nested_submissions_restore_the_outer_stage_and_busy_tracking_is_skipped) plus the pso_async diagnostic test.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@Gevroska on GitHub · 2026-11-24 17:02 UTC · original
I tested the queue-progress sampler during GTA VI world loading on Windows 11 with an RTX 3080. The two runs gave different results.
On a local integration of #1189 over
930e8b4, the sampler captured three snapshots roughly 8, 16 and 24 seconds after frames stopped appearing. In all three, each of the five sampled fences had a completed value equal to its submitted value. Those values stayed unchanged across snapshots. This narrows the observation to the tracked fences. Other GPU work could still have been outstanding.On
b7aa9f3, the clean control reached a black screen and then a guest access violation about 30 seconds after the last recorded presentation activity. With #1189 integrated locally at26dbf855, the run ended earlier withDXGI_ERROR_DEVICE_HUNG(0x887A0006), before the first eight-second stall snapshot. The 15 focused tests passed, and the synthetic title exited successfully.The sampler produced useful fence data on the earlier base. The newer run never reached the control’s stall, so it leaves queue progress during that interval unresolved. With one run per build and a shared driver cache, I can’t attribute the device hang to the sampler.
AI use: I used OpenAI Codex with GPT‑6.2 Sol to integrate the diagnostic, run the synthetic checks and offline game replays, and analyze the logs. A separate GPT‑6.2 Sol agent at high reasoning reviewed the source integration. GPT‑6.1 Terra agents at medium reasoning checked upstream overlap and independently reviewed the saved results. The independent result reviews used the recorded evidence and did not rerun the game.
@Alm0stSurely on GitHub · 2026-11-24 21:36 UTC · original · edited 2026-11-24 22:33 UTC
Linux/Proton world-loading result on RTX 5080. The sampler captured three snapshots after the last shown frame on a local integration of
099d94b8be6a485842efd6f4fbfacbdc4619ef10over mainc4d37bec1bb4286eb373aea963404a23f13401fa. In the one overlapping submission hook we retained main's scratch-copy bookkeeping immediately before the allocator-marker stage.At 8.0, 16.0 and 24.0 seconds without a new frame the count remained 1,378. Both observed queue submission calls had returned. The allocator tracker covered one of those queues: 2,784 submitted / 2,784 completed in all three snapshots. The other queue had no allocator-fence row. Five compute pipeline jobs were sampled unfinished each time. The last nonzero submission interval included 12 submits and zero presents. At the 240 s runtime limit the separate shutdown check still reported pending GPU fences after its 10 s wait. That check uses fresh fences; its warning does not identify the queue.
The stock-main control and the diagnostic run both reached illustrated story loading and then black. One run per configuration. This confirms the snapshots work during this stall under Proton and shows why reporting the scope of the fence tracker matters.
EndeavourOS, Ryzen 9 9950X3D, RTX 5080, NVIDIA 620.73.04, 60 GiB usable RAM. Proton Experimental, vkd3d-proton
4522cc1/ dxil-spirv53aac418with the previously reported dominance performance patch.xcl.exe run <title.exe>,XCL_DIRECT_DXIL=1,XCL_RUN_SECONDS=240,XCL_PSO_TRACE=1,XCL_ACTIVITY=1; diagnostic run addedXCL_STALL_SECONDS=8and a vkd3d queue profile. Separate private copies of the same starting cache and 45 history keys. Exit 0 after the time limit.Test integration and analysis assisted by Codex (GPT-6.2 Astra).
Short control on stock main, same Proton setup. We set
XCL_RUN_SECONDS=30and started with another private copy of the same cache. The final three full 2 s samples, ending at 24.022, 26.023 and 28.024 s, each recorded 60 presents. XCL stopped the title at 30.001 s; at 40.039 s it emitted the same pending-fences warning, then Proton exited 0. Therefore the shutdown warning alone cannot distinguish this presenting run from the black-screen run. In this revisionend_titleattempts to suspend the other process threads before signalling the newly created drain fences. We did not measure which driver threads were suspended.Follow-up on main
689f2db477c3c062cf162649781640ef8a977c18, with local command-list tracing, HLSL (XCL_DIRECT_DXIL=0), warm cache, same Proton/RTX 5080 setup and a 240 s cap. Illustrated loading was visible, then black at 105 and 240 s. The last traced PresentX was at 88.454 s. We tracked successful resets so the same backing-list address could be distinguished across recordings. Of 17 recordings with a wrapped DrawInstanced or DrawIndexedInstanced after that PresentX, four closed successfully and reached native queue submission. Twelve closed successfully but had no subsequent matching resolved queue input or native submission before the cap. One had no observed close after its last draw. The last native submission marker was at 142.675 s. The resolved-input marker is after texture refresh and list expansion. This narrows where to trace handoff for that cohort; GPU completion and which lists are required for the next frame remain open. Local investigation assisted by Codex (GPT-6.2 Astra).Raw-input follow-up, same main and HLSL configuration, separate 240 s run. We logged each list argument before texture refresh or segment expansion, and both the title wrapper and native segment at successful Close. After the last PresentX at 86.745 s there were 18 recordings containing a tracked draw. Seven wrappers appeared in the raw arguments and their segments reached native submission. Nine recordings closed successfully, but neither the wrapper nor the native pointer appeared in the raw arguments again during that recording; no native submission was observed for them. Two recordings had no observed Close after their last draw. Across 6,188 nonempty queue calls, every call ID reached the resolved-input marker. The nine were therefore already absent at the measured API boundary. Whether the title needed them for the next frame remains open. The last native submission was at 226.391 s, with the display still black at 240 s. Local investigation assisted by Codex (GPT-6.2 Astra).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.