![]() |
XII Release 0.1.0
|
#include <RenderGraphProfiler.h>
Public Member Functions | |
| xiiRenderGraphTimestampProfiler (xiiSharedPtr< xiiGALDevice > pDevice) | |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| void | OnFrameBegin (xiiUInt64 uiFrameIndex) override |
| Selects the GPU frame before recording a graph. Several graphs may share one frame. | |
| void | SetGraphInstance (xiiUInt64 uiInstanceId) override |
| Called before recording a graph; isolates instances which share a stable graph name. | |
| void | OnGraphBegin (xiiGALCommandList &commandList, xiiUInt64 uiGraphId, xiiUInt32 uiSubmissionIndex, xiiUInt32 uiQueueIndex) override |
| Called at the start of a submission command list. | |
| void | OnGraphEnd (xiiGALCommandList &commandList, xiiUInt64 uiGraphId, xiiUInt32 uiSubmissionIndex, xiiUInt32 uiQueueIndex) override |
| Called at the end of a submission command list. | |
| void | OnPassBegin (xiiGALCommandList &commandList, xiiStringView sPassName, xiiUInt32 uiPassIndex) override |
| Called immediately before a pass records its commands. Insert a begin-query here. | |
| void | OnPassEnd (xiiGALCommandList &commandList, xiiStringView sPassName, xiiUInt32 uiPassIndex) override |
| Called immediately after a pass records its commands. Insert an end-query here. | |
| void | OnFrameEnd (xiiUInt64 uiFrameIndex) override |
| void | OnFrameAbort () override |
| float | GetPassDurationMs (xiiStringView sPassName) const override |
| Returns the last resolved GPU duration for the given pass in milliseconds. | |
| bool | GetPassTiming (xiiUInt64 uiGraphId, xiiUInt32 uiPassIndex, xiiStringView sPassName, float &out_fDurationMs, xiiUInt64 &out_uiFrameIndex) const override |
| Lookup by process-local graph instance and registered pass index. False means unavailable, not zero cost. | |
| float | GetFrameDurationMs () const |
| Returns the last resolved GPU duration for the entire frame in milliseconds. | |
| float | GetGraphDurationMs (xiiUInt64 uiGraphId) const |
| Returns the sum of submission timings for one graph or one graph queue. | |
| float | GetQueueDurationMs (xiiUInt64 uiGraphId, xiiUInt32 uiQueueIndex) const |
Static Public Attributes | |
| static constexpr xiiUInt32 | s_uiRingFrameCount = 3U |
| Number of in-flight frames buffered. | |
| static constexpr xiiUInt32 | s_uiMaxTrackedPasses = 128U |
A concrete render graph profiler that uses GPU Duration queries.
Uses xiiGALQueryType::Duration to bracket each pass with BeginQuery / EndQuery. Results are read back with a configurable number of frames of delay (default: 2) to avoid GPU stalls. Up to xiiRenderGraphTimestampProfiler::MaxTrackedPasses distinct pass names can be tracked simultaneously.
|
nodiscardoverridevirtual |
Returns the last resolved GPU duration for the given pass in milliseconds.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Lookup by process-local graph instance and registered pass index. False means unavailable, not zero cost.
Reimplemented from xiiRenderGraphProfiler.
|
overridevirtual |
Called instead of OnFrameEnd when recording fails, after closing any active query scope. Discard this frame's measurements while retaining in-flight query resources safely.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Selects the GPU frame before recording a graph. Several graphs may share one frame.
Reimplemented from xiiRenderGraphProfiler.
|
overridevirtual |
Called once per frame after all passes have been submitted. Implementations should schedule result readback here (with appropriate frame delay).
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Called at the start of a submission command list.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Called at the end of a submission command list.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Called immediately before a pass records its commands. Insert a begin-query here.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Called immediately after a pass records its commands. Insert an end-query here.
Implements xiiRenderGraphProfiler.
|
overridevirtual |
Called before recording a graph; isolates instances which share a stable graph name.
Reimplemented from xiiRenderGraphProfiler.