[−][src]Struct wgpu_conveyor::AutomatedBuffer
A buffer which automatically uses either staging buffers or direct mapping to write to its
internal buffer based on the provided UploadStyle
.
Implementations
impl AutomatedBuffer
[src]
pub fn stats(&self) -> AutomatedBufferStats
[src]
pub fn get_current_inner(&self) -> Arc<IdBuffer>
[src]
Buffer that should be used in bind groups to access the data in the buffer.
Every single time write_to_buffer
is called,
this could change and the bind group needs to be remade. The BindGroupCache
can
help streamline this process and re-use bind groups.
pub fn write_to_buffer<DataFn>(
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
size: BufferAddress,
data_fn: DataFn
) where
DataFn: FnOnce(&mut [u8]),
[src]
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
size: BufferAddress,
data_fn: DataFn
) where
DataFn: FnOnce(&mut [u8]),
Writes to the underlying buffer using the proper write style.
The buffer will be resized to the given size
.
All needed copy operations will be recorded onto encoder
.
Once the buffer is mapped and ready to be written to, the slice of exactly
size
bytes will be provided to data_fn
to be written in.
Trait Implementations
impl<'buf> AutomatedBufferSet<'buf> for &'buf AutomatedBuffer
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AutomatedBuffer
impl Send for AutomatedBuffer
impl Sync for AutomatedBuffer
impl Unpin for AutomatedBuffer
impl !UnwindSafe for AutomatedBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,