public sealed class RenderGraphA frame, declared before it happens.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Passes state what they read and write; the graph culls what nothing needs, gives non-overlapping resources the same memory, places the barriers, derives the attachment load and store actions, and then runs the passes that survived.
This is not optional garnish ([05](../../docs/plan/05-graphics-rhi.md)). With six backends, hand-maintaining barrier correctness across deferred shading, shadows, SSAO, SSR, TAA, bloom and depth of field is not achievable — and a barrier that is merely too broad costs performance silently while one that is too narrow is a race that reproduces on one vendor's driver and not another's. Hand-written barriers stay available through Barrier for the hot paths that want them.
The graph is rebuilt every frame and that is deliberate: a frame's passes depend on what is visible, and a cached graph would be a cache invalidated by everything. Rebuilding is cheap because the physical resources are not — TransientResourcePool holds those across frames.
Fields and properties (5)
public TransientResourcePool PoolThe pool its transient resources come from.
public int PassCountHow many passes were declared.
public int SurvivingPassCountHow many passes survived culling. Meaningless before Compile.
public int ResourceCountHow many virtual resources were declared.
public int BarrierCountHow many barriers the last Execute emitted.
Methods (16)
public RenderGraph(IGraphicsDevice device)Creates a graph and the pool its transients come from.
public RenderGraph(IGraphicsDevice device, TransientResourcePool pool)Creates a graph over an existing pool.
public GraphTexture CreateTexture(in TextureDescription description)Declares a texture the graph will provide.
public GraphBuffer CreateBuffer(in BufferDescription description)Declares a buffer the graph will provide.
public GraphTexture ImportTexture(TextureHandle handle, TextureViewHandle view, in TextureDescription description, ResourceState entryState = Undefined, ResourceState exitState = Undefined)Brings a texture the graph does not own into it.
public GraphBuffer ImportBuffer(BufferHandle handle, in BufferDescription description, ResourceState entryState = Undefined, ResourceState exitState = Undefined)Brings a buffer the graph does not own into it.
public void AddPass(string name, Action<RenderGraphPassBuilder> setup)Adds a pass.
public void Compile()Works out what runs, what shares memory, and where the barriers go.
public void Execute(ICommandList commandList)Runs it.
public void Reset()Forgets the frame, keeping the physical resources.
public string ToGraphviz()The compiled graph as Graphviz DOT.
public void DisposePool()Releases the pool, when the graph made one.
public TextureHandle TextureOf(GraphTexture texture)The physical texture a virtual one was given.
public TextureViewHandle ViewOf(GraphTexture texture)The default view of the physical texture a virtual one was given.
public BufferHandle BufferOf(GraphBuffer buffer)The physical buffer a virtual one was given.
public TextureDescription DescribeTexture(GraphTexture texture)The description a texture was declared or imported with.
Used by (81, showing 40)
- PbrShowcaseGamePbrShowcase
- TriangleGameHelloTriangle
- UiHostHelloUi
- VideoGameVideoPlayback
- AutoExposureRendererVixen.Rendering.PostFx
- AutoExposureTestsVixen.Rendering.PostFx.Tests
- BloomRendererVixen.Rendering.PostFx
- BloomTestsVixen.Rendering.PostFx.Tests
- BufferReadbackRendererVixen.Rendering
- BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
- BufferTransferTestsVixen.Rendering.Tests
- BufferUploadRendererVixen.Rendering
- ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
- ClusterCullingRendererVixen.Rendering
- ClusteredLightingTestsVixen.Rendering.Tests
- CompositorAssetTestsVixen.Rendering.Tests
- CompositorFrameVixen.Rendering
- ComputeRendererVixen.Rendering
- DebugDrawImageTestsVixen.Graphics.Golden.Tests
- DepthPrepassTestsVixen.Rendering.Tests
- DescriptorBindingTestsVixen.Rendering.Tests
- EditorGizmoFacingDeviceTestsVixen.Graphics.Golden.Tests
- FixtureVixen.Graphics.Golden.Tests
- ForwardFrameTestsVixen.Rendering.Tests
- FrameVixen.Rendering.Tests
- FullScreenRendererVixen.Rendering
- GlobalDistanceFieldRendererVixen.Rendering
- GoldenImageTestsVixen.Graphics.Golden.Tests
- GpuCullingRendererVixen.Rendering
- GpuVisibilityGroupTestsVixen.Rendering.Tests
- GraphicsCompositorVixen.Rendering
- GraphicsCompositorTestsVixen.Rendering.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests