D3D12.X: empty shader slots keep a two-pass mesh pipeline's cache key #2975

Open
github-bot wants to merge 1 commit from github-bot/gh-2975 into nvidia-dev AGit
Owner

@⁠treybertram06 on GitHub · 2026-11-27 06:13 UTC · original
treybertram06:nv-two-pass-mesh-key → nvidia-dev · +38 −0 · 1 files · 1 commits · open

Target: nvidia-dev. Part of #2688 and #2088.

two_pass_stream_key gave up on any shader subobject whose code it couldn't read. The retail title's mesh pipelines carry empty DS, HS and GS slots (D3D12_SHADER_BYTECODE of length 0) beside the MS and PS. So the passthrough mesh pass of every two-pass pipeline never had a cache key, never kept a driver blob, and was compiled again on every launch.

A shader slot with no code (null pointer, length 0) is no shader. It's now skipped, as zero stream-output, input-layout and view-instancing subobjects already are. A slot that names an address with length 0 is refused by the driver (E_INVALIDARG), so it keeps no key and can't take a valid pipeline's cached blob (thanks @⁠luckyteagirl). A slot that names code that can't be read still has no key.

What is in it

  • D3D12.X: empty shader slots keep a two-pass mesh pipeline's cache key (hle/d3d12x/real/two_pass_identity.rs), with the test empty_shader_slots_do_not_take_the_key_away. The test fails without the fix (two_pass_stream_key returns None), and its live-pointer, zero-length assertion fails under a length-only rule.

Tested

  • RTX 3080 10 GB (driver 621.40), Ryzen 9 5900X, 64 GB RAM, Windows 11 26300. Debug tests, release title runs.

  • How it was found: a local diagnostic logged the subobjects of every mesh pass without a key. All of them were 0 25(MS) 2(PS) 14 3 4 5 8 9 10 21 17 12 15 16, with types 3, 4 and 5 (DS, HS, GS) empty.

  • Retail title, warm cache, the same settings, up to 700 s:

    mesh-pass driver compile time waits for graphics pipelines
    before 1,261 compiles, 58 s 25 waits, 150 s
    after 1,572 compiles, 19 s; the slow ones now come from cached blobs 4 waits, 9 s

    The fast ones still compile: they're below the keep threshold by design. The "after" run also had XCL_TEXTURE_LEVEL_PAGES=1, so the wait times aren't a clean A/B. The compile time is.

  • cargo test --workspace --no-fail-fast -- --test-threads=4, with XCL_DXC_DIR set to DXC 1.9, at this PR's head 4e52050c: 1822 passed, 11 failed, 48 ignored.

    • The 11 failures also fail on nvidia-dev a5e2d851 without this change. I checked each one there: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, async_compute_pso_registers_real_pso_and_not_standin, split_compute_prefers_the_offline_whole_pipeline (2), console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly, the three test_title_* debug-layer and DRED e2e tests, and texture_upload::tests::{gpu_parts_of_a_texture_go_up_and_the_rest_stays, pieces_hold_the_texels_of_their_levels}.
    • 26 SKIPPED: the no wave64 tests, plus one that needs XCL_HEAP_WINDOWS=1.
  • cargo test -p xcl --lib two_pass_identity: 5 passed. The new test fails without the fix.

Regression run
Base, a commit of main: b49be183, the last main commit before #2555's launch preparation gate. On current main that gate takes hours with this title on this card. The PR's base on nvidia-dev, a5e2d851, made 1,448 frames with a peak commit of 17,888 MB in the same 60 s, with no removal and no crash.

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1415 (PresentX 1415)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 15557 MB

This PR's head:

xcl-smoke v1
commit: 4e52050cea54dec0493482f429f246c1ea1e9362
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1547 (PresentX 1547)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 18295 MB

Not tested

  • AMD and Intel GPUs. The key is the same on every vendor, but only NVIDIA was run.
  • Other titles with two-pass mesh pipelines.

AI use

  • Claude Code with Claude Opus 5.5. It found the cause with a local diagnostic, wrote the fix, the test and this description, and ran the tests and title runs. The author reviewed the diff.
