pub struct FrameGraph { /* private fields */ }Expand description
Per-frame collection of recorded passes.
Agents append passes during execute(). submit_frame_graph drains the
graph in topological order and submits the buffers to the device.
Implementations§
Source§impl FrameGraph
impl FrameGraph
Sourcepub fn add_pass(
&mut self,
descriptor: PassDescriptor,
command_buffer: CommandBufferId,
)
pub fn add_pass( &mut self, descriptor: PassDescriptor, command_buffer: CommandBufferId, )
Records a pass: descriptor + the command buffer the agent already produced.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Drops all recorded passes without submitting them — used to recover from a frame error before the engine reaches the submit step.
Sourcepub fn compile(&mut self) -> Vec<CommandBufferId>
pub fn compile(&mut self) -> Vec<CommandBufferId>
Drains the graph and returns command buffers in submission order.
The order is computed by a stable Kahn’s algorithm over read/write
dependencies: a pass that writes resource R must run before any
pass that reads R. Insertion order is the tie-breaker, so when the
declared order is already valid (the common case) the result equals
insertion order.
Trait Implementations§
Source§impl Default for FrameGraph
impl Default for FrameGraph
Source§fn default() -> FrameGraph
fn default() -> FrameGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameGraph
impl RefUnwindSafe for FrameGraph
impl Send for FrameGraph
impl Sync for FrameGraph
impl Unpin for FrameGraph
impl UnsafeUnpin for FrameGraph
impl UnwindSafe for FrameGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more