pub struct WgpuRuntime { /* private fields */ }Expand description
Headless wgpu runtime for compute-only workloads.
Implementations§
Source§impl WgpuRuntime
impl WgpuRuntime
Sourcepub fn new_headless() -> SpatialResult<Self>
pub fn new_headless() -> SpatialResult<Self>
Creates a headless wgpu runtime using the default adapter.
Prefer Self::shared when running multiple GPU filters in one process.
Returns a process-wide shared headless runtime, initializing it on first use.
Sourcepub fn pipelines(&self) -> &ComputePipelineCache
pub fn pipelines(&self) -> &ComputePipelineCache
Returns cached compute pipelines for this runtime’s device.
Sourcepub fn max_gather_channels(&self) -> u32
pub fn max_gather_channels(&self) -> u32
Returns the maximum attribute channels gatherable in one multi dispatch.
Sourcepub fn upload_f32_storage(
&self,
label: &'static str,
data: &[f32],
) -> SpatialResult<Buffer>
pub fn upload_f32_storage( &self, label: &'static str, data: &[f32], ) -> SpatialResult<Buffer>
Uploads f32 values into a reusable pooled storage buffer.
Sourcepub fn recycle_storage(&self, byte_len: u64, buffer: Buffer)
pub fn recycle_storage(&self, byte_len: u64, buffer: Buffer)
Returns a storage buffer to the upload pool for reuse.
Auto Trait Implementations§
impl !Freeze for WgpuRuntime
impl !RefUnwindSafe for WgpuRuntime
impl Send for WgpuRuntime
impl Sync for WgpuRuntime
impl Unpin for WgpuRuntime
impl UnsafeUnpin for WgpuRuntime
impl !UnwindSafe for WgpuRuntime
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