**@⁠treybertram06** on GitHub · 2026-11-27 06:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975) `treybertram06:nv-two-pass-mesh-key` → `nvidia-dev` · +38 −0 · 1 files · 1 commits · open Target: `nvidia-dev`. Part of #2688 and #2088. `two_pass_stream_key` gave up on any shader subobject whose code it couldn't read. The retail title's mesh pipelines carry empty DS, HS and GS slots (`D3D12_SHADER_BYTECODE` of length 0) beside the MS and PS. So the passthrough mesh pass of every two-pass pipeline never had a cache key, never kept a driver blob, and was compiled again on every launch. A shader slot with no code (null pointer, length 0) is no shader. It's now skipped, as zero stream-output, input-layout and view-instancing subobjects already are. A slot that names an address with length 0 is refused by the driver (`E_INVALIDARG`), so it keeps no key and can't take a valid pipeline's cached blob (thanks @⁠luckyteagirl). A slot that names code that can't be read still has no key. **What is in it** - `D3D12.X: empty shader slots keep a two-pass mesh pipeline's cache key` (`hle/d3d12x/real/two_pass_identity.rs`), with the test `empty_shader_slots_do_not_take_the_key_away`. The test fails without the fix (`two_pass_stream_key` returns `None`), and its live-pointer, zero-length assertion fails under a length-only rule. **Tested** - RTX 3080 10 GB (driver 621.40), Ryzen 9 5900X, 64 GB RAM, Windows 11 26300. Debug tests, release title runs. - How it was found: a local diagnostic logged the subobjects of every mesh pass without a key. All of them were `0 25(MS) 2(PS) 14 3 4 5 8 9 10 21 17 12 15 16`, with types 3, 4 and 5 (DS, HS, GS) empty. - Retail title, warm cache, the same settings, up to 700 s: | | mesh-pass driver compile time | waits for graphics pipelines | |---|---|---| | before | 1,261 compiles, 58 s | 25 waits, 150 s | | after | 1,572 compiles, 19 s; the slow ones now come from cached blobs | 4 waits, 9 s | The fast ones still compile: they're below the keep threshold by design. The "after" run also had `XCL_TEXTURE_LEVEL_PAGES=1`, so the wait times aren't a clean A/B. The compile time is. - `cargo test --workspace --no-fail-fast -- --test-threads=4`, with `XCL_DXC_DIR` set to DXC 1.9, at this PR's head `4e52050c`: 1822 passed, 11 failed, 48 ignored. - The 11 failures also fail on `nvidia-dev` `a5e2d851` without this change. I checked each one there: `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`, `async_compute_pso_registers_real_pso_and_not_standin`, `split_compute_prefers_the_offline_whole_pipeline` (2), `console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly`, the three `test_title_*` debug-layer and DRED e2e tests, and `texture_upload::tests::{gpu_parts_of_a_texture_go_up_and_the_rest_stays, pieces_hold_the_texels_of_their_levels}`. - 26 `SKIPPED`: the `no wave64` tests, plus one that needs `XCL_HEAP_WINDOWS=1`. - `cargo test -p xcl --lib two_pass_identity`: 5 passed. The new test fails without the fix. **Regression run** Base, a commit of `main`: `b49be183`, the last `main` commit before #2555's launch preparation gate. On current `main` that gate takes hours with this title on this card. The PR's base on `nvidia-dev`, `a5e2d851`, made 1,448 frames with a peak commit of 17,888 MB in the same 60 s, with no removal and no crash. ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3080 title: 4ba6c38e seconds: 60 exit: 0x0 frames shown: 1415 (PresentX 1415) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 15557 MB ``` This PR's head: ``` xcl-smoke v1 commit: 4e52050cea54dec0493482f429f246c1ea1e9362 gpu: NVIDIA GeForce RTX 3080 title: 4ba6c38e seconds: 60 exit: 0x0 frames shown: 1547 (PresentX 1547) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 18295 MB ``` **Not tested** - AMD and Intel GPUs. The key is the same on every vendor, but only NVIDIA was run. - Other titles with two-pass mesh pipelines. **AI use** - Claude Code with Claude Opus 5.5. It found the cause with a local diagnostic, wrote the fix, the test and this description, and ran the tests and title runs. The author reviewed the diff.
`two_pass_stream_key` gave up on any shader subobject whose code it could
not read. The retail title's mesh pipelines carry empty DS, HS and GS slots
(length 0) beside the MS and PS, so the passthrough mesh pass never had a
key, never kept a driver blob and was compiled again on every launch
(1,303 compiles in one RTX 3080 run, 58 s of driver time by 700 s).

A shader slot of length 0 is no shader: it is now passed over, as zero
stream-output, input-layout and view-instancing subobjects already are. A
slot that names code which cannot be read still has no key.

With it, the slow mesh passes are taken from the driver cache on the next
launch: 19 s of mesh-pass driver time by 700 s (the fast ones still compile,
below the keep threshold by design), and graphics-pipeline waits went from
150 s to 9 s in that window (that run also had XCL_TEXTURE_LEVEL_PAGES=1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 06:16:12 +00:00
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 06:28 UTC · original

I checked the empty DS/HS/GS slot case with native two-pass execution on RTX 5070 / NVIDIA 616.92. The same synthetic fixture was built separately against nvidia-dev parent a5e2d851a503fc0e04609f773ea53f2d2c4e3269 and head 346f671aba48f190d9b3661cefc018caef5af04f. Each revision used its own initially empty XCL cache.

Revision Cold process (forced cache admission) Fresh warm process (default admission)
Parent Saved compute blob only One hit; compute reused, passthrough mesh not reused
PR head Saved compute and mesh blobs Two hits; both compute and passthrough mesh reused

The cache counters were parent cold 0 hits / 0 rejects / 1 save, warm 1 / 0 / 0; head cold 0 / 0 / 2, warm 2 / 0 / 0. All four processes checked both the clear color and the rendered red pixels after the compute and mesh passes. The cold admission threshold was deliberately forced to zero; the warm process used the default threshold.

This is synthetic cache and GPU execution evidence. It does not resolve the broader integration-test failure reported on both revisions or establish retail startup timing.

AI use: OpenAI Codex with GPT-6.2 Astra built and ran the checks; Codex reviewed and prepared this report.

**@⁠andrewDoing** on GitHub · 2026-11-27 06:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7211561158) I checked the empty DS/HS/GS slot case with native two-pass execution on RTX 5070 / NVIDIA 616.92. The same synthetic fixture was built separately against `nvidia-dev` parent `a5e2d851a503fc0e04609f773ea53f2d2c4e3269` and head `346f671aba48f190d9b3661cefc018caef5af04f`. Each revision used its own initially empty XCL cache. | Revision | Cold process (forced cache admission) | Fresh warm process (default admission) | | --- | --- | --- | | Parent | Saved compute blob only | One hit; compute reused, passthrough mesh not reused | | PR head | Saved compute and mesh blobs | Two hits; both compute and passthrough mesh reused | The cache counters were parent cold `0 hits / 0 rejects / 1 save`, warm `1 / 0 / 0`; head cold `0 / 0 / 2`, warm `2 / 0 / 0`. All four processes checked both the clear color and the rendered red pixels after the compute and mesh passes. The cold admission threshold was deliberately forced to zero; the warm process used the default threshold. This is synthetic cache and GPU execution evidence. It does not resolve the broader integration-test failure reported on both revisions or establish retail startup timing. AI use: OpenAI Codex with GPT-6.2 Astra built and ran the checks; Codex reviewed and prepared this report.
github-bot force-pushed github-bot/gh-2975 from 346f671aba to 4e52050cea 2026-11-27 07:22:46 +00:00 Compare
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-27 07:18 UTC · original

On 346f671a, the length-only check can evict a valid mesh cache entry. The MS translation forwards VS/CS/GS payloads to the driver unchanged. A zero-length GS with a non-null bytecode pointer therefore gets the same key as an absent GS. When that key is warm, build_two_pass_pso tries the valid blob and evicts it on failure before retrying the invalid stream without a blob.

I checked this with a synthetic triangle mesh PSO on RX 6800M and Microsoft Basic Render Driver. With the baseline PSO's blob loaded, adding a null/zero GS succeeded. With a live non-null pointer and the same zero length, creation returned E_INVALIDARG both with and without the blob. VS and CS gave the same results.

Could the key skip only null/zero slots? That preserves the empty DS/HS/GS case and leaves the non-null/zero stream on the uncached path. A unit test can vary just the pointer in the existing GS fixture.

AI use: OpenAI Codex (GPT-6.2 Sol) traced the cache path, ran the native D3D12 probe, and drafted this comment.

**@⁠luckyteagirl** on GitHub · 2026-11-27 07:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7212341897) On `346f671a`, the length-only check can evict a valid mesh cache entry. The MS translation forwards VS/CS/GS payloads to the driver unchanged. A zero-length GS with a non-null bytecode pointer therefore gets the same key as an absent GS. When that key is warm, `build_two_pass_pso` tries the valid blob and evicts it on failure before retrying the invalid stream without a blob. I checked this with a synthetic triangle mesh PSO on RX 6800M and Microsoft Basic Render Driver. With the baseline PSO's blob loaded, adding a null/zero GS succeeded. With a live non-null pointer and the same zero length, creation returned `E_INVALIDARG` both with and without the blob. VS and CS gave the same results. Could the key skip only null/zero slots? That preserves the empty DS/HS/GS case and leaves the non-null/zero stream on the uncached path. A unit test can vary just the pointer in the existing GS fixture. AI use: OpenAI Codex (GPT-6.2 Sol) traced the cache path, ran the native D3D12 probe, and drafted this comment.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-27 07:20 UTC · original

@⁠luckyteagirl Thanks, you're right: a slot with an address and length 0 is invalid, not empty, and must not share the key of the stream without it. Fixed in 4e52050c (squashed into the one commit). Only a slot whose pointer and length are both 0 is skipped now; a non-null pointer with length 0 leaves the stream without a key, so it takes the uncached path.

empty_shader_slots_do_not_take_the_key_away now also builds the GS slot with a live pointer and length 0 and asserts no key. That assertion fails with the previous length-only rule and passes now (cargo test -p xcl --lib two_pass_identity: 5 passed).

The title's empty DS/HS/GS slots are null and zero, since its pipelines are created, so the effect on it is unchanged. I'll rerun the smoke and the suite on the new head and update the description.

AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.

**@⁠treybertram06** on GitHub · 2026-11-27 07:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7212379825) @⁠luckyteagirl Thanks, you're right: a slot with an address and length 0 is invalid, not empty, and must not share the key of the stream without it. Fixed in `4e52050c` (squashed into the one commit). Only a slot whose pointer and length are both 0 is skipped now; a non-null pointer with length 0 leaves the stream without a key, so it takes the uncached path. `empty_shader_slots_do_not_take_the_key_away` now also builds the GS slot with a live pointer and length 0 and asserts no key. That assertion fails with the previous length-only rule and passes now (`cargo test -p xcl --lib two_pass_identity`: 5 passed). The title's empty DS/HS/GS slots are null and zero, since its pipelines are created, so the effect on it is unchanged. I'll rerun the smoke and the suite on the new head and update the description. AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.
Author
Owner

@⁠SzczepanGrela on GitHub · 2026-11-27 07:36 UTC · original

RX 9070 / Wine check of the stricter null/zero rule at 4e52050cea54dec0493482f429f246c1ea1e9362. The exact head passes. An automatic application to current main still keeps main's older length-only rule.

Tested

RX 9070 16 GB, RADV GFX1201 / Mesa 26.3.1, Ryzen 7 7700, CachyOS 7.3.0-5, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton 8293130ebe370b1+ with local asserts-disabled build, DXC/DXIL 1.9.2602.17, Rust 1.97.1 Windows-GNU release. Network off, explicit adapter, private enabled caches. Source copies had test-only additions.

The actual parent was a5e2d851a503fc0e04609f773ea53f2d2c4e3269; the target nvidia-dev had advanced to e0821b12. Main was 83b008188efbf954b846667f48d75e3fa9310a01.

Built each source with cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run, then ran the PE under Wine with hle::d3d12x::real::two_pass_identity::tests:: --nocapture --test-threads=1 and =4. The new test was copied unchanged to parent and main; existing assertions were preserved.

Source Passed / failed, at both thread counts Extra null/zero slot gets base key Extra live-pointer/zero slot gets base key
Parent a5e2d851 4 / 1 No No
Head 4e52050c 5 / 0 Yes No
Main 83b00818 5 / 1 Yes Yes
Automatic three-way integration into that main 5 / 1 Yes Yes

The one-file git merge-file integration returned 0 and was tested without manual repairs. It retains main's BytecodeLength == 0 continuation after adding the new guard. The failing test there is empty_shader_slots_do_not_take_the_key_away, at its final live-pointer/zero-length assertion. This needs attention when rebasing onto main.

Native GPU probe

Three fresh full processes per source plus a pilot per source tested a native mesh triangle with no extra slots, individual empty VS/DS/HS/GS/CS/AS slots, all six together, and each individual slot with a live pointer and zero length. Direct native creation used the exported base PSO blob or no blob, independently of XCL key eligibility.

On this Wine/vkd3d stack, all 368 PSO creations, including seeds, succeeded. In particular, all 144 live-pointer/zero-length attempts succeeded, with and without the blob. They produced the expected image, so this stack does not reproduce the reported Windows E_INVALIDARG behavior.

A separate Python oracle verified the canonical FNV field serialization from captured streams and shaders, all 376,832 readback words from 352 mesh draws and 16 clear-only controls, and repeat/source parity. Zero ignored or skipped tests; no device removal.

Not tested

Production two-pass cache lookup/admission/eviction, console shader translation, retail workload, smoke run, full workspace suite, native Windows or performance impact. These native blob probes establish driver behavior and pixel results, not end-to-end XCL cache reuse.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the public change, wrote and ran the fixture and independent verifier, and drafted this report. Publication authorized by the account owner.

**@⁠SzczepanGrela** on GitHub · 2026-11-27 07:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7212633633) RX 9070 / Wine check of the stricter null/zero rule at `4e52050cea54dec0493482f429f246c1ea1e9362`. The exact head passes. An automatic application to current main still keeps main's older length-only rule. **Tested** RX 9070 16 GB, RADV GFX1201 / Mesa 26.3.1, Ryzen 7 7700, CachyOS 7.3.0-5, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton `8293130ebe370b1+` with local asserts-disabled build, DXC/DXIL 1.9.2602.17, Rust 1.97.1 Windows-GNU release. Network off, explicit adapter, private enabled caches. Source copies had test-only additions. The actual parent was `a5e2d851a503fc0e04609f773ea53f2d2c4e3269`; the target `nvidia-dev` had advanced to `e0821b12`. Main was `83b008188efbf954b846667f48d75e3fa9310a01`. Built each source with `cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run`, then ran the PE under Wine with `hle::d3d12x::real::two_pass_identity::tests:: --nocapture --test-threads=1` and `=4`. The new test was copied unchanged to parent and main; existing assertions were preserved. | Source | Passed / failed, at both thread counts | Extra null/zero slot gets base key | Extra live-pointer/zero slot gets base key | | :-- | --: | :-- | :-- | | Parent `a5e2d851` | 4 / 1 | No | No | | Head `4e52050c` | 5 / 0 | Yes | No | | Main `83b00818` | 5 / 1 | Yes | Yes | | Automatic three-way integration into that main | 5 / 1 | Yes | Yes | The one-file `git merge-file` integration returned 0 and was tested without manual repairs. It retains [main's `BytecodeLength == 0` continuation](https://github.com/xcl-dev/xcl/blob/83b008188efbf954b846667f48d75e3fa9310a01/crates/xcl/src/hle/d3d12x/real/two_pass_identity.rs#L225) after adding the new guard. The failing test there is `empty_shader_slots_do_not_take_the_key_away`, at its final live-pointer/zero-length assertion. This needs attention when rebasing onto main. **Native GPU probe** Three fresh full processes per source plus a pilot per source tested a native mesh triangle with no extra slots, individual empty VS/DS/HS/GS/CS/AS slots, all six together, and each individual slot with a live pointer and zero length. Direct native creation used the exported base PSO blob or no blob, independently of XCL key eligibility. On this Wine/vkd3d stack, all 368 PSO creations, including seeds, succeeded. In particular, all 144 live-pointer/zero-length attempts succeeded, with and without the blob. They produced the expected image, so this stack does not reproduce the reported Windows `E_INVALIDARG` behavior. A separate Python oracle verified the canonical FNV field serialization from captured streams and shaders, all 376,832 readback words from 352 mesh draws and 16 clear-only controls, and repeat/source parity. Zero ignored or skipped tests; no device removal. **Not tested** Production two-pass cache lookup/admission/eviction, console shader translation, retail workload, smoke run, full workspace suite, native Windows or performance impact. These native blob probes establish driver behavior and pixel results, not end-to-end XCL cache reuse. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the public change, wrote and ran the fixture and independent verifier, and drafted this report. Publication authorized by the account owner.
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 08:28 UTC · original

I checked warm-cache preservation on RTX 5070 / NVIDIA 616.92 using updated head 4e52050cea54dec0493482f429f246c1ea1e9362 and a synthetic two-pass mesh stream with a live-pointer, zero-length GS slot.

For each of synchronous and asynchronous pipeline creation, I used a separate empty XCL cache and three fresh processes: seed a valid null/zero-slot stream with forced admission, submit the non-null/zero stream against that warm cache, then submit the valid stream again with default admission. In both modes the seed saved compute and passthrough mesh blobs, their file SHA-256 values were unchanged after the malformed attempt, and the final valid process reused both blobs and produced the expected rendered pixels.

The malformed attempt took different paths:

  • Synchronous creation returned E_INVALIDARG; its cache counters showed zero hits, rejects, and saves.
  • Asynchronous creation's owned-stream path normalized the zero-length bytecode to an empty slot, and the background build reused both blobs. This was not a native driver rejection.

This checks the XCL cache lifecycle in the fixture, rather than a retail workload or startup performance. The sync/async difference concerns malformed input and was not established as a regression from this PR.

AI use: OpenAI Codex with GPT-6.2 Astra built and ran the controls; Codex reviewed and prepared this report.

**@⁠andrewDoing** on GitHub · 2026-11-27 08:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7213579167) I checked warm-cache preservation on RTX 5070 / NVIDIA 616.92 using updated head `4e52050cea54dec0493482f429f246c1ea1e9362` and a synthetic two-pass mesh stream with a live-pointer, zero-length GS slot. For each of synchronous and asynchronous pipeline creation, I used a separate empty XCL cache and three fresh processes: seed a valid null/zero-slot stream with forced admission, submit the non-null/zero stream against that warm cache, then submit the valid stream again with default admission. In both modes the seed saved compute and passthrough mesh blobs, their file SHA-256 values were unchanged after the malformed attempt, and the final valid process reused both blobs and produced the expected rendered pixels. The malformed attempt took different paths: - Synchronous creation returned `E_INVALIDARG`; its cache counters showed zero hits, rejects, and saves. - Asynchronous creation's owned-stream path normalized the zero-length bytecode to an empty slot, and the background build reused both blobs. This was not a native driver rejection. This checks the XCL cache lifecycle in the fixture, rather than a retail workload or startup performance. The sync/async difference concerns malformed input and was not established as a regression from this PR. AI use: OpenAI Codex with GPT-6.2 Astra built and ran the controls; Codex reviewed and prepared this report.
Author
Owner

@⁠Decodere on GitHub · 2026-11-27 08:29 UTC · original

Independent desktop NVIDIA verification of PR #2975 at head 4e52050cea54dec0493482f429f246c1ea1e9362 (1 commit; exact parent & merge-base: a5e2d851a503fc0e04609f773ea53f2d2c4e3269 on nvidia-dev).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (4e52050c)

