pub struct PassTimers { /* private fields */ }Expand description
A ring of timestamp query sets, one per frame in flight plus one.
Implementations§
Source§impl PassTimers
impl PassTimers
Sourcepub fn new(
device: &dyn Device,
frames_in_flight: usize,
max_passes: u32,
) -> Option<PassTimers>
pub fn new( device: &dyn Device, frames_in_flight: usize, max_passes: u32, ) -> Option<PassTimers>
Creates timers for up to max_passes passes across frames_in_flight
frames, or None if the device has no timestamp queries.
max_passes is the sum of the MAX_PASSES of the renderers the frame
runs, plus the caller’s own passes — see the module docs. A frame longer than it is timed as far as it goes.
None is not an error: the seam is explicit that timestamps degrade
rather than break, and the caller’s answer is to pass None to
CompiledGraph::execute and get
an empty report.
Sourcepub fn latest(&self) -> &FrameTimings
pub fn latest(&self) -> &FrameTimings
The most recent frame whose timestamps have actually landed.
Empty until the ring has come round once.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PassTimers
impl RefUnwindSafe for PassTimers
impl Send for PassTimers
impl Sync for PassTimers
impl Unpin for PassTimers
impl UnsafeUnpin for PassTimers
impl UnwindSafe for PassTimers
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