XII Release 0.1.0
Loading...
Searching...
No Matches
xiiRenderGraphManager Class Reference

#include <RenderGraphManager.h>

Public Types

using BuildDelegate = xiiDelegate<xiiResult(xiiRenderGraph&, xiiRenderGraphBlackboard&, const xiiView*)>

Static Public Member Functions

static xiiRenderGraphHandle CreateGraph (xiiStringView sName, BuildDelegate buildDelegate)
static xiiResult DestroyGraph (xiiRenderGraphHandle hGraph)
static xiiRenderGraph * GetGraph (xiiRenderGraphHandle hGraph)
static xiiRenderGraphBlackboard * GetBlackboard (xiiRenderGraphHandle hGraph)
static xiiResult ExecuteGraph (const xiiRenderGraphFrame &frame, xiiRenderGraphHandle hGraph, const xiiView *pView, const xiiRenderGraphCompileSettings &settings={}, xiiStringBuilder *out_pError=nullptr)
static xiiRenderGraphResourceCache * GetResourceCache ()
 Returns the device-scoped transient resource cache. Its frame lifecycle is managed by xiiRenderGraphFrame.
static xiiRenderGraphTimestampProfiler * GetProfiler ()
 Returns the shared GPU timestamp profiler, which is used when GPU profiling is enabled.
static xiiResult GetFrameCompletion (xiiUInt64 uiFrameIndex, xiiUInt64 &out_uiCompletedFrame)

Friends

class xiiRenderGraphFrame
class xiiRenderGraphManagerState

Detailed Description

Owns render graphs and the shared GPU resources used to execute them. Graph execution is explicit: registering a graph does not schedule it. Each graph owns its blackboard; transient physical resources are shared per device. Graph creation and destruction are serialized with frame recording.

Member Function Documentation

◆ CreateGraph()

xiiRenderGraphHandle xiiRenderGraphManager::CreateGraph ( xiiStringView sName,
BuildDelegate buildDelegate )
staticnodiscard

Creates a manager-owned render graph. The delegate is invoked whenever ExecuteGraph() is called. A separate graph instance should be created for each view that requires independent graph or temporal state.

◆ DestroyGraph()

xiiResult xiiRenderGraphManager::DestroyGraph ( xiiRenderGraphHandle hGraph)
staticnodiscard

Invalidates the handle immediately. During a GPU frame, graph-owned resources are retained until End() waits for that frame to complete; otherwise waits for prior submissions before release.

◆ ExecuteGraph()

xiiResult xiiRenderGraphManager::ExecuteGraph ( const xiiRenderGraphFrame & frame,
xiiRenderGraphHandle hGraph,
const xiiView * pView,
const xiiRenderGraphCompileSettings & settings = {},
xiiStringBuilder * out_pError = nullptr )
staticnodiscard

Builds, compiles, and executes exactly one graph for the supplied view within an active shared GPU frame. Calls must be made on the thread that began the frame. Graphs are executed in caller-specified order.

◆ GetFrameCompletion()

xiiResult xiiRenderGraphManager::GetFrameCompletion ( xiiUInt64 uiFrameIndex,
xiiUInt64 & out_uiCompletedFrame )
staticnodiscard

Returns conservative queue completion for the currently active shared GPU frame. Allows pass-owned histories to retire images after all consumers have completed. Does not wait or advance the timeline.

◆ GetGraph()

xiiRenderGraph * xiiRenderGraphManager::GetGraph ( xiiRenderGraphHandle hGraph)
staticnodiscard

Borrowed graph and blackboard access. Returns null for stale handles. The caller must serialize access with execution and destruction of this graph.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Pipeline/RenderGraphManager.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Pipeline/Implementation/RenderGraphManager.cpp