Command Result
cargo test --release -p xcl --lib -- hle::d3d12x::real::two_pass_identity::tests::empty_shader_slots_do_not_take_the_key_away --exact --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1727 filtered out × 3 (0.02s × 3, 0 skipped — verified empty null/length-0 DS/HS/GS slots preserve the MS+PS key while null/length-16 and non-null/length-0 slots still return None)
cargo test --release -p xcl --lib -- hle::d3d12x::real::two_pass_identity:: --test-threads=1 --nocapture (3 consecutive runs) 5 passed; 0 failed; 0 ignored; 1723 filtered out × 3 (0.02s × 3, 0 skipped: canonical_stream_key_distinguishes_state_samplers_and_driver, canonical_stream_key_normalizes_padding_and_rejects_pointer_subobjects, empty_shader_slots_do_not_take_the_key_away, two_pass_cs_key_changes_with_samplers_and_driver, two_pass_keys_cover_mem_windows_invalid_counts_and_duplicates)
cargo test --release -p xcl --lib -- hle::d3d12x::real:: --test-threads=1 --nocapture (3 consecutive runs) 96 passed; 0 failed; 0 ignored; 1632 filtered out × 3 (2.79s, 2.77s, 2.74s, 0 runtime skips)
cargo build --release -p xcl Clean build (2m 06s, exit 0, 0 new warnings in two_pass_identity.rs)

Paired quiet 60 s retail smoke (title: 29640639, XCL_PREPARE=0 XCL_NETWORK=0)

Exact parent & merge-base (a5e2d851a503fc0e04609f773ea53f2d2c4e3269, XCL_PREPARE=0 XCL_NETWORK=0):

xcl-smoke v1
commit: a5e2d851a503fc0e04609f773ea53f2d2c4e3269
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1556 (PresentX 1556)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14755 MB

PR #2975 (4e52050cea54dec0493482f429f246c1ea1e9362, XCL_PREPARE=0 XCL_NETWORK=0):

xcl-smoke v1
commit: 4e52050cea54dec0493482f429f246c1ea1e9362
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1583 (PresentX 1583)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 14806 MB

Limits of coverage

  • Directly verified the updated empty-slot key preservation and invalid-slot rejection logic (empty_shader_slots_do_not_take_the_key_away 3/3, full two_pass_identity:: 5/5 × 3, and full hle::d3d12x::real:: 96/96 × 3, 0 skipped) on Windows 11 + RTX 4060.
  • Paired 60 s retail smokes ran with XCL_PREPARE=0 (XCL_NETWORK=0), bypassing startup prepare_for_launch, and verified single-run startup/menu stability (0 device removals, 0 crashes, 18955 translated draws / 1024 dispatches with 0 skipped); did not measure back-to-back multi-launch 700 s world-load mesh-pass driver cache hit time savings.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

**@⁠Decodere** on GitHub · 2026-11-27 08:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7213602404) Independent desktop NVIDIA verification of **PR #2975** at head `4e52050cea54dec0493482f429f246c1ea1e9362` (`1` commit; exact parent & merge-base: `a5e2d851a503fc0e04609f773ea53f2d2c4e3269` on `nvidia-dev`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`4e52050c`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib -- hle::d3d12x::real::two_pass_identity::tests::empty_shader_slots_do_not_take_the_key_away --exact --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1727 filtered out` × 3 (`0.02s` × 3, `0` skipped — verified empty null/length-0 DS/HS/GS slots preserve the MS+PS key while null/length-16 and non-null/length-0 slots still return `None`) | | `cargo test --release -p xcl --lib -- hle::d3d12x::real::two_pass_identity:: --test-threads=1 --nocapture` (3 consecutive runs) | `5 passed; 0 failed; 0 ignored; 1723 filtered out` × 3 (`0.02s` × 3, `0` skipped: `canonical_stream_key_distinguishes_state_samplers_and_driver`, `canonical_stream_key_normalizes_padding_and_rejects_pointer_subobjects`, `empty_shader_slots_do_not_take_the_key_away`, `two_pass_cs_key_changes_with_samplers_and_driver`, `two_pass_keys_cover_mem_windows_invalid_counts_and_duplicates`) | | `cargo test --release -p xcl --lib -- hle::d3d12x::real:: --test-threads=1 --nocapture` (3 consecutive runs) | `96 passed; 0 failed; 0 ignored; 1632 filtered out` × 3 (`2.79s`, `2.77s`, `2.74s`, `0` runtime skips) | | `cargo build --release -p xcl` | Clean build (`2m 06s`, exit `0`, `0` new warnings in `two_pass_identity.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`, `XCL_PREPARE=0 XCL_NETWORK=0`) Exact parent & merge-base (`a5e2d851a503fc0e04609f773ea53f2d2c4e3269`, `XCL_PREPARE=0 XCL_NETWORK=0`): ``` xcl-smoke v1 commit: a5e2d851a503fc0e04609f773ea53f2d2c4e3269 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1556 (PresentX 1556) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14755 MB ``` PR #2975 (`4e52050cea54dec0493482f429f246c1ea1e9362`, `XCL_PREPARE=0 XCL_NETWORK=0`): ``` xcl-smoke v1 commit: 4e52050cea54dec0493482f429f246c1ea1e9362 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1583 (PresentX 1583) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 14806 MB ``` ### Limits of coverage - Directly verified the updated empty-slot key preservation and invalid-slot rejection logic (`empty_shader_slots_do_not_take_the_key_away` `3/3`, full `two_pass_identity::` `5/5` × 3, and full `hle::d3d12x::real::` `96/96` × 3, `0` skipped) on Windows 11 + RTX 4060. - Paired 60 s retail smokes ran with `XCL_PREPARE=0` (`XCL_NETWORK=0`), bypassing startup `prepare_for_launch`, and verified single-run startup/menu stability (`0` device removals, `0` crashes, `18955` translated draws / `1024` dispatches with `0` skipped); did not measure back-to-back multi-launch 700 s world-load mesh-pass driver cache hit time savings. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-27 12:17 UTC · original

