pub struct Transient<H>where
H: Hal,{
pub layers: Vec<<H as Hal>::Texture>,
pub ramps: Vec<<H as Hal>::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 as Hal>::Texture>One per non-root pass, in pass order.
ramps: Vec<<H as Hal>::Texture>One per entry in Recording::ramps, in that order.
Implementations§
Source§impl<H> Transient<H>where
H: Hal,
impl<H> Transient<H>where
H: Hal,
Sourcepub fn into_textures(self) -> Vec<<H as Hal>::Texture>
pub fn into_textures(self) -> Vec<<H as Hal>::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.