Vulkan: `vkCreateGraphicsPipelines` is always called with `VkPipelineCache.Null` — every run pays full driver PSO compiles (~150–350 ms first-sight hitches)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: 4.3.0.2507
Platform(s): Vulkan (all)
Describe the bug
PipelineState.Recreate (Vulkan) never creates or uses a VkPipelineCache. Every pipeline
compile goes to the driver cold, every run. We measured repeatable ~150–350 ms hitches on first
sight of each pipeline state on a warm effect cache with zero shader compiles — i.e. these
are driver PSO compiles, not Stride shader compiles, and no game-side mechanism can avoid them.
To Reproduce
- Any non-trivial Vulkan scene; run once to warm the effect cache.
- Run again; profile frame times on first sight of new pipeline states (e.g. first transparent
object, first shadow-casting light). Hitches persist across runs.
Expected behavior
A persisted pipeline cache (create once per device, serialize to the local app cache dir,
feed back on startup) makes second runs hitch-free — standard Vulkan practice.
Additional context
Fix shape: create a VkPipelineCache per device, pass it to every
vkCreateGraphicsPipelines/vkCreateComputePipelines, persist vkGetPipelineCacheData on
shutdown and preload on device init. Happy to PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Vulkan implementation of PipelineState.Recreate and trace device initialization and shutdown. Check every vkCreateGraphicsPipelines and vkCreateComputePipelines call, then follow the device cache directory handling if one exists. Done means a per-device VkPipelineCache is loaded at startup, passed to pipeline creation, and serialized on shutdown so repeat runs avoid the reported hitches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100