pub struct Transient<H: Hal> {
pub layers: Vec<H::Texture>,
pub ramps: Vec<H::Texture>,
}Expand description
The textures a recording needs that it did not arrive with.
Layer targets are rendered and baked gradients are uploaded, both per submission and both released with it. Grouped because they are the same thing from the caller’s side – resources this frame owns and must destroy after the work that reads them – and because a caller that has to submit the root pass itself would otherwise be handed two lists and trusted to keep them together.
Fields§
§layers: Vec<H::Texture>One per non-root pass, in pass order.
ramps: Vec<H::Texture>One per entry in Recording::ramps, in that order.
Implementations§
Source§impl<H: Hal> Transient<H>
impl<H: Hal> Transient<H>
Sourcepub fn into_textures(self) -> Vec<H::Texture>
pub fn into_textures(self) -> Vec<H::Texture>
Everything this frame owns, as one list to release when it is done.
For a caller that keeps the resources alive past this call – a presentation target holding them until its fence signals – where a texture came from stops mattering the moment the submission is made. What remains is when it is safe to free, and that answer is the same for all of them.
Sourcepub fn destroy(self, ctx: &mut H::Context)where
H::Context: HalContext<Hal = H>,
pub fn destroy(self, ctx: &mut H::Context)where
H::Context: HalContext<Hal = H>,
Release everything, in any order: nothing here refers to anything else.
Auto Trait Implementations§
impl<H> Forget for Transient<H>
impl<H> Freeze for Transient<H>
impl<H> Move for Transient<H>
impl<H> RefUnwindSafe for Transient<H>
impl<H> Send for Transient<H>
impl<H> Sync for Transient<H>
impl<H> Unpin for Transient<H>
impl<H> UnsafeUnpin for Transient<H>
impl<H> UnwindSafe for Transient<H>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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