pub struct RenderGraphResource {
pub id: ResourceId,
pub name: String,
pub desc: ResourceDesc,
pub lifetime: ResourceLifetime,
pub first_use: usize,
pub last_use: usize,
pub can_alias: bool,
pub alias_target: Option<ResourceId>,
pub current_layout: ImageLayout,
}Fields§
§id: ResourceId§name: String§desc: ResourceDesc§lifetime: ResourceLifetime§first_use: usizeThe pass range [first_write_pass, last_read_pass] (index into sorted pass list)
last_use: usize§can_alias: boolWhether this resource can share physical memory with another
alias_target: Option<ResourceId>If aliased, the physical resource id it is assigned to
current_layout: ImageLayoutCurrent layout (updated during barrier analysis)
Implementations§
Source§impl RenderGraphResource
impl RenderGraphResource
pub fn new_transient_texture( id: ResourceId, name: &str, desc: TextureDesc, ) -> Self
pub fn is_texture(&self) -> bool
pub fn texture_desc(&self) -> Option<&TextureDesc>
Sourcepub fn can_alias_with(&self, other: &RenderGraphResource) -> bool
pub fn can_alias_with(&self, other: &RenderGraphResource) -> bool
Two transient resources can alias if their lifetimes don’t overlap
Sourcepub fn lifetime_overlaps(&self, other: &RenderGraphResource) -> bool
pub fn lifetime_overlaps(&self, other: &RenderGraphResource) -> bool
Lifetimes overlap if [first_use, last_use] intervals intersect
Trait Implementations§
Source§impl Clone for RenderGraphResource
impl Clone for RenderGraphResource
Auto Trait Implementations§
impl Freeze for RenderGraphResource
impl RefUnwindSafe for RenderGraphResource
impl Send for RenderGraphResource
impl Sync for RenderGraphResource
impl Unpin for RenderGraphResource
impl UnsafeUnpin for RenderGraphResource
impl UnwindSafe for RenderGraphResource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.