public sealed class EffectLoaderTurns a baked EffectData into a live Effect on one device.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The one step between "bytes that came from somewhere" and "a thing a pipeline can be built from", and the only step in the whole chain that needs a device. Every tier — the disk cache, the baked bundle, the dev machine on the other end of a socket — hands over the same record and this creates the same handles from it, so where a variant came from changes nothing about what it is.
Set layouts are shared between effects, and that is not just an economy. Every shader that binds the per-frame set describes the same layout, and a device handed four hundred structurally identical layouts creates four hundred objects that a descriptor set allocated against one cannot be used with the other. Caching by shape means a per-frame set is allocated once and bound to every pipeline in the frame.
⚠ And so is the pipeline layout, which for a long time was not. It is a function of the set layouts and the push-constant ranges and of nothing else, so it caches by exactly the same argument — see PipelineLayoutOf. Until #1111 a fresh one was created per Load, owned by nobody, and freed by one caller out of five.
Fields and properties (4)
public IGraphicsDevice DeviceThe device these effects are created on.
public int LayoutCountHow many distinct set layouts have been created.
public int PipelineLayoutCountHow many distinct pipeline layouts have been created.
public int BindlessCapacityHow many descriptors an unbounded binding holds.
Methods (4)
public EffectLoader(IGraphicsDevice device)Turns a baked EffectData into a live Effect on one device.
public Effect Load(EffectData data)Creates the effect one record describes.
public void Clear()Forgets every cached layout, without destroying anything.
public void Release()Destroys every layout this loader created, and forgets them.
Used by (57, showing 40)
- DevelopmentEffectsThirdPersonShooter
- DevelopmentEffectsPbrShowcase
- LibraryEffectsVirtualGeometry
- AccelerationStructureDeviceTestsVixen.Graphics.Golden.Tests
- BentNormalAmbientImageTestsVixen.Graphics.Golden.Tests
- BindlessSamplingDeviceTestsVixen.Graphics.Golden.Tests
- BindlessSetLayoutTestsVixen.Shaders.Tests
- BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
- CascadeCountDeviceTestsVixen.Graphics.Golden.Tests
- ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- CompilerVixen.Graphics.Golden.Tests
- CompilingVixen.Graphics.Golden.Tests
- DistanceFieldAoImageTestsVixen.Graphics.Golden.Tests
- DitherImageTestsVixen.Graphics.Golden.Tests
- DynamicUniformBlockTestsVixen.Shaders.Tests
- EffectCacheTestsVixen.Shaders.Tests
- EffectSourceProviderVixen.Shaders
- ForwardFrameTestsVixen.Rendering.Tests
- GtaoImageTestsVixen.Graphics.Golden.Tests
- IndirectDiffuseImageTestsVixen.Graphics.Golden.Tests
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceFillDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceRepairDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
- LightStreakImageTestsVixen.Graphics.Golden.Tests
- MaxLightsDeviceTestsVixen.Graphics.Golden.Tests
- MorphScatterDeviceTestsVixen.Graphics.Golden.Tests
- MultiScatterFurnaceImageTestsVixen.Graphics.Golden.Tests
- ParticleMeshDeviceTestsVixen.Graphics.Golden.Tests
- ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
- ReflectionRendererDeviceTestsVixen.Graphics.Golden.Tests
- ReflectionTraceDeviceTestsVixen.Graphics.Golden.Tests
- ScreenProbeAccumulateDeviceTestsVixen.Graphics.Golden.Tests
- ScreenProbeBilateralImageTestsVixen.Graphics.Golden.Tests
- ScreenProbeGatherImageTestsVixen.Graphics.Golden.Tests
- ScreenProbeResolveDeviceTestsVixen.Graphics.Golden.Tests
- ScreenProbeTraceDeviceTestsVixen.Graphics.Golden.Tests
- ScreenProbeUpsampleImageTestsVixen.Graphics.Golden.Tests
- ScreenPyramidDeviceTestsVixen.Graphics.Golden.Tests