D3D12.X: StorePipeline gives the driver the pipeline behind a stand-in #2853
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2853"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T19:00:01Z.
ID3D12PipelineLibrary::StorePipelinehanded the title's pointer to D3D12Core.dll as it was. A pipeline that is not built yet is a stand-in: astandin::Shell(no driver object) over a dummy driver pipeline shared by many titles' pipelines. The driver therefore got a pointer to a Shell, or (withXCL_SHARED_STANDINS=0) stored the dummy under the title's name for a laterLoad*/Serialize. This is theStorePipelinepart of #2455 only.Part of #2455. Independent of #2523 (MakeResident / Evict); touches different lines.
What is in it
real.rs:StorePipelineoverride onKind::PipelineLibrary(lib_store_pipeline→store_pipeline/pipeline_to_store) and 5 CPU-only unit tests (store_pipeline_tests).pso_async.rs:built(pso), a non-blocking lookup of a stand-in's real pipeline (Other/Real/NotYet).standin.rs:is_shell(obj), true for one of our shells.Behaviour:
E_INVALIDARG(logged for the first 3). A laterStorePipelineof the same name works once the pipeline is built.resolve_wait): a lazy pipeline is built only when bound (XCL_LAZY_PSO), and a wait would build every pipeline a title stores, defeating lazy creation (commit exhaustion), and could hold the title's thread for the driver's compile time. It does not callresolveeither, which would enqueue a build.Tested
XCL_ADAPTER=NONE_CPU_ONLY). Windows 11, stable-x86_64-pc-windows-msvc, debug.cargo check --workspace --tests -j 4: finished, no errors.cargo test -p xcl --lib -j 4 store_pipeline_tests: 5 passed, 0 failed, 0 ignoredcargo test -p xcl --lib -j 4 d3d12x::standin: 2 passed;d3d12x::pso_async: 14 passedpipeline_to_storereturning its argument),store_pipeline_tests: 1 passed, 4 failed; restored afterwards.store_pipelinewith a fake driver callback and fake COM objects: pass-through, built stand-in → real pipeline (never the Shell or the dummy), lazy-unbuilt, failed build, shell with no entry.Regression run
cargo test --workspace -- --test-threads=4) and the pairedscripts/smoke.ps1runs (main and this head) are pending a free RX 7800 XT (it was in use by another run). They will be pasted here; thePR checksworkflow will refuse this PR until then, hence draft.Not tested
scripts/smoke.ps1, any retail title: all pending a free GPU.adopt+slot_ofon a nativeID3D12PipelineLibrary) was not exercised: the tests cover the logic behind it, not the dispatch. No native library was created.ID3D12PipelineLibrary1::LoadPipeline,GetCachedBlobon a shell (see the comment on #2455) and other entry points are out of scope.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-28T03:56:18Z.
Rebased onto
xcl-dev/xclmain(e429936c), head is nowe38cee64.pso_async::builtto readp.build.real(matchingPending's current layout onmain) and kept both test modules at the end ofreal.rs.XCL_WARP=1 cargo test -p xcl --lib -j 4 store_pipeline_tests): 5 passed, 0 failed, 0 ignored.AI use: Antigravity (Gemini 4 Neon) completed the rebase and ran the targeted WARP unit tests.
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-28T20:55:09Z.
Rebased onto
mainbeeb81be; new heada1b258ad.pso_async.rs, wheremainaddedpeekat the same spot asbuilt. Kept both.XCL_ADAPTER=NONE_CPU_ONLY, no GPU, debug):store_pipeline_tests5 passed, 0 failed, 0 ignored;d3d12x::standin3 passed;pso_async191 passed, 0 failed.scripts/smoke.ps1; the Regression run section in the description is still pending, so this stays a draft.AI use: Claude Code, Claude Sonnet 5.5, did the rebase and ran the tests above.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:04:03Z.
Triage (#1607) – head
a1b258aNo open or merged PR overrides
ID3D12PipelineLibrary::StorePipeline; main has no override forKind::PipelineLibrary.#2523 (MakeResident/Evict) and #2861 (CreateCommandList) handle other parts of #2455, so they are not duplicates. #2523 also adds
standin::is_shell(via aVTABLEstatic), so the two will conflict instandin.rs; whichever merges second should reuse the other's helper.No problems found in the diff.
built()neither waits nor enqueues a build, and returningE_INVALIDARGfor an unbuilt stand-in is documented.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.