pub struct PassDesc {
pub name: String,
pub reads: Vec<ResourceId>,
pub writes: Vec<ResourceId>,
pub param_hash: u64,
pub frame_pts: Option<i64>,
}Expand description
Declaration of a pass: what it reads, what it writes, and what makes its output vary.
Fields§
§name: StringHuman-readable name, for diagnostics.
reads: Vec<ResourceId>Resources this pass samples/reads.
writes: Vec<ResourceId>Resources this pass renders to/writes.
param_hash: u64A caller-defined hash of everything outside the graph topology that can affect this pass’s output.
Include the operation identity, every operation parameter, and a content
generation for imported inputs. Omitting any of these can incorrectly
reuse a stale output. PassDesc::frame_pts can represent the common
case of a time-varying imported frame.
frame_pts: Option<i64>The presentation timestamp of a time-varying input (e.g. a decoded clip
frame), if any. A pass with a frame_pts re-evaluates whenever it changes.
Implementations§
Source§impl PassDesc
impl PassDesc
Sourcepub fn read(self, resource: ResourceId) -> Self
pub fn read(self, resource: ResourceId) -> Self
Declare that this pass reads resource.
Sourcepub fn write(self, resource: ResourceId) -> Self
pub fn write(self, resource: ResourceId) -> Self
Declare that this pass writes resource.
Sourcepub fn param_hash(self, hash: u64) -> Self
pub fn param_hash(self, hash: u64) -> Self
Set the caller-defined output identity hash for this pass.
This must change whenever the operation, one of its parameters, or imported content that it reads can change.