D3D12.X: record ordered pipeline first use #3175

Merged
bmjask merged 1 commit from upstream-pr/3175 into main 2026-11-28 16:12:27 +00:00
bmjask commented 2026-11-28 16:07:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-28T16:07:13Z.


Part of #2088. This brings the ordered first-use diagnostics from #2096 onto current main, after the pipeline-library migration in #3100. It records opt-in, append-as-events-happen evidence so pipeline preparation can be selected from measured startup use rather than title-specific guesses. Recording does not build, reorder, or skip pipelines.

Supersedes #2096; credit to @ettehn for the original manifest design and implementation.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_manifest.rs: write ordered first-use, driver-build, and present-milestone events when XCL_PSO_MANIFEST=1, with concurrency and format tests
  • crates/xcl/src/hle/d3d12x/pso_async.rs and real.rs: report first use, cache state, driver time, and compile-slot wait time
  • crates/xcl/src/hle/d3d12x/present.rs: report sparse present milestones

Tested

  • Windows 11 Pro; Intel Core i9-12900K; NVIDIA GeForce RTX 4090 driver 610.88; Rust 1.100.0; debug workspace tests and release smoke builds
  • cargo test -p xcl --lib pso_manifest -- --test-threads=1: 3 passed, 0 failed
  • cargo build --workspace: passed
  • cargo test --workspace -- --test-threads=4: 2145 passed, 0 failed, 48 ignored; 26 runtime GPU skips (wave64 unavailable, unsupported instruction cases, missing dxil.dll, and heap windows unavailable)
  • The smoke comparison used the same read-only title view and XCL_PREPARE=0 so an unrelated full corpus preparation did not gate the 60-second runtime capture.

Regression run
Main (bb9a6b4bfc7632b09f3a633e983c86cd72b0fa8f):

xcl-smoke v1
commit: bb9a6b4bfc7632b09f3a633e983c86cd72b0fa8f
gpu: NVIDIA GeForce RTX 4090
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1480 (PresentX 1480)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14843 MB

This PR (59cd71e68829f2f3f64dc336e3fbff813682a1e6):

xcl-smoke v1
commit: 59cd71e68829f2f3f64dc336e3fbff813682a1e6
gpu: NVIDIA GeForce RTX 4090
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1436 (PresentX 1436)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 14948 MB

Not tested

  • AMD or Intel GPUs
  • A long retail-title capture with XCL_PSO_MANIFEST=1; event formatting and first-use ordering are covered by unit tests, while the regression smoke kept the opt-in recorder disabled
  • The current use key identifies XCL's shader-set pipeline object, not every canonical fixed-function PSO derivative; canonical identity is a separate follow-up

AI use
Codex with GPT-5 adapted the existing #2096 implementation to current main, resolved conflicts after #3100, wrote/updated tests, ran the reported builds and tests, and prepared this PR.

<!-- greyfinch-sync:ivall/xcl:issue:5542085680 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3175). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-28T16:07:13Z. --- Part of #2088. This brings the ordered first-use diagnostics from #2096 onto current `main`, after the pipeline-library migration in #3100. It records opt-in, append-as-events-happen evidence so pipeline preparation can be selected from measured startup use rather than title-specific guesses. Recording does not build, reorder, or skip pipelines. Supersedes #2096; credit to @ettehn for the original manifest design and implementation. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_manifest.rs`: write ordered first-use, driver-build, and present-milestone events when `XCL_PSO_MANIFEST=1`, with concurrency and format tests - `crates/xcl/src/hle/d3d12x/pso_async.rs` and `real.rs`: report first use, cache state, driver time, and compile-slot wait time - `crates/xcl/src/hle/d3d12x/present.rs`: report sparse present milestones **Tested** - Windows 11 Pro; Intel Core i9-12900K; NVIDIA GeForce RTX 4090 driver 610.88; Rust 1.100.0; debug workspace tests and release smoke builds - `cargo test -p xcl --lib pso_manifest -- --test-threads=1`: 3 passed, 0 failed - `cargo build --workspace`: passed - `cargo test --workspace -- --test-threads=4`: 2145 passed, 0 failed, 48 ignored; 26 runtime GPU skips (wave64 unavailable, unsupported instruction cases, missing `dxil.dll`, and heap windows unavailable) - The smoke comparison used the same read-only title view and `XCL_PREPARE=0` so an unrelated full corpus preparation did not gate the 60-second runtime capture. **Regression run** Main (`bb9a6b4bfc7632b09f3a633e983c86cd72b0fa8f`): ``` xcl-smoke v1 commit: bb9a6b4bfc7632b09f3a633e983c86cd72b0fa8f gpu: NVIDIA GeForce RTX 4090 title: retail-title seconds: 60 exit: 0x0 frames shown: 1480 (PresentX 1480) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14843 MB ``` This PR (`59cd71e68829f2f3f64dc336e3fbff813682a1e6`): ``` xcl-smoke v1 commit: 59cd71e68829f2f3f64dc336e3fbff813682a1e6 gpu: NVIDIA GeForce RTX 4090 title: retail-title seconds: 60 exit: 0x0 frames shown: 1436 (PresentX 1436) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 14948 MB ``` **Not tested** - AMD or Intel GPUs - A long retail-title capture with `XCL_PSO_MANIFEST=1`; event formatting and first-use ordering are covered by unit tests, while the regression smoke kept the opt-in recorder disabled - The current `use` key identifies XCL's shader-set pipeline object, not every canonical fixed-function PSO derivative; canonical identity is a separate follow-up **AI use** Codex with GPT-5 adapted the existing #2096 implementation to current `main`, resolved conflicts after #3100, wrote/updated tests, ran the reported builds and tests, and prepared this PR.
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!3175
No description provided.