Expand description
Double-buffered GPU command submission.
Overlaps CPU work (encoding the next frame’s commands) with GPU work (executing the current frame’s commands) using a ping-pong buffer scheme.
§Architecture
Frame N: CPU encodes buffer A ───▶ GPU executes buffer A
Frame N+1: CPU encodes buffer B ───▶ GPU executes buffer B
Frame N+2: CPU encodes buffer A ───▶ GPU executes buffer A (recycled)
└──── overlapped ─────┘The DoubleBufferSubmitter manages two command slots and alternates
between them. While the GPU processes slot A, the CPU can prepare
commands in slot B, minimising idle time on both sides.
§Status
This module provides the scheduling and statistics logic. Actual GPU command execution is delegated to the caller via closures.
Structs§
- Command
Slot - A command buffer slot with timing information.
- Double
Buffer Stats - Performance statistics for the double-buffer submitter.
- Double
Buffer Submitter - Double-buffered command submission manager.
Enums§
- Double
Buffer Error - Errors from the double-buffer submitter.
- Slot
State - State of a single command buffer slot.