pub struct ReadbackRingSet { /* private fields */ }Expand description
Size-classed collection of readback rings for direct dispatch.
Implementations§
Source§impl ReadbackRingSet
impl ReadbackRingSet
Sourcepub fn with_requested_slots(raw_slots: Option<&str>) -> Self
pub fn with_requested_slots(raw_slots: Option<&str>) -> Self
Construct an empty ring set from a raw slot-count setting.
Passing None uses the production default. This keeps test and embedded
callers off process-global environment mutation while preserving the same
parser and clamping semantics as Self::new.
Sourcepub fn ring_for(
&self,
device: &Device,
byte_len: u64,
) -> Result<Arc<ReadbackRing>, BackendError>
pub fn ring_for( &self, device: &Device, byte_len: u64, ) -> Result<Arc<ReadbackRing>, BackendError>
Return the ring whose staging slots can hold byte_len.
§Errors
Returns a backend error if the requested byte length overflows wgpu copy alignment.
Sourcepub fn existing_ring_for(
&self,
byte_len: u64,
) -> Result<Option<Arc<ReadbackRing>>, BackendError>
pub fn existing_ring_for( &self, byte_len: u64, ) -> Result<Option<Arc<ReadbackRing>>, BackendError>
Return an existing size-classed ring without taking exclusive access.
§Errors
Returns a backend error if the requested byte length overflows wgpu copy alignment.
Sourcepub fn slots_per_ring(&self) -> usize
pub fn slots_per_ring(&self) -> usize
Number of slots configured for each runtime ring instance.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ReadbackRingSet
impl !UnwindSafe for ReadbackRingSet
impl Freeze for ReadbackRingSet
impl Send for ReadbackRingSet
impl Sync for ReadbackRingSet
impl Unpin for ReadbackRingSet
impl UnsafeUnpin for ReadbackRingSet
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