nvidia-dev: graphics startup replay omits two-pass mesh pipeline streams #2760

Open
opened 2026-11-26 11:14:55 +00:00 by github-bot · 1 comment
Owner

@⁠BBareth on GitHub · 2026-11-26 10:26 UTC · original

Part of #2088. Related to the NVIDIA stall in #2595. #2741 tracks the analogous split-compute whole-form path.

What happens

On nvidia-dev, graphics startup preparation replays the saved D3D12_GRAPHICS_PIPELINE_STATE_DESC records. OwnedDesc::record returns no record for OwnedDesc::Stream, including the two-pass mesh path. The startup worker consumes only the saved graphics records. Recording · Replay · Mesh PSO build

Measured on Windows

RTX 5070 Ti, driver 621.24, i7-12700K, 32 GB RAM, Windows 11 25H2 build 26200.9168, Rust 1.95.0 MSVC, DXC 1.9.2609.5. Release nvidia-dev at af2cecc40886a8682ecf3267f5328c6dc4b66ad7 with only #253's stack-dump patch (f67e35ae) applied. Both runs used the same retail workload and starting XCL cache snapshot, direct DXIL, and a 180-second title timer. Windows' implicit driver cache was shared across runs.

  • Control, preparation off: 1,870 presents. The 100 s and 120 s dumps show title threads in execute_indirect → resolve_wait_for → Wait::until_done. In the same stall, a title thread spent 12.551 s compiling a 503,332 B passthrough mesh graphics PSO.
  • Graphics history prepared: replayed the control's graphics history with generic shader preparation skipped (XCL_PREPARE_WORKERS=1 XCL_PRECOMPILE_SLICE=1/1). Of 134 saved records, 132 were buildable. The worker took 45 s, with 67 driver blobs loaded and 65 kept. A title thread still spent 8.465 s compiling a 441,000 B passthrough mesh graphics PSO after the last presents. This was a different graphics PSO from the control example.
  • Both stopped presenting at about 82 s of title time, showed only loading or black frames in the sampled transition, and exited 0 without device removal. These two runs do not establish that mesh compilation alone causes the presentation stall.

Scope

Check whether the expensive first-use two-pass mesh streams are eligible for the existing stream cache key. For eligible streams, record enough state to replay the matching pipeline before first use and verify the resulting blob is reused in a fresh process. For rejected streams, report the unsupported state separately so a replay cannot claim coverage.

AI use

OpenAI Codex (GPT-6, exact serving variant unavailable) ran the local experiments, checked the source and logs, and drafted this report.

**@⁠BBareth** on GitHub · 2026-11-26 10:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/2760) Part of #2088. Related to the NVIDIA stall in #2595. #2741 tracks the analogous split-compute whole-form path. ### What happens On `nvidia-dev`, graphics startup preparation replays the saved `D3D12_GRAPHICS_PIPELINE_STATE_DESC` records. `OwnedDesc::record` returns no record for `OwnedDesc::Stream`, including the two-pass mesh path. The startup worker consumes only the saved graphics records. [Recording](https://github.com/xcl-dev/xcl/blob/af2cecc40886a8682ecf3267f5328c6dc4b66ad7/crates/xcl/src/hle/d3d12x/real.rs#L6427) · [Replay](https://github.com/xcl-dev/xcl/blob/af2cecc40886a8682ecf3267f5328c6dc4b66ad7/crates/xcl/src/shaders.rs#L1908) · [Mesh PSO build](https://github.com/xcl-dev/xcl/blob/af2cecc40886a8682ecf3267f5328c6dc4b66ad7/crates/xcl/src/hle/d3d12x/real.rs#L7300) ### Measured on Windows RTX 5070 Ti, driver 621.24, i7-12700K, 32 GB RAM, Windows 11 25H2 build 26200.9168, Rust 1.95.0 MSVC, DXC 1.9.2609.5. Release `nvidia-dev` at `af2cecc40886a8682ecf3267f5328c6dc4b66ad7` with only #253's stack-dump patch (`f67e35ae`) applied. Both runs used the same retail workload and starting XCL cache snapshot, direct DXIL, and a 180-second title timer. Windows' implicit driver cache was shared across runs. - **Control, preparation off:** 1,870 presents. The 100 s and 120 s dumps show title threads in `execute_indirect → resolve_wait_for → Wait::until_done`. In the same stall, a title thread spent 12.551 s compiling a 503,332 B passthrough mesh graphics PSO. - **Graphics history prepared:** replayed the control's graphics history with generic shader preparation skipped (`XCL_PREPARE_WORKERS=1 XCL_PRECOMPILE_SLICE=1/1`). Of 134 saved records, 132 were buildable. The worker took 45 s, with 67 driver blobs loaded and 65 kept. A title thread still spent 8.465 s compiling a 441,000 B passthrough mesh graphics PSO after the last presents. This was a different graphics PSO from the control example. - Both stopped presenting at about 82 s of title time, showed only loading or black frames in the sampled transition, and exited 0 without device removal. These two runs do not establish that mesh compilation alone causes the presentation stall. ### Scope Check whether the expensive first-use two-pass mesh streams are eligible for the existing stream cache key. For eligible streams, record enough state to replay the matching pipeline before first use and verify the resulting blob is reused in a fresh process. For rejected streams, report the unsupported state separately so a replay cannot claim coverage. ### AI use OpenAI Codex (GPT-6, exact serving variant unavailable) ran the local experiments, checked the source and logs, and drafted this report.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:14:55 +00:00
Author
Owner

