pub struct RendererFrameMetrics { /* private fields */ }Expand description
CPU-side durations measured while preparing and submitting one renderer frame.
These values do not measure GPU execution or the monitor scanout timestamp.
FIFO presentation back-pressure normally appears in surface_acquire because
wgpu blocks frame acquisition when the presentation queue is full.
Implementations§
Source§impl RendererFrameMetrics
impl RendererFrameMetrics
Sourcepub fn tessellation(self) -> Duration
pub fn tessellation(self) -> Duration
Returns CPU time spent preparing visual work before GPU uploads.
For an ordinary streaming scene this is validation and tessellation.
A heterogeneous FrameComposer frame also
includes viewport and source validation, particle visibility selection,
scalar LUT generation, and preparation of retained image/glyph draws.
Sourcepub fn upload(self) -> Duration
pub fn upload(self) -> Duration
Returns CPU time spent preparing and enqueueing non-camera per-frame GPU data.
Depending on the rendering path this includes transient vertex or
instance writes, scalar LUT and pass-uniform uploads, and creation of
the per-frame bindings needed by image, glyph, scalar, particle, or
composition passes. The camera-only write remains separately available
through Self::camera_uniform_upload. This is CPU preparation/enqueue
time, not GPU execution time. An ordinary streaming frame can include
pre-acquire transient buffer
capacity creation here, so a skipped report may have a non-zero duration
even though it performed no queue write and reports zero uploaded bytes.
Sourcepub fn camera_uniform_upload(self) -> Duration
pub fn camera_uniform_upload(self) -> Duration
Returns CPU time spent updating the small per-frame camera uniform.
Sourcepub fn surface_acquire(self) -> Duration
pub fn surface_acquire(self) -> Duration
Returns CPU time spent acquiring the next presentation surface texture.
In FIFO modes this includes queue back-pressure and is the closest CPU-side
approximation to VSync wait exposed by wgpu.
Sourcepub fn encode_submit_present(self) -> Duration
pub fn encode_submit_present(self) -> Duration
Returns CPU time spent encoding, submitting, and dispatching present.
Present dispatch does not mean the monitor has already scanned out the
frame; wgpu does not expose that timestamp here.
Sourcepub fn geometry_reused(self) -> bool
pub fn geometry_reused(self) -> bool
Returns whether this frame referenced retained visual geometry.
This includes prepared scenes and retained sprite/glyph batches. It is
a broad workload-classification hint rather than a statement that the
frame performed no uploads, and it can be true together with
Self::geometry_streamed.
Sourcepub fn geometry_streamed(self) -> bool
pub fn geometry_streamed(self) -> bool
Returns whether this frame contained dynamically supplied visual work.
This includes dynamic meshes, particle visibility instances, and scalar
field passes. It is a broad workload-classification hint rather than an
allocation or upload guarantee, and it can be true together with
Self::geometry_reused.
Sourcepub fn tessellation_stats(self) -> TessellationStats
pub fn tessellation_stats(self) -> TessellationStats
Returns command-level tessellation results for this frame.
Trait Implementations§
Source§impl Clone for RendererFrameMetrics
impl Clone for RendererFrameMetrics
Source§fn clone(&self) -> RendererFrameMetrics
fn clone(&self) -> RendererFrameMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RendererFrameMetrics
Source§impl Debug for RendererFrameMetrics
impl Debug for RendererFrameMetrics
Source§impl Default for RendererFrameMetrics
impl Default for RendererFrameMetrics
Source§fn default() -> RendererFrameMetrics
fn default() -> RendererFrameMetrics
impl Eq for RendererFrameMetrics
Source§impl PartialEq for RendererFrameMetrics
impl PartialEq for RendererFrameMetrics
impl StructuralPartialEq for RendererFrameMetrics
Auto Trait Implementations§
impl Freeze for RendererFrameMetrics
impl RefUnwindSafe for RendererFrameMetrics
impl Send for RendererFrameMetrics
impl Sync for RendererFrameMetrics
impl Unpin for RendererFrameMetrics
impl UnsafeUnpin for RendererFrameMetrics
impl UnwindSafe for RendererFrameMetrics
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.