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 validating and tessellating scene commands.
Sourcepub fn upload(self) -> Duration
pub fn upload(self) -> Duration
Returns CPU time spent writing transient vertex data into the GPU buffer.
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 reused geometry from a PreparedScene.
Sourcepub fn geometry_streamed(self) -> bool
pub fn geometry_streamed(self) -> bool
Returns whether this frame rendered geometry updated through DynamicMesh2d.
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.