SpecializedComputePipeline

Trait SpecializedComputePipeline 

Source
pub trait SpecializedComputePipeline {
    type Key: Clone + Hash + PartialEq + Eq;

    // Required method
    fn specialize(&self, key: Self::Key) -> ComputePipelineDescriptor;
}
Expand description

A trait that allows constructing different variants of a compute pipeline from a key.

Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key contains no data then you don’t need to specialize. For example, if you are using the AsBindGroup without the #[bind_group_data] attribute, you don’t need to specialize. Instead, create the pipeline directly from PipelineCache and store its ID.

See SpecializedComputePipelines for more info.

Required Associated Types§

Source

type Key: Clone + Hash + PartialEq + Eq

The key that defines each “variant” of the compute pipeline.

Required Methods§

Source

fn specialize(&self, key: Self::Key) -> ComputePipelineDescriptor

Construct a new compute pipeline based on the provided key.

Implementors§