pub struct ComputePipeline {
    pub info: ComputePipelineInfo,
    /* private fields */
}
Expand description

Smart pointer handle to a pipeline object.

Also contains information about the object.

Deref behavior

ComputePipeline automatically dereferences to vk::Pipeline (via the Deref trait), so you can call vk::Pipeline’s methods on a value of type ComputePipeline.

Fields§

§info: ComputePipelineInfo

Information used to create this object.

Implementations§

Creates a new compute pipeline on the given device.

Panics

If shader code is not a multiple of four bytes.

Examples

Basic usage:

// my_shader_code is raw SPIR-V code as bytes
let shader = Shader::new_compute(my_shader_code.as_slice());
let pipeline = ComputePipeline::create(&device, ComputePipelineInfo::default(), shader)?;

assert_ne!(*pipeline, vk::Pipeline::null());

Trait Implementations§

The default AccessType for read operations, if not specified explicitly.
The default AccessType for write operations, if not specified explicitly.
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.