pub struct WgpuStorage { /* private fields */ }
Expand description
Buffer storage for wgpu.
Implementations§
Source§impl WgpuStorage
Keeps actual wgpu buffer references in a hashmap with ids as key.
impl WgpuStorage
Keeps actual wgpu buffer references in a hashmap with ids as key.
Sourcepub fn new(device: Device, usages: BufferUsages) -> Self
pub fn new(device: Device, usages: BufferUsages) -> Self
Create a new storage on the given device.
Trait Implementations§
Source§impl ComputeStorage for WgpuStorage
impl ComputeStorage for WgpuStorage
Source§type Resource = WgpuResource
type Resource = WgpuResource
The resource associated type determines the way data is implemented and how
it can be accessed by kernels.
Source§fn get(&mut self, handle: &StorageHandle) -> Self::Resource
fn get(&mut self, handle: &StorageHandle) -> Self::Resource
Returns the underlying resource for a specified storage handle
Source§fn alloc(&mut self, size: u64) -> StorageHandle
fn alloc(&mut self, size: u64) -> StorageHandle
Allocates
size
units of memory and returns a handle to itAuto Trait Implementations§
impl Freeze for WgpuStorage
impl !RefUnwindSafe for WgpuStorage
impl Send for WgpuStorage
impl Sync for WgpuStorage
impl Unpin for WgpuStorage
impl !UnwindSafe for WgpuStorage
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