pub struct ComputePipelineManager { /* private fields */ }Expand description
Compute pipeline manager with caching
Implementations§
Source§impl ComputePipelineManager
impl ComputePipelineManager
Sourcepub fn get_or_create(
&self,
key: &str,
label: &str,
shader: &ShaderModule,
entry_point: &str,
bind_group_layout: &BindGroupLayout,
workgroup_size: (u32, u32, u32),
) -> Result<Arc<ComputePipelineHandle>>
pub fn get_or_create( &self, key: &str, label: &str, shader: &ShaderModule, entry_point: &str, bind_group_layout: &BindGroupLayout, workgroup_size: (u32, u32, u32), ) -> Result<Arc<ComputePipelineHandle>>
Get or create a compute pipeline
§Arguments
key- Unique key for caching the pipelinelabel- Human-readable label for debuggingshader- Compiled shader moduleentry_point- Entry point function namebind_group_layout- Bind group layout for resourcesworkgroup_size- Workgroup size (x, y, z)
§Errors
Returns an error if pipeline creation fails.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear the pipeline cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get number of cached pipelines
Auto Trait Implementations§
impl !Freeze for ComputePipelineManager
impl !RefUnwindSafe for ComputePipelineManager
impl Send for ComputePipelineManager
impl Sync for ComputePipelineManager
impl Unpin for ComputePipelineManager
impl UnsafeUnpin for ComputePipelineManager
impl !UnwindSafe for ComputePipelineManager
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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