pub struct GpuPasses {
pub prepass: Duration,
pub main: Duration,
pub composite: Duration,
pub blit: Duration,
}Expand description
One frame’s real GPU time, split by the spans the frust-owned render engine
names — the counterpart of the CPU spans in FramePasses, measured on the
GPU’s own clock rather than inferred from CPU wall time around a submit.
Produced only in a build whose device asked for GPU timestamps; every
other frame carries None and reports gpu_q=0.
A span may legitimately read zero — a frame with no off-screen layer does no
composite work — so a zero is a measurement, not a gap.
Fields§
§prepass: DurationWork recorded ahead of the frame’s own passes (the glyph-atlas replay).
main: DurationThe frame’s own surface passes: clear, opaque strips, alpha strips, and the hole punch.
composite: DurationOff-screen layer pages and filter passes.
blit: DurationThe present-side conversion or blit into the swapchain.
Implementations§
Source§impl GpuPasses
impl GpuPasses
Sourcepub fn main_is_measured(&self) -> bool
pub fn main_is_measured(&self) -> bool
Whether the main span carries a real measurement.
Every submitted frame records its opening surface pass into main, and
a measured timestamp pair is strictly increasing, so a measured main
is never exactly Duration::ZERO. A zero here therefore means the
pair was never resolved (a clear-only opening pass that drew nothing has
no valid pair on Metal), not that the pass took no time. The other
three spans may legitimately be zero (a frame with no off-screen layer
does no composite work), so only main can be judged this way.
Trait Implementations§
impl Copy for GpuPasses
impl Eq for GpuPasses
impl StructuralPartialEq for GpuPasses
Auto Trait Implementations§
impl Freeze for GpuPasses
impl RefUnwindSafe for GpuPasses
impl Send for GpuPasses
impl Sync for GpuPasses
impl Unpin for GpuPasses
impl UnsafeUnpin for GpuPasses
impl UnwindSafe for GpuPasses
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
impl<T> Brush for T
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§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
key and return true if they are equal.