public sealed class PipelineCachePipelines, created once per distinct PipelineKey.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Creating a pipeline is the most expensive thing a frame can do — a driver compiles and optimises the shader for the exact state — so doing it in a draw call is the classic cause of a first-run stutter that profiling attributes to the wrong thing. Cached here, and asked for by a key that names everything the driver was given.
The cache never evicts. A project's distinct pipelines are bounded by its materials and its compositor, which are both authored rather than generated, and dropping one only to recreate it is the stutter this exists to remove.
Fields and properties (1)
public int CountHow many distinct pipelines have been created.
Methods (4)
public PipelineCache(IGraphicsDevice device)Pipelines, created once per distinct PipelineKey.
public bool TryGet(in PipelineKey key, out PipelineHandle pipeline)The pipeline for a key, if there already is one.
public PipelineHandle GetOrCreate(in PipelineKey key, Func<GraphicsPipelineDescription> describe)The pipeline for a key, creating it from the first time.
public void Clear()Forgets every pipeline, for a device loss or a shader reload.
Used by (7)
- CompositorAssetTestsVixen.Rendering.Tests
- GraphicsCompositorTestsVixen.Rendering.Tests
- MeshRenderFeatureVixen.Rendering
- MeshRenderFeatureTestsVixen.Rendering.Tests
- ParticleRenderFeatureVixen.Rendering
- SkinningAndInstancingTestsVixen.Rendering.Tests
- SpriteRenderFeatureVixen.Rendering