pub struct ComputePipeline {
pub(crate) inner: DispatchComputePipeline,
}Expand description
Handle to a compute pipeline.
A ComputePipeline object represents a compute pipeline and its single shader stage.
It can be created with Device::create_compute_pipeline.
Corresponds to WebGPU GPUComputePipeline.
Fields§
§inner: DispatchComputePipelineImplementations§
Source§impl ComputePipeline
impl ComputePipeline
Sourcepub fn get_bind_group_layout(&self, index: u32) -> BindGroupLayout
pub fn get_bind_group_layout(&self, index: u32) -> BindGroupLayout
Get an object representing the bind group layout at a given index.
If this pipeline was created with a default layout,
then bind groups created with the returned BindGroupLayout can only be used with this
pipeline.
This method will raise a validation error if there is no bind group layout at index.
Sourcepub fn as_custom<T: ComputePipelineInterface>(&self) -> Option<&T>
Available on custom only.
pub fn as_custom<T: ComputePipelineInterface>(&self) -> Option<&T>
custom only.Returns custom implementation of ComputePipeline (if custom backend and is internally T)
Source§impl ComputePipeline
impl ComputePipeline
Sourcepub fn from_core(core_compute_pipeline: Arc<ComputePipeline>) -> Self
Available on wgpu_core only.
pub fn from_core(core_compute_pipeline: Arc<ComputePipeline>) -> Self
wgpu_core only.Create a new compute pipeline of wgpu from a wgpu-core compute pipeline.
§Arguments
core_compute_pipeline- wgpu-core compute pipeline.
Sourcepub fn as_core(&self) -> Option<Arc<ComputePipeline>>
Available on wgpu_core only.
pub fn as_core(&self) -> Option<Arc<ComputePipeline>>
wgpu_core only.Returns the underlying wgpu-core compute pipeline if this ComputePipeline is on the wgpu-core backend, otherwise None.
Trait Implementations§
Source§impl Clone for ComputePipeline
impl Clone for ComputePipeline
Source§fn clone(&self) -> ComputePipeline
fn clone(&self) -> ComputePipeline
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputePipeline
impl Debug for ComputePipeline
Source§impl Hash for ComputePipeline
impl Hash for ComputePipeline
Source§impl Ord for ComputePipeline
impl Ord for ComputePipeline
Source§impl PartialEq for ComputePipeline
impl PartialEq for ComputePipeline
Source§impl PartialOrd for ComputePipeline
impl PartialOrd for ComputePipeline
impl Eq for ComputePipeline
Auto Trait Implementations§
impl Freeze for ComputePipeline
impl !RefUnwindSafe for ComputePipeline
impl Send for ComputePipeline
impl Sync for ComputePipeline
impl Unpin for ComputePipeline
impl UnsafeUnpin for ComputePipeline
impl !UnwindSafe for ComputePipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more