pub struct ResidencyWorkspace<C: Copy> { /* private fields */ }Expand description
Fixed-capacity reusable state for residency planning and command lowering.
Implementations§
Source§impl<C: Copy> ResidencyWorkspace<C>
impl<C: Copy> ResidencyWorkspace<C>
Sourcepub fn new(config: ResidencyConfig) -> Result<Self, ResidencyInitError>
pub fn new(config: ResidencyConfig) -> Result<Self, ResidencyInitError>
Allocates every host-side backing store before frame processing starts.
§Errors
Returns a typed configuration error for invalid capacities.
Sourcepub fn begin_frame(&mut self)
pub fn begin_frame(&mut self)
Starts a frame without releasing or growing host storage.
Sourcepub const fn arena(&self) -> &PagedArena
pub const fn arena(&self) -> &PagedArena
Page allocator used to assign future GPU arena ranges.
Sourcepub const fn arena_mut(&mut self) -> &mut PagedArena
pub const fn arena_mut(&mut self) -> &mut PagedArena
Mutable page allocator used to assign and release ranges.
Sourcepub const fn uploads(&self) -> &UploadRing
pub const fn uploads(&self) -> &UploadRing
Upload staging ring and lifecycle state.
Sourcepub const fn uploads_mut(&mut self) -> &mut UploadRing
pub const fn uploads_mut(&mut self) -> &mut UploadRing
Mutable upload ring used during staging and retirement.
Sourcepub const fn commands(&self) -> &CommandScratch<C>
pub const fn commands(&self) -> &CommandScratch<C>
Commands lowered during the current frame.
Sourcepub const fn commands_mut(&mut self) -> &mut CommandScratch<C>
pub const fn commands_mut(&mut self) -> &mut CommandScratch<C>
Mutable reusable command storage.
Sourcepub fn metrics(&self) -> ResidencyMetrics
pub fn metrics(&self) -> ResidencyMetrics
Current real counters from all three storage primitives.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for ResidencyWorkspace<C>where
CommandScratch<C>: Freeze,
impl<C> RefUnwindSafe for ResidencyWorkspace<C>where
CommandScratch<C>: RefUnwindSafe,
impl<C> Send for ResidencyWorkspace<C>where
CommandScratch<C>: Send,
impl<C> Sync for ResidencyWorkspace<C>where
CommandScratch<C>: Sync,
impl<C> Unpin for ResidencyWorkspace<C>where
CommandScratch<C>: Unpin,
impl<C> UnsafeUnpin for ResidencyWorkspace<C>where
CommandScratch<C>: UnsafeUnpin,
impl<C> UnwindSafe for ResidencyWorkspace<C>where
CommandScratch<C>: UnwindSafe,
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