Struct vulkano::pipeline::ComputePipeline
source · pub struct ComputePipeline<Pl> { /* private fields */ }
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<Pl>>
into an Arc<ComputePipelineAbstract>
if necessary.
Implementations
sourceimpl ComputePipeline<()>
impl ComputePipeline<()>
sourcepub fn new<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants
) -> Result<ComputePipeline<PipelineLayout<Cs::PipelineLayout>>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
pub fn new<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants
) -> Result<ComputePipeline<PipelineLayout<Cs::PipelineLayout>>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
Builds a new ComputePipeline
.
sourceimpl<Pl> ComputePipeline<Pl>
impl<Pl> ComputePipeline<Pl>
sourcepub fn with_pipeline_layout<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants,
pipeline_layout: Pl
) -> Result<ComputePipeline<Pl>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
Pl: PipelineLayoutAbstract,
pub fn with_pipeline_layout<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants,
pipeline_layout: Pl
) -> Result<ComputePipeline<Pl>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
Pl: PipelineLayoutAbstract,
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.
sourcepub unsafe fn with_unchecked_pipeline_layout<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants,
pipeline_layout: Pl
) -> Result<ComputePipeline<Pl>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
Pl: PipelineLayoutAbstract,
pub unsafe fn with_unchecked_pipeline_layout<Cs>(
device: Arc<Device>,
shader: &Cs,
specialization: &Cs::SpecializationConstants,
pipeline_layout: Pl
) -> Result<ComputePipeline<Pl>, ComputePipelineCreationError>where
Cs::PipelineLayout: Clone,
Cs: EntryPointAbstract,
Pl: PipelineLayoutAbstract,
Same as with_pipeline_layout
, but doesn’t check whether the pipeline layout is a
superset of what the shader expects.
Trait Implementations
sourceimpl<Pl> ComputePipelineAbstract for ComputePipeline<Pl>where
Pl: PipelineLayoutAbstract,
impl<Pl> ComputePipelineAbstract for ComputePipeline<Pl>where
Pl: PipelineLayoutAbstract,
sourcefn inner(&self) -> ComputePipelineSys<'_>
fn inner(&self) -> ComputePipelineSys<'_>
Returns an opaque object that represents the inside of the compute pipeline.
sourceimpl<Pl> Debug for ComputePipeline<Pl>
impl<Pl> Debug for ComputePipeline<Pl>
sourceimpl<Pl> DeviceOwned for ComputePipeline<Pl>
impl<Pl> DeviceOwned for ComputePipeline<Pl>
sourceimpl<Pl> PipelineLayoutAbstract for ComputePipeline<Pl>where
Pl: PipelineLayoutAbstract,
impl<Pl> PipelineLayoutAbstract for ComputePipeline<Pl>where
Pl: PipelineLayoutAbstract,
sourcefn sys(&self) -> PipelineLayoutSys<'_>
fn sys(&self) -> PipelineLayoutSys<'_>
Returns an opaque object that allows internal access to the pipeline layout. Read more
sourcefn descriptor_set_layout(
&self,
index: usize
) -> Option<&Arc<UnsafeDescriptorSetLayout>>
fn descriptor_set_layout(
&self,
index: usize
) -> Option<&Arc<UnsafeDescriptorSetLayout>>
Returns the
UnsafeDescriptorSetLayout
object of the specified set index. Read moresourceimpl<Pl> PipelineLayoutDesc for ComputePipeline<Pl>where
Pl: PipelineLayoutDesc,
impl<Pl> PipelineLayoutDesc for ComputePipeline<Pl>where
Pl: PipelineLayoutDesc,
sourcefn num_sets(&self) -> usize
fn num_sets(&self) -> usize
Returns the number of sets in the layout. Includes possibly empty sets. Read more
sourcefn num_bindings_in_set(&self, set: usize) -> Option<usize>
fn num_bindings_in_set(&self, set: usize) -> Option<usize>
Returns the number of descriptors in the set. Includes possibly empty descriptors. Read more
sourcefn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>
Returns the descriptor for the given binding of the given set. Read more
sourcefn num_push_constants_ranges(&self) -> usize
fn num_push_constants_ranges(&self) -> usize
Returns the number of push constant ranges of the layout.
sourcefn push_constants_range(&self, num: usize) -> Option<PipelineLayoutDescPcRange>
fn push_constants_range(&self, num: usize) -> Option<PipelineLayoutDescPcRange>
Returns a description of the given push constants range. Read more
sourcefn provided_set_layout(
&self,
_set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
fn provided_set_layout(
&self,
_set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
If the
PipelineLayoutDesc
implementation is able to provide an existing
UnsafeDescriptorSetLayout
for a given set, it can do so by returning it here. Read moresourcefn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T>where
Self: Sized,
fn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T>where
Self: Sized,
Builds the union of this layout and another.
sourcefn check_against_limits(
&self,
device: &Device
) -> Result<(), PipelineLayoutLimitsError>
fn check_against_limits(
&self,
device: &Device
) -> Result<(), PipelineLayoutLimitsError>
Checks whether this description fulfills the device limits requirements.
sourcefn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError>where
Self: Sized,
fn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError>where
Self: Sized,
Turns the layout description into a
PipelineLayout
object that can be used by Vulkan. Read moresourceimpl<Pl> VulkanObject for ComputePipeline<Pl>
impl<Pl> VulkanObject for ComputePipeline<Pl>
sourceconst TYPE: DebugReportObjectTypeEXT = 19u32
const TYPE: DebugReportObjectTypeEXT = 19u32
The
DebugReportObjectTypeEXT
of the internal Vulkan handle.sourcefn internal_object(&self) -> Pipeline
fn internal_object(&self) -> Pipeline
Returns a reference to the object.
Auto Trait Implementations
impl<Pl> RefUnwindSafe for ComputePipeline<Pl>where
Pl: RefUnwindSafe,
impl<Pl> Send for ComputePipeline<Pl>where
Pl: Send,
impl<Pl> Sync for ComputePipeline<Pl>where
Pl: Sync,
impl<Pl> Unpin for ComputePipeline<Pl>where
Pl: Unpin,
impl<Pl> UnwindSafe for ComputePipeline<Pl>where
Pl: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.