class
render::GpuCommandBufferPoolRing
Ring buffer of command buffer pools for managing multiple in-flight frames.
Maintains one pool per frame (kMaximumFramesInFlight pools). Cycles through pools as frames advance, resetting each pool when it comes back around.
Public
Constructors
GpuCommandBufferPoolRing
GpuCommandBufferPoolRing(GpuDevice &gpuDevice, const GpuCommandBufferPoolCreateInformation &createInformation)
Methods
~GpuCommandBufferPoolRing
~GpuCommandBufferPoolRing()
Destroy
void Destroy()
Destroys all pools.
Must be called before the GPU device is destroyed.
AdvanceFrame
void AdvanceFrame()
Advances to the next frame's pool and resets it.
Called at frame boundaries by the renderer after ensuring all command buffers from the target pool have completed execution.
Private
Fields
mPools
Array<SPtr<GpuCommandBufferPool>, kPoolCount> mPools
mCurrentPoolIndex
u32 mCurrentPoolIndex