Tested

Clean 4e52050cea54dec0493482f429f246c1ea1e9362 on Windows 11 build 26200.9974, Ryzen 7 3800X, Rust 1.100.0 MSVC, Intel Arc A770 driver 32.0.101.9175, DXC/DXIL 1.9.2602.17. Built the exact-head library with cargo test --locked -j 2 -p xcl --lib --test gpu_two_pass_cache_e2e --no-run --message-format=json and ran the linked arc-fixture.exe --nocapture --test-threads=1 with XCL_ADAPTER=A770 and synchronous PSO creation.

Two independent cold/warm pairs used fresh cache roots. One seeded absent DS/HS/GS then passed null/zero slots on the warm run. The other ran the reverse order. Cold was 0 hits, 0 rejects, 2 saves in each pair. Warm was 2 hits, 0 rejects, 0 saves, with both driver-blob SHA-256 values unchanged. Every process matched all 64 expected clear and draw pixels and retained a healthy device.

Four passed, zero failed, ignored, or skipped. Each process held the shared Arc mutex and matched the executable hash before, under, and after the lock.

Not tested

Native parent, async path, startup timings, malformed driver input, full suite and retail smoke.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the original verification, independently reproduced the cases reported here, and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-27 12:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7218069703) **Tested** Clean `4e52050cea54dec0493482f429f246c1ea1e9362` on Windows 11 build 26200.9974, Ryzen 7 3800X, Rust 1.100.0 MSVC, Intel Arc A770 driver 32.0.101.9175, DXC/DXIL 1.9.2602.17. Built the exact-head library with `cargo test --locked -j 2 -p xcl --lib --test gpu_two_pass_cache_e2e --no-run --message-format=json` and ran the linked `arc-fixture.exe --nocapture --test-threads=1` with `XCL_ADAPTER=A770` and synchronous PSO creation. Two independent cold/warm pairs used fresh cache roots. One seeded absent DS/HS/GS then passed null/zero slots on the warm run. The other ran the reverse order. Cold was 0 hits, 0 rejects, 2 saves in each pair. Warm was 2 hits, 0 rejects, 0 saves, with both driver-blob SHA-256 values unchanged. Every process matched all 64 expected clear and draw pixels and retained a healthy device. Four passed, zero failed, ignored, or skipped. Each process held the shared Arc mutex and matched the executable hash before, under, and after the lock. **Not tested** Native parent, async path, startup timings, malformed driver input, full suite and retail smoke. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the original verification, independently reproduced the cases reported here, and wrote this report.
Author
Owner

@⁠LocranKing on GitHub · 2026-11-27 12:20 UTC · original

Tested PR #2975 (4e52050c) on Windows 11 against origin/nvidia-dev (3f39671d) across a cold/warm two-pass pair into the world plus the new unit test.

Environment

  • GPU: NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2140)
  • CPU / RAM: AMD Ryzen 5 5500 (6C/12T), 32 GB DDR4, Windows 11 Build 26300
  • Shader cache & runtime: Frozen nvidia-dev DXIL cache (XCL_DIRECT_DXIL=1, XCL_HEAP_WINDOWS=1, XCL_TEXTURE_LEVEL_PAGES=1, XCL_PREPARE_GRAPHICS=0, XCL_DRED=1), Series S (lockhart) profile, 180 s scripted runs into the open world.

Unit test

cargo test --locked -p xcl --lib -- empty_shader_slots_do_not_take_the_key_away --nocapture on 4e52050c:

  • hle::d3d12x::real::two_pass_identity::tests::empty_shader_slots_do_not_take_the_key_away — ok (1 passed, 0 failed)

Cold -> Warm Two-Pass Smoke Results (180 s, lockhart)

For the warm run (33d), the dxil/driver cache produced by the first #2975 run (33c) was preserved while resetting title state/used cache to the frozen seed.

