Skip to content

D3D12: enable persistent PSO cache reuse, Fix #811 - #812

Open
hzqst wants to merge 2 commits into
DiligentGraphics:masterfrom
hzqst:master
Open

hzqst wants to merge 2 commits into
DiligentGraphics:masterfrom
hzqst:master

Conversation

@hzqst

@hzqst hzqst commented Oct 17, 2026

Copy link
Copy Markdown
Contributor
  • Restore and own initial library data. Copy supplied bytes into an owned IDataBlob and pass them to CreatePipelineLibrary. Retain the blob with the library through deferred release. If the data is rejected as invalid/incompatible, retry with an empty library. If pipeline libraries are unavailable, allow PSO creation to continue without native caching.
  • Forward the cache during archive unpacking. Set UnpackInfo.pCache = PSOCreateInfo.pPSOCache.
  • Add mesh library support. Query ID3D12PipelineLibrary1, try LoadPipeline for mesh PSO streams, and store newly created mesh PSOs. Populate an explicit primitive-topology subobject so creation and lookup use consistent descriptions.
  • Use deterministic content-based names. Generate PSO_2_<hash> from the root-signature hash, graphics pipeline description when applicable, shader stages, and effective shader bytecode after binding remapping. Hash strings by content rather than pointer address. This removes dependence on display names and supports same-name variants and unnamed pipelines.
  • Serialize library operations. Protect load/store/serialization with one mutex, including parallel PSO creation and cache snapshots.

not sure if a regression test is needed.

…nes.

Retain serialized pipeline library data, use stable content keys, forward caches during archive unpacking, and cache mesh pipelines with explicit topology.
Align consecutive member and local declarations in
PipelineStateCacheD3D12Impl.hpp/.cpp and PipelineStateD3D12Impl.cpp
to satisfy the format validation pre-check. Whitespace only.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant