pub struct ComputeOverlapScheduler {
pub critical_count: usize,
pub background_count: usize,
/* private fields */
}Expand description
Schedules compute dispatches to maximise GPU utilisation through overlapping.
Classifies dispatches as either “latency-critical” (must finish before the next frame) or “background” (can run async on a secondary queue).
Fields§
§critical_count: usizeNumber of latency-critical dispatches submitted this frame.
background_count: usizeNumber of background dispatches submitted this frame.
Implementations§
Source§impl ComputeOverlapScheduler
impl ComputeOverlapScheduler
Sourcepub fn submit_critical(&mut self, batch: DispatchBatch)
pub fn submit_critical(&mut self, batch: DispatchBatch)
Submit a latency-critical dispatch (→ main queue).
Sourcepub fn submit_background(&mut self, batch: DispatchBatch)
pub fn submit_background(&mut self, batch: DispatchBatch)
Submit a background dispatch (→ async compute queue).
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Returns true if there is any pending work.
Trait Implementations§
Source§impl Debug for ComputeOverlapScheduler
impl Debug for ComputeOverlapScheduler
Auto Trait Implementations§
impl Freeze for ComputeOverlapScheduler
impl RefUnwindSafe for ComputeOverlapScheduler
impl Send for ComputeOverlapScheduler
impl Sync for ComputeOverlapScheduler
impl Unpin for ComputeOverlapScheduler
impl UnsafeUnpin for ComputeOverlapScheduler
impl UnwindSafe for ComputeOverlapScheduler
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