Run Exit Crashes / Removals Frames (PresentX) Heavy world start passthrough mesh graphics pass PSO compiles driver blob supplied / absent Total passthrough compile time Slowest passthrough PSO (b390e996711d4326) Peak Commit / Local
nvidia-dev base (3f39671d) 0x0 0 / 0 1857 123.34 s 0 driver-cache lookups logged 0 / 0 — — 27152 / 9914 MB
#2975 cold 2-pass (4e52050c) 0x0 0 / 0 1911 118.24 s 45 (39 unique records) 6 / 39 13,194 ms 11,398 ms (absent) 27886 / 9930 MB
#2975 warm 2-pass (4e52050c) 0x0 0 / 0 1893 114.97 s 45 (39 unique records) 7 / 38 2,704 ms 659 ms (supplied) 28747 / 9825 MB

Summary

  • On origin/nvidia-dev (3f39671d), passthrough mesh graphics pass PSOs had no driver-cache key at all (0 lookups).
  • With #2975, all 45 passthrough mesh graphics pass compiles (39 unique records) received cache keys. On the warm second launch, the slow 317,956 B passthrough pipeline (record b390e996711d4326) loaded its kept driver blob (driver blob supplied) and dropped from 11,398 ms to 659 ms (17.3x faster), cutting total passthrough compile time from 13,194 ms to 2,704 ms (-79.5%; the remaining 38 fast ones under ~60 ms stay uncached below the keep threshold as intended).
**@⁠LocranKing** on GitHub · 2026-11-27 12:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/2975#issuecomment-7218134348) Tested PR #2975 (`4e52050c`) on Windows 11 against `origin/nvidia-dev` (`3f39671d`) across a cold/warm two-pass pair into the world plus the new unit test. ### Environment - **GPU:** NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver `32.0.16.2140`) - **CPU / RAM:** AMD Ryzen 5 5500 (6C/12T), 32 GB DDR4, Windows 11 Build 26300 - **Shader cache & runtime:** Frozen `nvidia-dev` DXIL cache (`XCL_DIRECT_DXIL=1`, `XCL_HEAP_WINDOWS=1`, `XCL_TEXTURE_LEVEL_PAGES=1`, `XCL_PREPARE_GRAPHICS=0`, `XCL_DRED=1`), Series S (`lockhart`) profile, `180 s` scripted runs into the open world. ### Unit test `cargo test --locked -p xcl --lib -- empty_shader_slots_do_not_take_the_key_away --nocapture` on `4e52050c`: - `hle::d3d12x::real::two_pass_identity::tests::empty_shader_slots_do_not_take_the_key_away` — **ok** (`1 passed, 0 failed`) ### Cold -> Warm Two-Pass Smoke Results (`180 s`, `lockhart`) For the warm run (`33d`), the `dxil/driver` cache produced by the first `#2975` run (`33c`) was preserved while resetting title state/used cache to the frozen seed. | Run | Exit | Crashes / Removals | Frames (`PresentX`) | Heavy world start | `passthrough mesh graphics pass PSO` compiles | `driver blob supplied` / `absent` | Total passthrough compile time | Slowest passthrough PSO (`b390e996711d4326`) | Peak Commit / Local | |---|---|---|---|---|---|---|---|---|---| | `nvidia-dev` base (`3f39671d`) | `0x0` | `0 / 0` | `1857` | `123.34 s` | `0` driver-cache lookups logged | `0 / 0` | — | — | `27152 / 9914 MB` | | `#2975` cold 2-pass (`4e52050c`) | `0x0` | `0 / 0` | `1911` | `118.24 s` | `45` (`39` unique records) | `6` / `39` | **`13,194 ms`** | **`11,398 ms`** (`absent`) | `27886 / 9930 MB` | | `#2975` warm 2-pass (`4e52050c`) | `0x0` | `0 / 0` | `1893` | `114.97 s` | `45` (`39` unique records) | `7` / `38` | **`2,704 ms`** | **`659 ms`** (`supplied`) | `28747 / 9825 MB` | ### Summary - On `origin/nvidia-dev` (`3f39671d`), passthrough mesh graphics pass PSOs had no driver-cache key at all (`0` lookups). - With `#2975`, all `45` passthrough mesh graphics pass compiles (`39` unique records) received cache keys. On the warm second launch, the slow `317,956 B` passthrough pipeline (`record b390e996711d4326`) loaded its kept driver blob (`driver blob supplied`) and dropped from **`11,398 ms` to `659 ms` (17.3x faster)**, cutting total passthrough compile time from **`13,194 ms` to `2,704 ms`** (-79.5%; the remaining `38` fast ones under ~60 ms stay uncached below the keep threshold as intended).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2975/head:github-bot/gh-2975'
git switch 'github-bot/gh-2975'

Merge

Merge the changes and update on Forgejo.
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2975'
git switch 'github-bot/gh-2975'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2975'
git switch 'github-bot/gh-2975'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2975'
git switch 'nvidia-dev'
git merge --squash 'github-bot/gh-2975'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2975'
git switch 'nvidia-dev'
git merge 'github-bot/gh-2975'
git push origin 'nvidia-dev'
This discussion has been locked. Commenting is limited to contributors.
No description provided.