@⁠CryingLaughing on GitHub · 2026-11-26 11:39 UTC · original · edited 2026-11-26 12:34 UTC

I reproduced the missing history entry on exact nvidia-dev af2cecc40886a8682ecf3267f5328c6dc4b66ad7. A synthetic triangle mesh stream and its owned copy produced the same canonical cache key. The RTX 4080 successfully created one small native mesh PSO (2,776 shader bytes), but the graphics history decoded one shader entry and zero replayable pipeline entries. The duplicate-topology control was rejected before any driver call.

Tested on RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. cargo test -p xcl --lib --locked -j 4 --no-run --message-format=json, then the built binary with hle::d3d12x::real::passthrough_mesh_stream_is_missing_from_startup_history --exact --test-threads=1 --nocapture and an isolated cache. 1 passed, 0 failed, 0 ignored, 0 capability skips. This verifies the missing record on a bounded stream. It does not measure retail stalls or the startup worker itself.

I’m checking a typed mesh history record for the ordinary stream states and replay through the existing graphics worker. The end-to-end check will compare a fresh runtime with and without a matching startup-populated cache entry.

Replay result

The follow-up is b04438c7533111277ab2b5b532335682c1989a82, on the same af2cecc4 base and hardware above. It records supported console mesh streams and replays them through the existing graphics worker. With the same synthetic Wave32 stream in a fresh process, the cold runtime made two native creates without XCL blobs. The real xcl shaders <job> --graphics-records --windows 1 worker then saved two blobs for one pipeline. The fresh warm runtime accepted both exact driver blobs with zero rejections and zero replacements. Capture, cold, and warm each passed 1/0/0 with no capability skips.

The exact head workspace build passed. cargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4 --show-output finished with 1,748 passed, 5 failed, 48 ignored over 40 harnesses. Its pass count includes 30 capability skips. All five failing tests also failed on the clean parent. The two release assertions are tracked in #2770, the AS-slot expectation in #2632, and both debug fixture overflows in #42.

This validates cache reuse for the bounded one-window test. Retail startup timing, rendering, and other stream layouts remain untested.

AS-slot follow-up

A separate run at the same commit used the same verified CLI binary and put the same synthetic console mesh shader in the AS slot. The worker and runtime both translated it as MS. The cold control used neither blob. Startup saved both, and the fresh runtime accepted both with zero rejections or replacements. The key-derived paths and sizes matched the original MS-slot run. Capture, cold, and warm each passed 1/0/0 with no capability skips.

**@⁠CryingLaughing** on GitHub · 2026-11-26 11:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/2760#issuecomment-7191013565) · edited 2026-11-26 12:34 UTC I reproduced the missing history entry on exact `nvidia-dev` `af2cecc40886a8682ecf3267f5328c6dc4b66ad7`. A synthetic triangle mesh stream and its owned copy produced the same canonical cache key. The RTX 4080 successfully created one small native mesh PSO (`2,776` shader bytes), but the graphics history decoded one shader entry and zero replayable pipeline entries. The duplicate-topology control was rejected before any driver call. **Tested** on RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. `cargo test -p xcl --lib --locked -j 4 --no-run --message-format=json`, then the built binary with `hle::d3d12x::real::passthrough_mesh_stream_is_missing_from_startup_history --exact --test-threads=1 --nocapture` and an isolated cache. **1 passed, 0 failed, 0 ignored, 0 capability skips**. This verifies the missing record on a bounded stream. It does not measure retail stalls or the startup worker itself. I’m checking a typed mesh history record for the ordinary stream states and replay through the existing graphics worker. The end-to-end check will compare a fresh runtime with and without a matching startup-populated cache entry. **Replay result** The follow-up is [`b04438c7533111277ab2b5b532335682c1989a82`](https://github.com/CryingLaughing/xcl/commit/b04438c7533111277ab2b5b532335682c1989a82), on the same `af2cecc4` base and hardware above. It records supported console mesh streams and replays them through the existing graphics worker. With the same synthetic Wave32 stream in a fresh process, the cold runtime made two native creates without XCL blobs. The real `xcl shaders <job> --graphics-records --windows 1` worker then saved two blobs for one pipeline. The fresh warm runtime accepted both exact driver blobs with zero rejections and zero replacements. Capture, cold, and warm each passed **1/0/0** with no capability skips. The exact head workspace build passed. `cargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4 --show-output` finished with **1,748 passed, 5 failed, 48 ignored** over 40 harnesses. Its pass count includes 30 capability skips. All five failing tests also failed on the clean parent. The two release assertions are tracked in #2770, the AS-slot expectation in #2632, and both debug fixture overflows in #42. This validates cache reuse for the bounded one-window test. Retail startup timing, rendering, and other stream layouts remain untested. **AS-slot follow-up** A separate run at the same commit used the same verified CLI binary and put the same synthetic console mesh shader in the AS slot. The worker and runtime both translated it as MS. The cold control used neither blob. Startup saved both, and the fresh runtime accepted both with zero rejections or replacements. The key-derived paths and sizes matched the original MS-slot run. Capture, cold, and warm each passed 1/0/0 with no capability skips.
This discussion has been locked. Commenting is limited to contributors.
No description provided.