ludus::graphics::renderer::RenderGraph¶
Ludus Wiki · API overview · Browse API
Class
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
#include <ludus/graphics/renderer/render_graph.hpp>
class ludus::graphics::renderer::RenderGraph final
Members¶
internal::RenderGraphRayPass¶
friend class internal::RenderGraphRayPass
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Methods¶
RenderGraph¶
ludus::graphics::renderer::RenderGraph::RenderGraph() noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
~RenderGraph¶
ludus::graphics::renderer::RenderGraph::~RenderGraph() noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
RenderGraph¶
ludus::graphics::renderer::RenderGraph::RenderGraph(const RenderGraph &)=delete
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
operator=¶
RenderGraph & ludus::graphics::renderer::RenderGraph::operator=(const RenderGraph &)=delete
Related types: RenderGraph
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Initialize¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Initialize(rhi::DeviceHandle device, const RenderGraphPlan &plan, const RenderGraphPrograms &programs, RenderGraphAttachmentPool *poolOrNull=nullptr, foundation::uint32 referenceWidth=0, foundation::uint32 referenceHeight=0, const LightTransformerModelDescription *modelOrNull=nullptr) noexcept
| Parameter | Description |
|---|---|
device |
Ready owned device without an open frame; outlives this graph.
|
plan |
Numeric plan; its records are copied before return.
|
programs |
Cooked stages; artifact storage stays alive until Initialize/Poll reaches Ready.
|
referenceWidth |
Drawable view width for relative resources; zero rejects unresolved relative sizes.
|
referenceHeight |
Drawable view height, independent of any other graph instance.
|
poolOrNull |
Optional RG4 attachment pool on the same device; transient backings are taken from it and returned on Reset. Null selects the serial control: every attachment is created here and destroyed on Reset. Both paths encode identical commands. An uninitialized pool, or one bound to a destroyed device, rejects with InvalidDescription. The pool must be bound to this device and outlive this graph.
|
modelOrNull |
Required exactly for HasLightTransformer programs. Assets are copied; encoder artifact storage survives Poll. The model uses diffuse mesh-emitter inputs and fixed training scale; pending/failed scene encoding keeps the drawable generation.
|
Related types: RenderGraphAttachmentPool · foundation::uint32 · rhi::RasterStatus · LightTransformerModelDescription · RenderGraphPlan · RenderGraphPrograms · rhi::DeviceHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Resize¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Resize(foundation::uint32 referenceWidth, foundation::uint32 referenceHeight) noexcept
Related types: foundation::uint32 · rhi::RasterStatus
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
HasPendingResize¶
bool ludus::graphics::renderer::RenderGraph::HasPendingResize() const noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetResourceDescription¶
bool ludus::graphics::renderer::RenderGraph::GetResourceDescription(foundation::uint32 resource, content::render_graph_format::Resource &outResource) const noexcept
Related types: foundation::uint32 · content::render_graph_format::Resource
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetPersistentBuffer¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetPersistentBuffer(foundation::uint32 resource, rhi::BufferHandle &outBuffer, foundation::usize &outBytes) const noexcept
| Parameter | Description |
|---|---|
resource |
Numeric Buffer resource index in this graph's cooked plan.
|
outBuffer |
Borrowed allocation, written only on Ready.
|
outBytes |
Usable byte capacity, written only on Ready.
|
Returns
Related types: foundation::usize · foundation::uint32 · rhi::RasterStatus · rhi::BufferHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetAllocationReport¶
RenderGraphAllocationReport ludus::graphics::renderer::RenderGraph::GetAllocationReport() const noexcept
Related types: RenderGraphAllocationReport
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Poll¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Poll() noexcept
Related types: rhi::RasterStatus
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Update¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Update(foundation::BorrowedView< const RenderGraphMesh > meshes, foundation::BorrowedView< const RenderGraphItem > items, foundation::BorrowedView< const ViewDescription > cameras, foundation::uint64 sceneRevision, RenderGraphCoveragePolicy policy, RenderGraphReport &outReport, const SceneShaderInputs *sceneInputsOrNull=nullptr, foundation::uint64 contentRevision=0, const RenderGraphSceneRevisions &revisions={}) noexcept
| Parameter | Description |
|---|---|
meshes |
Borrowed static geometry table, copied during a full extraction.
|
items |
Borrowed instances, transforms, material bindings and per-draw values.
|
cameras |
Complete generation-local camera table; consumed before return.
|
sceneRevision |
Nonzero identity for the requested drawable scene/view publication.
|
policy |
Whether unsupported coverage rejects or receives diagnostic color.
|
outReport |
Latest candidate diagnostics, independent of the retained drawable output. Preflight rejection preserves it; coverage/preparation results replace it.
|
sceneInputsOrNull |
Optional borrowed material/light/environment inputs for a full extraction.
|
contentRevision |
Optional nonzero identity for all non-camera inputs. Reusing it promises unchanged geometry, transforms, materials, lights, uniforms and coverage policy; only cameras and sceneRevision may change. This reuses scene/acceleration buffers and resets camera history. Mesh/item/shader inputs are ignored while reusing that identity; their original storage need not survive the original Update. Zero always prepares a complete extraction.
|
revisions |
Optional domain revision promises. All-zero preserves contentRevision behavior. A fully nonzero record enables the same camera-only reuse when every domain and coverage policy match. Resize and new generations also prepare in full. At ray-history identity exhaustion, supplied geometry permits a full restart; camera-only inputs return IdentityExhausted and preserve the drawable view. A full Update with contentRevision zero can restart it.
|
Related types: foundation::BorrowedView · foundation::uint64 · RenderGraphCoveragePolicy · rhi::RasterStatus · RenderGraphItem · RenderGraphMesh · RenderGraphReport · RenderGraphSceneRevisions · SceneShaderInputs · ViewDescription
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetCoverage¶
foundation::BorrowedView< const RenderGraphCoverageRecord > ludus::graphics::renderer::RenderGraph::GetCoverage() const noexcept
Related types: foundation::BorrowedView · RenderGraphCoverageRecord
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetReport¶
RenderGraphReport ludus::graphics::renderer::RenderGraph::GetReport() const noexcept
Related types: RenderGraphReport
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetDrawableSceneRevision¶
foundation::uint64 ludus::graphics::renderer::RenderGraph::GetDrawableSceneRevision() const noexcept
Related types: foundation::uint64
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
HasPendingSamples¶
bool ludus::graphics::renderer::RenderGraph::HasPendingSamples() const noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetOutputSceneRevision¶
foundation::uint64 ludus::graphics::renderer::RenderGraph::GetOutputSceneRevision() const noexcept
Related types: foundation::uint64
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Render¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Render(rhi::SurfaceHandle surface, foundation::uint32 surfaceWidth, foundation::uint32 surfaceHeight, rhi::SubmissionToken &outCompletion) noexcept
| Parameter | Description |
|---|---|
surface |
Borrowed owned-device submission surface.
|
outCompletion |
Empty token; receives accepted submission identity even on partial failure.
|
surfaceWidth |
Current drawable width, supplied by the surface owner.
|
surfaceHeight |
Current drawable height, supplied by the surface owner. Acquisition rechecks dimensions; a resize racing acquisition may clear/present the surface when ending that frame, but never publishes a new valid export. Partial accepted work may return a token even on failure; it never establishes image correctness.
|
Related types: foundation::uint32 · rhi::RasterStatus · rhi::SubmissionToken · rhi::SurfaceHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
PrepareEncoding¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::PrepareEncoding() noexcept
Returns
Related types: rhi::RasterStatus
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Encode¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::Encode(rhi::SurfaceHandle surface) noexcept
Related types: rhi::RasterStatus · rhi::SurfaceHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
HasUnconfirmedEncoding¶
bool ludus::graphics::renderer::RenderGraph::HasUnconfirmedEncoding() const noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
ConfirmSubmission¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::ConfirmSubmission(rhi::SubmissionToken completion) noexcept
Precondition
Related types: rhi::RasterStatus · rhi::SubmissionToken
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetExportAllocation¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetExportAllocation(foundation::uint32 resource, rhi::TextureHandle &outTexture, rhi::TextureAspect &outAspect) const noexcept
Related types: foundation::uint32 · rhi::TextureAspect · rhi::RasterStatus · rhi::TextureHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetExport¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetExport(foundation::uint32 resource, rhi::TextureHandle &outTexture, rhi::TextureAspect &outAspect) const noexcept
Related types: foundation::uint32 · rhi::TextureAspect · rhi::RasterStatus · rhi::TextureHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetResourceAllocation¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetResourceAllocation(foundation::uint32 resource, rhi::TextureHandle &outTexture, rhi::TextureAspect &outAspect) const noexcept
| Parameter | Description |
|---|---|
resource |
Logical resource index in the plan.
|
outTexture |
Receives the borrowed backing allocation; unchanged on failure.
|
outAspect |
Receives Color for colour resources and Depth for depth resources.
|
Returns
Related types: foundation::uint32 · rhi::TextureAspect · rhi::RasterStatus · rhi::TextureHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
RequestRayPathCapture¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::RequestRayPathCapture(const RayPathCaptureDescription &description) noexcept
| Parameter | Description |
|---|---|
description |
Pixel, sample count and record capacity; copied before return.
|
Returns
Related types: rhi::RasterStatus · RayPathCaptureDescription
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
PollRayPathCapture¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::PollRayPathCapture(RayPathCaptureReport &outReport) noexcept
| Parameter | Description |
|---|---|
outReport |
Receives the decoded counters on Ready; unchanged otherwise.
|
Returns
Related types: rhi::RasterStatus · RayPathCaptureReport
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
SetAccumulationLimitOverride¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::SetAccumulationLimitOverride(foundation::uint32 samples) noexcept
| Parameter | Description |
|---|---|
samples |
New limit, from one to MAX_RENDER_GRAPH_CAPTURE_SAMPLES.
|
Returns
Related types: foundation::uint32 · rhi::RasterStatus
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetAccumulation¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetAccumulation(foundation::uint32 pass, rhi::BufferHandle &outBuffer) const noexcept
| Parameter | Description |
|---|---|
pass |
Plan pass index of a ray pass.
|
outBuffer |
Receives the borrowed buffer; unchanged on failure.
|
Returns
Related types: foundation::uint32 · rhi::RasterStatus · rhi::BufferHandle
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
SetRayTileCount¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::SetRayTileCount(foundation::uint32 tileCount) noexcept
| Parameter | Description |
|---|---|
tileCount |
Bands per sample, from one (whole-image dispatches) to MAX_RENDER_GRAPH_RAY_TILES.
|
Returns
Related types: foundation::uint32 · rhi::RasterStatus
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetSubmittedRaySamples¶
foundation::uint32 ludus::graphics::renderer::RenderGraph::GetSubmittedRaySamples() const noexcept
Related types: foundation::uint32
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetRayWorkload¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::GetRayWorkload(RenderGraphRayWorkload &outWorkload) const noexcept
| Parameter | Description |
|---|---|
outWorkload |
Receives the pixels and lights; unchanged on failure.
|
Returns
Related types: rhi::RasterStatus · RenderGraphRayWorkload
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
PollRayFailures¶
rhi::RasterStatus ludus::graphics::renderer::RenderGraph::PollRayFailures(foundation::uint32 pass, RenderGraphRayFailures &outFailures) noexcept
| Parameter | Description |
|---|---|
pass |
Plan pass index of a ray pass.
|
outFailures |
Receives the counts on Ready; unchanged otherwise.
|
Returns
Related types: foundation::uint32 · rhi::RasterStatus · RenderGraphRayFailures
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetRayPathEvents¶
foundation::BorrowedView< const RayPathEvent > ludus::graphics::renderer::RenderGraph::GetRayPathEvents() const noexcept
Related types: foundation::BorrowedView · RayPathEvent
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
GetRayPathSummaries¶
foundation::BorrowedView< const RayPathSummary > ludus::graphics::renderer::RenderGraph::GetRayPathSummaries() const noexcept
Related types: foundation::BorrowedView · RayPathSummary
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp
Reset¶
void ludus::graphics::renderer::RenderGraph::Reset() noexcept
Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp