Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/PrismaEngine/llms.txt
Use this file to discover all available pages before exploring further.
Prisma::Graphic::RenderGraph is a frame graph system for declaring GPU passes and their resource dependencies at a high level. Instead of manually managing resource barriers and execution order, you describe each pass’s reads and writes through an RGBuilder, then call Compile() to resolve the dependency graph and Execute() to record and submit the commands. The render graph is currently in active development — the core API is stable, but automatic aliasing and async-compute scheduling are not yet implemented.
The RenderGraph is marked in progress in the engine roadmap. It exists alongside the current
ScriptableRenderPipeline implementation, which uses explicit ForwardPipeline and DeferredPipeline passes. The graph API documented here is production-ready for use within those pipelines; full standalone graph execution is under development.Resource description
RGResourceDesc
Describes a GPU resource to be created and managed by the graph.The resource category:
Texture2D, Buffer, or RenderTarget.Width in pixels (textures and render targets only).
Height in pixels (textures and render targets only).
Pixel format of the resource.
RGBA8 for standard colour, RGBA16F for HDR, D32F for depth.RGResourceDesc::Texture2D (factory)
type = Type::Texture2D automatically.
RGResourceHandle
RGBuilder::CreateTexture(). Pass them to RGBuilder::Read() and RGBuilder::Write() to declare pass dependencies. Always check IsValid() before using a handle.
Pass builder
RGBuilder
Each pass receives anRGBuilder during its setup lambda. Use it to declare resource creation and access patterns — the graph uses this information to infer execution order and schedule barriers.
RGBuilder::CreateTexture
Compile() is called.
Describes the texture dimensions and format.
Debug name for the resource, visible in GPU frame capture tools such as RenderDoc and PIX.
RGBuilder::Read
handle. The graph uses this to insert a read barrier before the pass executes.
A valid handle returned by a previous
CreateTexture() call on this or an earlier pass.RGBuilder::Write
handle. The graph uses this to insert a write barrier and to establish that this pass must execute before any pass that reads the same resource.
A valid handle returned by
CreateTexture().RenderGraph
Constructor
The render device used to allocate GPU resources at compile time. Obtain from
RenderSystem::GetDevice().RenderGraph::AddPass
setup lambda runs immediately during AddPass() to declare resources and produce PassData. The execute lambda is stored and called later during Execute().
Unique name for this pass. Used in GPU capture tools and error messages.
A callable with signature
void(RGBuilder& builder, PassData& data). Declare all resource reads and writes here. Do not issue GPU commands.A callable with signature
void(const PassData& data, RGContext& ctx). Issue GPU commands through ctx.GetCmd(). Called during Execute() in dependency-resolved order.RenderGraph::Compile
Execute().
RenderGraph::Execute
Compile(). Each pass’s execute lambda is called with the appropriate RGContext wrapping the provided command context.
The command context to record into. Obtain from the current frame’s command list via
IRenderDevice.Execution context
RGContext
GetCmd() to access the underlying command context for issuing draw calls, dispatches, and copy operations.
Relationship to built-in pipelines
The current forward and deferred pipelines are implemented as explicit pass classes rather thanRenderGraph nodes:
RenderGraph passes in a future release. New custom pipelines are encouraged to adopt the RenderGraph API now so that automatic barrier scheduling and resource aliasing can be enabled as the system matures.