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

Closed
rison1337 wants to merge 1 commit from upstream-pr/1179 into main
rison1337 commented 2026-11-24 12:53:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by rison1337 on 2026-11-24T12:53:49Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6582232409 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1179). Originally posted by [rison1337](https://github.com/rison1337) on 2026-11-24T12:53:49Z. --- 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.
upstream-sync closed this pull request 2026-11-24 13:03:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!1170
No description provided.