pub struct AutomatedBufferManager { /* private fields */ }
Expand description
Creates and manages all running AutomatedBuffer
s.
Responsible for making sure the belts are properly pumped.
pump
must be called after all
buffers are written to, and it’s futures spawned on an executor
that will run them concurrently.
Implementations§
Source§impl AutomatedBufferManager
impl AutomatedBufferManager
pub const fn new(style: UploadStyle) -> Self
pub fn create_new_buffer( &mut self, device: &Device, size: BufferAddress, usage: BufferUsage, label: Option<impl Into<String> + Borrow<str>>, ) -> AutomatedBuffer
Sourcepub fn pump(&mut self) -> Vec<impl Future<Output = ()>>
pub fn pump(&mut self) -> Vec<impl Future<Output = ()>>
Must be called after all buffers are written to and the returned futures must be spawned on an executor that will run them concurrently.
If they are not polled, the belts will just constantly leak memory as the futures allow the belts to reuse buffers.
Auto Trait Implementations§
impl Freeze for AutomatedBufferManager
impl !RefUnwindSafe for AutomatedBufferManager
impl Send for AutomatedBufferManager
impl Sync for AutomatedBufferManager
impl Unpin for AutomatedBufferManager
impl !UnwindSafe for AutomatedBufferManager
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