Struct vulkano::pipeline::compute::ComputePipeline [−][src]
pub struct ComputePipeline { /* fields omitted */ }
Expand description
A pipeline object that describes to the Vulkan implementation how it should perform compute operations.
The template parameter contains the descriptor set to use with this pipeline.
Pass an optional Arc
to a PipelineCache
to enable pipeline caching. The vulkan
implementation will handle the PipelineCache
and check if it is available.
Check the documentation of the PipelineCache
for more information.
Implementations
pub fn new<Css, F>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
cache: Option<Arc<PipelineCache>>,
func: F
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
F: FnOnce(&mut [DescriptorSetDesc]),
pub fn new<Css, F>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
cache: Option<Arc<PipelineCache>>,
func: F
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
F: FnOnce(&mut [DescriptorSetDesc]),
Builds a new ComputePipeline
.
func
is a closure that is given a mutable reference to the inferred descriptor set
definitions. This can be used to make changes to the layout before it’s created, for example
to add dynamic buffers or immutable samplers.
pub fn with_pipeline_layout<Css>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
pub fn with_pipeline_layout<Css>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
Builds a new ComputePipeline
with a specific pipeline layout.
An error will be returned if the pipeline layout isn’t a superset of what the shader uses.
pub unsafe fn with_unchecked_pipeline_layout<Css>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
pub unsafe fn with_unchecked_pipeline_layout<Css>(
device: Arc<Device>,
shader: EntryPoint<'_>,
specialization_constants: &Css,
layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<Arc<ComputePipeline>, ComputePipelineCreationError> where
Css: SpecializationConstants,
Same as with_pipeline_layout
, but doesn’t check whether the pipeline layout is a
superset of what the shader expects.
pub fn descriptor_requirements(
&self
) -> impl ExactSizeIterator<Item = ((u32, u32), &DescriptorRequirements)>
pub fn descriptor_requirements(
&self
) -> impl ExactSizeIterator<Item = ((u32, u32), &DescriptorRequirements)>
Returns an iterator over the descriptor requirements for this pipeline.
Trait Implementations
Returns the bind point of this pipeline.
Returns the pipeline layout used in this pipeline.
Returns the number of descriptor sets actually accessed by this pipeline. This may be less than the number of sets in the pipeline layout. Read more
Returns a reference to the object.
Auto Trait Implementations
impl RefUnwindSafe for ComputePipeline
impl Send for ComputePipeline
impl Sync for ComputePipeline
impl Unpin for ComputePipeline
impl UnwindSafe for ComputePipeline
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.