Repository navigation
Conversation
A title's pipeline that is not built yet is a stand-in: a `standin::Shell` (no driver object) over a dummy driver pipeline shared by many. The library passed the title's pointer to D3D12Core.dll as it was, so the driver got a Shell it cannot use, or (with XCL_SHARED_STANDINS=0) stored the dummy under the title's name for a later Load / Serialize. StorePipeline on Kind::PipelineLibrary now stores the real pipeline once it is built and leaves a pointer that is no stand-in alone. A stand-in whose real pipeline is not built, or whose build failed, is not stored: the title gets E_INVALIDARG and may store it again later. It does not wait for the build (a lazy pipeline is not built until a bind asks), so storing never builds what the title does not use. Part of xcl-dev#2455. Assisted-by: Claude Code (Claude Sonnet 5.5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 D3D12.X: unresolved standin::Shell pointers leak into native MakeResident, Evict, StorePipeline, and PC CreateCommandList #2455) and other entry points are out of scope.AI use
🤖 Generated with Claude Code