pub struct FrameGraph { /* private fields */ }Expand description
A full-frame resource graph with transient resource aliasing.
Implementations§
Source§impl FrameGraph
impl FrameGraph
Sourcepub fn declare_resource(&mut self, name: impl Into<String>, size: usize)
pub fn declare_resource(&mut self, name: impl Into<String>, size: usize)
Declare a transient resource with its size.
Sourcepub fn alias_resources(&mut self)
pub fn alias_resources(&mut self)
Run a simple aliasing pass: resources that do not overlap in lifetime share the same memory offset.
Sourcepub fn peak_memory(&self) -> usize
pub fn peak_memory(&self) -> usize
Compute the peak memory required (maximum end of any allocation).
Sourcepub fn pass_count(&self) -> usize
pub fn pass_count(&self) -> usize
Number of passes.
Sourcepub fn barriers_for_pass(&self, idx: usize) -> &[PipelineBarrier]
pub fn barriers_for_pass(&self, idx: usize) -> &[PipelineBarrier]
Get all barriers for a given pass by index.
Sourcepub fn all_barriers(&self) -> Vec<&PipelineBarrier>
pub fn all_barriers(&self) -> Vec<&PipelineBarrier>
Collect all pipeline barriers across the frame in order.
Sourcepub fn resources_for_pass(&self, idx: usize) -> Vec<&str>
pub fn resources_for_pass(&self, idx: usize) -> Vec<&str>
Find all resources used by pass at index idx.
Trait Implementations§
Source§impl Debug for FrameGraph
impl Debug for FrameGraph
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more