![]() |
XII Release 0.1.0
|
#include <GpuFrameCompletionTracker.h>
Public Member Functions | |
| void | Initialize (xiiGALDevice *pDevice) |
| void | Reset () |
| void | CaptureSubmittedFrame (xiiUInt64 uiFrameIndex) |
| xiiUInt64 | PollCompletedFrames () |
| Polls queue fences without blocking and returns the last fully completed frame. | |
| void | WaitForFrame (xiiUInt64 uiFrameIndex) |
| xiiUInt64 | GetLastCompletedFrame () const |
| const xiiGpuFrameCompletionStats & | GetStats () const |
Converts per-queue GAL fence progress into a conservative completed-frame index.
CaptureSubmittedFrame() is called after every queue submission belonging to a frame. PollCompletedFrames() advances only when every unique queue used by that frame has completed the value captured for it. The result is safe for deferred destruction, bindless index recycling, streaming eviction, and frame-ring reuse. Frame indices start at one; zero is reserved as the conservative "none completed" value.
| void xiiGpuFrameCompletionTracker::CaptureSubmittedFrame | ( | xiiUInt64 | uiFrameIndex | ) |
Snapshots the latest submitted value on graphics, compute, and transfer queues. Queue fallbacks that resolve to the same physical GAL queue are recorded once.
| void xiiGpuFrameCompletionTracker::WaitForFrame | ( | xiiUInt64 | uiFrameIndex | ) |
Blocks until every queue submission captured for the requested frame has completed. Use this before reusing a frame-ring slot. Frames must have been captured sequentially.