Struct vulkano::pipeline::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.
All compute pipeline objects implement the ComputePipelineAbstract
trait. You can turn any
Arc<ComputePipeline>
into an Arc<ComputePipelineAbstract>
if necessary.
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<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
Css: SpecializationConstants,
pub fn new<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
Css: SpecializationConstants,
Builds a new ComputePipeline
.
pub fn with_pipeline_layout<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
pipeline_layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
Css: SpecializationConstants,
pub fn with_pipeline_layout<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
pipeline_layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
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<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
pipeline_layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
Css: SpecializationConstants,
pub unsafe fn with_unchecked_pipeline_layout<Cs, Css>(
device: Arc<Device>,
shader: &Cs,
spec_constants: &Css,
pipeline_layout: Arc<PipelineLayout>,
cache: Option<Arc<PipelineCache>>
) -> Result<ComputePipeline, ComputePipelineCreationError> where
Cs: EntryPointAbstract,
Css: SpecializationConstants,
Same as with_pipeline_layout
, but doesn’t check whether the pipeline layout is a
superset of what the shader expects.
Trait Implementations
Returns an opaque object that represents the inside of the compute pipeline.
Returns the pipeline layout used in this compute pipeline.
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.