D3D12.X: snapshot queue progress before a presentation stall aborts #1179

Closed
github-bot wants to merge 1 commit from gh-pr/1179/head into gh-pr/1179/base
Owner

@⁠rison1337 on GitHub · 2026-11-24 12:53 UTC · original
rison1337:codex/stall-snapshot → main · +312 −0 · 8 files · 1 commits · closed without merging

A title can stop presenting and abort through its watchdog before device removal provides a useful report. Add opt-in XCL_STALL_SECONDS=8 snapshots of submission stages, existing allocator fence progress and unfinished pipeline jobs. Part of #505.

What is in it

  • A bounded monitor with non-blocking tracker reads: up to three reports per pause, rearmed by a new shown frame. Recorded list/PSO pairs are labelled as metadata, not the GPU's current instruction. No added GPU signals or waits.
  • README usage and five controls for timeout/rearming, nested submissions, busy trackers, pipeline job states and a real GPU queue held at a fence then released.

Tested

  • RTX 4060 8 GB, driver 32.0.16.2101; Ryzen 5 7500F; Windows 11 26300; Rust 1.100.0, x86_64-pc-windows-msvc; release, DXC 1.9.2609.5.
  • cargo build --locked --release --workspace --target x86_64-pc-windows-msvc -j4 succeeded.
  • 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).
  • Both 60 s title runs below used no input; the PR run enabled XCL_STALL_SECONDS=8.

Regression run
Main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 4060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1472 (PresentX 1472)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14636 MB

This commit:

xcl-smoke v1
commit: 099d94b8be6a485842efd6f4fbfacbdc4619ef10
gpu: NVIDIA GeForce RTX 4060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1418 (PresentX 1419)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14686 MB

Not tested

  • AMD, Intel, native wave64, or the D3D12 debug layer. Sample-dependent tests ran without XCL_SAMPLE_* inputs.
  • Diagnosis of the retail world-loading hang: this comparison stays at the first-run screens. No claim that the snapshots fix that hang or establish which instruction the GPU is executing.

AI use

  • OpenAI Codex (exact model identifier unavailable in this session) wrote the implementation, tests and description, and ran the commands above on the named machine. The user requested this work and the PR.
**@⁠rison1337** on GitHub · 2026-11-24 12:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1179) `rison1337:codex/stall-snapshot` → `main` · +312 −0 · 8 files · 1 commits · closed without merging A title can stop presenting and abort through its watchdog before device removal provides a useful report. Add opt-in `XCL_STALL_SECONDS=8` snapshots of submission stages, existing allocator fence progress and unfinished pipeline jobs. Part of #505. **What is in it** - A bounded monitor with non-blocking tracker reads: up to three reports per pause, rearmed by a new shown frame. Recorded list/PSO pairs are labelled as metadata, not the GPU's current instruction. No added GPU signals or waits. - README usage and five controls for timeout/rearming, nested submissions, busy trackers, pipeline job states and a real GPU queue held at a fence then released. **Tested** - RTX 4060 8 GB, driver 32.0.16.2101; Ryzen 5 7500F; Windows 11 26300; Rust 1.100.0, x86_64-pc-windows-msvc; release, DXC 1.9.2609.5. - `cargo build --locked --release --workspace --target x86_64-pc-windows-msvc -j4` succeeded. - `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). - Both 60 s title runs below used no input; the PR run enabled `XCL_STALL_SECONDS=8`. **Regression run** Main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 4060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1472 (PresentX 1472) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14636 MB ``` This commit: ``` xcl-smoke v1 commit: 099d94b8be6a485842efd6f4fbfacbdc4619ef10 gpu: NVIDIA GeForce RTX 4060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1418 (PresentX 1419) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14686 MB ``` **Not tested** - AMD, Intel, native wave64, or the D3D12 debug layer. Sample-dependent tests ran without XCL_SAMPLE_* inputs. - Diagnosis of the retail world-loading hang: this comparison stays at the first-run screens. No claim that the snapshots fix that hang or establish which instruction the GPU is executing. **AI use** - OpenAI Codex (exact model identifier unavailable in this session) wrote the implementation, tests and description, and ran the commands above on the named machine. The user requested this work and the PR.
Opt-in XCL_STALL_SECONDS samples submission stages and the existing allocator
fences before a title watchdog ends the process. Busy trackers are skipped;
no GPU wait or signal is added. Bound the records and repeated snapshots,
and distinguish queued pipeline jobs from jobs already taken by a worker.

Assisted-by: OpenAI Codex (exact model identifier unavailable)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:46:12 +00:00
github-bot closed this pull request 2026-11-26 04:46:12 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.