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

Open
opened 2026-11-26 10:26:56 +00:00 by BBareth · 1 comment
BBareth commented 2026-11-26 10:26:56 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-26T10:26:56Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6624604122 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2760). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-26T10:26:56Z. --- 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.
CryingLaughing commented 2026-11-26 12:06:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T11:39:52Z.


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.

Normal launcher and history capture

A separate four-leg test exercised the normal xcl run path as well as the worker. The same synthetic title bound one two-pass MS stream in every leg. The title fixture was the only overlay. The baseline and candidate host binaries were built from af2cecc40886a8682ecf3267f5328c6dc4b66ad7 and b04438c7533111277ab2b5b532335682c1989a82.

RTX 4080 run Saved history or startup result Native cache hits at bind
Baseline cold No mesh history entry 0/2
Patched cold First use persisted one type-3 mesh entry 0/2
Patched fresh launch, matching shader file Normal startup resolved the saved shader key, created one pipeline, and wrote both blobs before bind 2/2
Patched fresh launch, missing shader file Startup left out the saved entry and wrote no blobs 0/2

Both fresh launches started with only the host-generated graphics history and empty cache directories. The matching case reused both exact driver blobs with zero rejections, replacements, or cold retries. The missing-file control used the same shader embedded in the guest. The generated shaders matched across all four runs.

All four processes exited 0 with no capability skips, and their synthetic game folders were unchanged. The RTX 4080 ran on driver 621.01 under Windows 11 25H2 build 26200.9974 with an i5-13600K, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. The runs used switch-form translation with four windows and one graphics preparation worker. The fixture checks creation and bind. Mesh draw output and retail launch timing remain untested.

<!-- greyfinch-sync:ivall/xcl:comment:7191013565 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2760#issuecomment-7191013565). Originally posted by [CryingLaughing](https://github.com/CryingLaughing) on 2026-11-26T11:39:52Z. --- 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. **Normal launcher and history capture** A separate four-leg test exercised the normal `xcl run` path as well as the worker. The same synthetic title bound one two-pass MS stream in every leg. The title fixture was the only overlay. The baseline and candidate host binaries were built from `af2cecc40886a8682ecf3267f5328c6dc4b66ad7` and `b04438c7533111277ab2b5b532335682c1989a82`. | RTX 4080 run | Saved history or startup result | Native cache hits at bind | | --- | --- | --- | | Baseline cold | No mesh history entry | 0/2 | | Patched cold | First use persisted one type-3 mesh entry | 0/2 | | Patched fresh launch, matching shader file | Normal startup resolved the saved shader key, created one pipeline, and wrote both blobs before bind | 2/2 | | Patched fresh launch, missing shader file | Startup left out the saved entry and wrote no blobs | 0/2 | Both fresh launches started with only the host-generated graphics history and empty cache directories. The matching case reused both exact driver blobs with zero rejections, replacements, or cold retries. The missing-file control used the same shader embedded in the guest. The generated shaders matched across all four runs. All four processes exited 0 with no capability skips, and their synthetic game folders were unchanged. The RTX 4080 ran on driver 621.01 under Windows 11 25H2 build 26200.9974 with an i5-13600K, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. The runs used switch-form translation with four windows and one graphics preparation worker. The fixture checks creation and bind. Mesh draw output and retail launch timing remain untested.
Sign in to join this conversation.
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#2750
No description provided.