pub struct FrameDirty { /* private fields */ }Expand description
Which frame-in-flight copies of a ringed uniform block still need a write.
let mut dirty = FrameDirty::new(2);
assert!(dirty.take(0));
assert!(dirty.take(1));
assert!(!dirty.take(0));Implementations§
Source§impl FrameDirty
impl FrameDirty
Sourcepub const fn new(frames: usize) -> Self
pub const fn new(frames: usize) -> Self
Track frames slots, every one pending so the ring seeds itself.
Frames beyond MAX_TRACKED_FRAMES are not tracked.
Sourcepub fn take(&mut self, frame: usize) -> bool
pub fn take(&mut self, frame: usize) -> bool
Whether frame still needs a write, clearing it if so.
Sourcepub const fn any_pending(&self) -> bool
pub const fn any_pending(&self) -> bool
Whether any slot is still pending.
Trait Implementations§
Source§impl Clone for FrameDirty
impl Clone for FrameDirty
Source§fn clone(&self) -> FrameDirty
fn clone(&self) -> FrameDirty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FrameDirty
Source§impl Debug for FrameDirty
impl Debug for FrameDirty
Source§impl Default for FrameDirty
impl Default for FrameDirty
Source§fn default() -> FrameDirty
fn default() -> FrameDirty
Returns the “default value” for a type. Read more
impl Eq for FrameDirty
Source§impl PartialEq for FrameDirty
impl PartialEq for FrameDirty
impl StructuralPartialEq for FrameDirty
Auto Trait Implementations§
impl Freeze for FrameDirty
impl RefUnwindSafe for FrameDirty
impl Send for FrameDirty
impl Sync for FrameDirty
impl Unpin for FrameDirty
impl UnsafeUnpin for FrameDirty
impl UnwindSafe for FrameDirty
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.