pub struct GpuDevice { /* private fields */ }
Implementations§
Source§impl GpuDevice
impl GpuDevice
pub fn create_buffer(&self, label: &str, size: u64) -> Buffer
pub fn create_data_buffer(&self, label: &str, contents: &[u8]) -> Buffer
pub fn create_uniform_buffer(&self, label: &str, contents: &[u8]) -> Buffer
pub fn create_output_buffer(&self, label: &str, size: u64) -> Buffer
pub fn create_bind_group( &self, buffers: &[(&Buffer, u64, BufferBindingType)], ) -> (BindGroupLayout, BindGroup)
pub fn create_compute_pipeline( &self, buffers: &[(&Buffer, u64, BufferBindingType)], shader: &str, ) -> (BindGroup, ComputePipeline)
Auto Trait Implementations§
impl Freeze for GpuDevice
impl !RefUnwindSafe for GpuDevice
impl Send for GpuDevice
impl Sync for GpuDevice
impl Unpin for GpuDevice
impl !UnwindSafe for GpuDevice
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