|
|
| xiiRenderGraph (xiiStringView sName="RenderGraph") |
| void | BeginSetup (xiiUInt64 uiFrameIndex) |
| xiiUInt64 | GetFrameIndex () const |
|
xiiUInt64 | GetSetupSerial () const |
| template<typename TPassData> |
| std::pair< TPassData *, xiiRenderGraphPassHandle > | AddPass (xiiStringView sName, xiiBitflags< xiiGALCommandQueueFlags > queueFlags, xiiDelegate< void(TPassData &, xiiRenderGraphBuilder &)> setupDelegate, xiiDelegate< void(const TPassData &, xiiRenderGraphPassContext &)> executeDelegate, bool bHasSideEffects=false) |
|
void | EndSetup () |
| | Finalizes the setup phase. Must be called after all AddPass calls.
|
| void | SetSetupBinding (xiiStringView name, xiiRenderGraphTextureHandle texture) |
|
void | SetSetupBinding (xiiStringView name, xiiRenderGraphBufferHandle buffer) |
|
void | ClearSetupBindings () |
| void | SetResourceNamespace (xiiStringView name) |
|
xiiStringView | GetResourceNamespace () const |
|
void | SetSetupBlackboard (xiiRenderGraphBlackboard *blackboard) |
|
xiiRenderGraphBlackboard * | GetSetupBlackboard () const |
|
xiiRenderGraphTextureHandle | FindTexture (xiiStringView name) const |
|
xiiRenderGraphBufferHandle | FindBuffer (xiiStringView name) const |
|
const xiiGALTextureCreationDescription * | GetTextureDescription (xiiRenderGraphTextureHandle texture) const |
| | Setup-time descriptions. Invalid handles and mismatched resource identities return null.
|
|
const xiiGALBufferCreationDescription * | GetBufferDescription (xiiRenderGraphBufferHandle buffer) const |
| xiiResult | Compile (const xiiRenderGraphCompileSettings &settings={}, xiiStringBuilder *out_pError=nullptr) |
| xiiResult | Execute (xiiGALDevice *pDevice, const xiiView *pView, xiiRenderGraphBlackboard *pBlackboard, xiiRenderGraphResourceCache *pResourceCache, xiiRenderGraphProfiler *pProfiler=nullptr, xiiStringBuilder *out_pError=nullptr) |
|
const xiiRenderGraphStatistics & | GetStatistics () const |
| | Returns the graph's compile-time statistics, populated after Compile() and useful for diagnostics.
|
|
xiiArrayPtr< const xiiRenderGraphCompiledPass > | GetCompiledPasses () const |
| | Returns the list of compiled passes, in execution order, with all metadata needed for execution and profiling.
|
|
xiiArrayPtr< const xiiRenderGraphBarrierDescription > | GetBarriers () const |
| | Returns the list of resource barriers synthesized by the compiler, in the order they are emitted during execution.
|
|
xiiArrayPtr< const xiiRenderGraphMergeGroup > | GetMergeGroups () const |
| | Returns the list of render pass merge groups synthesized by the compiler.
|
|
xiiArrayPtr< const xiiRenderGraphQueueSubmission > | GetQueueSubmissions () const |
| | Returns the list of queue submissions synthesized by the compiler, in execution order.
|
|
xiiRenderGraphId | GetId () const |
| | Process-local ID and name of this graph instance.
|
|
xiiUInt64 | GetInstanceId () const |
| | Process-local identity, unique even when several views use the same stable graph name.
|
|
xiiStringView | GetName () const |
|
xiiArrayPtr< const xiiRenderGraphResourceDescription > | GetResourceDescriptions () const |
| | Reflection/editor-friendly compiler records.
|
|
xiiArrayPtr< const xiiRenderGraphResourceVersionDescription > | GetResourceVersions () const |
|
xiiSharedPtr< xiiGALTexture > | GetExportedTexture (xiiRenderGraphTextureHandle hTexture) const |
| | Returns a strong reference to an exported graph-owned result after Execute().
|
|
xiiSharedPtr< xiiGALBuffer > | GetExportedBuffer (xiiRenderGraphBufferHandle hBuffer) const |
|
xiiResult | DumpToDot (xiiStringBuilder &out_sDot) const |
| | Serializes the compiled graph to a DOT string for Graphviz visualization.
|
|
bool | IsCompiled () const |
| | True if the graph has been compiled and not yet invalidated.
|
Advanced high-performance render graph.
Usage per frame
graph.BeginSetup(uiFrameIndex);
auto [pData, hPass] = graph.AddPass<MyPassData>(
"DepthPrepass",
[](MyPassData& data, xiiRenderGraphBuilder& builder)
{
},
{
context.GetCommandList().ClearDepthStencilView(...);
},
false
);
pData->uiDrawCount = scene.GetDrawCount();
graph.EndSetup();
if (graph.Compile(settings).Succeeded())
{
graph.Execute(pDevice, pView, pBlackboard, pCache, pProfiler);
}
Definition RenderGraph.h:284
@ Graphics
Command queue that supports graphics, compute, ray tracing and transfer commands.
Definition GraphicsTypes.h:1224
@ DepthWrite
The resource is used in a writable depth-stencil view or in clear operation.
Definition GraphicsTypes.h:1815
Threading
- BeginSetup / AddPass / EndSetup: single-threaded (main thread).
- Compile: single-threaded.
- Execute: command list recording per pass is sequential per queue. Queues run genuinely in parallel on the GPU side.
- Pass execute callbacks may safely call xiiRenderGraphBlackboard::TryGet concurrently.