pub struct CompiledResource {
pub label: &'static str,
pub origin: ResourceOrigin,
pub lifetime: PassRange,
pub tex_desc: Option<TextureDesc>,
/* private fields */
}Expand description
One resource in the compiled graph. Carries the lifetime interval (in compiled-pass-index space) and the origin distinction the aliaser will care about.
Fields§
§label: &'static strThe resource’s stable label, the executor’s join key.
origin: ResourceOriginWhether the resource is imported or graph-declared.
lifetime: PassRangeThe pass range over which the resource must stay live.
tex_desc: Option<TextureDesc>Texture shape (format / size / sample count / layers), None for a
buffer. The aliasing planner uses it to size each transient resource;
the backend will use it to allocate the realised resource.
Implementations§
Source§impl CompiledResource
impl CompiledResource
Sourcepub fn class(&self) -> Option<GraphResourceClass>
pub fn class(&self) -> Option<GraphResourceClass>
The barrier class this resource’s declared usage puts it in. The graph is
the single source of truth for it: a backend executor resolves a label to
its GPU object but never restates what kind of resource it is, so the
executors cannot disagree. None for a resource carrying neither desc.
Trait Implementations§
Source§impl Clone for CompiledResource
impl Clone for CompiledResource
Source§fn clone(&self) -> CompiledResource
fn clone(&self) -> CompiledResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more