Skip to main content

RenderStatsSnapshot

Struct RenderStatsSnapshot 

Source
pub struct RenderStatsSnapshot {
Show 74 fields pub submits: u32, pub encoder_count: u32, pub submit_count: u32, pub pass_count: u32, pub pass_pixels: u64, pub copy_count: u32, pub copy_pixels: u64, pub offscreen_acquires: u32, pub offscreen_news: u32, pub offscreen_total_bytes: u64, pub transient_texture_bytes: u64, pub retained_texture_bytes: u64, pub upload_bytes: u64, pub upload_writes: u32, pub isolated_layer_renders: u32, pub isolated_layer_pixels: u64, pub layer_cache_hits: u32, pub capture_fixup_passes: u32, pub layer_cache_misses: u32, pub layer_cache_hit_pixels: u64, pub layer_cache_miss_pixels: u64, pub layer_cache_hits_by_kind: [u32; 5], pub layer_cache_misses_by_kind: [u32; 5], pub layer_cache_miss_pixels_by_kind: [u64; 5], pub shadow_shape_cache_hits: u32, pub shadow_shape_cache_misses: u32, pub shadow_shape_cache_hit_pixels: u64, pub shadow_shape_cache_miss_pixels: u64, pub shadow_text_blur_fallbacks: u32, pub blur_passes: u32, pub stages: u32, pub backdrop_admissions: u32, pub prefix_admissions: u32, pub substrates: u32, pub composite_passes: u32, pub effect_applies: u32, pub shader_pixels: u64, pub blur_pixels: u64, pub shape_fill_pixels: u64, pub shape_fill_pixels_by_class: [u64; 10], pub shape_vertices: u64, pub shape_passes: u32, pub shape_pipeline_fallback_draws: u32, pub instant_draws: u32, pub shape_specialized_draws: u32, pub shape_interior_draws: u32, pub depth_passes: u32, pub pipelines_created: u64, pub shader_pipeline_fallback_draws: u32, pub shader_specialized_draws: u32, pub placeholder_draws: u32, pub image_passes: u32, pub text_passes: u32, pub draw_calls: u32, pub damage: FrameDamage, pub repainted_pixels: u64, pub kept_stand_in_pixels: u64, pub text_image_cache_hits: u32, pub text_image_cache_misses: u32, pub text_image_cache_hit_pixels: u64, pub text_image_cache_miss_pixels: u64, pub text_image_raster_bytes: u64, pub text_glyph_atlas_hits: u32, pub text_glyph_atlas_misses: u32, pub text_glyph_atlas_miss_pixels: u64, pub text_glyph_runs_collected: u32, pub offscreen_pool_size: u32, pub offscreen_pool_bytes: u64, pub text_pool_size: u32, pub layer_cache_size: u32, pub layer_cache_bytes: u64, pub image_cache_size: u32, pub top_isolated_layers: [Option<IsolatedLayerStat>; 8], pub top_isolated_layer_count: usize,
}
Expand description

The counters of one drawn frame, from WgpuRenderer::last_frame_stats. Pixel counts are in device pixels.

Fields§

§submits: u32

Submissions to the GPU queue during the frame.

§encoder_count: u32

Command encoders the frame recorded.

§submit_count: u32

Submissions to the GPU queue, as counted from the recorded commands; equals submits.

§pass_count: u32

Render passes the frame recorded.

§pass_pixels: u64

Sum of every render pass’s first color target area: the tile traffic a tiling GPU pays whatever the passes draw.

§copy_count: u32

Texture regions copied outside any pass, and their texels.

§copy_pixels: u64

Texels of those copies.

§offscreen_acquires: u32

Offscreen textures the frame took from the pool or created.

§offscreen_news: u32

Of the acquired offscreen textures, those created because the pool held none that fit.

§offscreen_total_bytes: u64

Bytes of every offscreen texture the frame acquired, new or reused.

§transient_texture_bytes: u64

Bytes of the textures the frame used for one frame only.

§retained_texture_bytes: u64

Bytes of the textures kept between frames: the offscreen pool and the layer cache.

§upload_bytes: u64

Bytes the frame uploaded to the GPU.

§upload_writes: u32

Buffer writes the frame staged: uploads that reach the GPU as one write each, however many draws they carry.

§isolated_layer_renders: u32

Layers the frame drew into an offscreen texture of their own.

§isolated_layer_pixels: u64

Pixels of the offscreen textures of those layers.

§layer_cache_hits: u32

Layers drawn from the layer cache instead of drawn again.

§capture_fixup_passes: u32

Capture passes that replayed ops not yet on the page.

§layer_cache_misses: u32

Layers drawn anew and stored in the layer cache, because it held no match.

§layer_cache_hit_pixels: u64

Pixels of the layers drawn from the layer cache.

§layer_cache_miss_pixels: u64

Pixels of the layers drawn anew and stored in the layer cache.

§layer_cache_hits_by_kind: [u32; 5]

Hits per key kind, indexed by LayerRasterCacheKey::kind_slot.

§layer_cache_misses_by_kind: [u32; 5]

Stores per key kind, indexed by LayerRasterCacheKey::kind_slot.

§layer_cache_miss_pixels_by_kind: [u64; 5]

Stored pixels per key kind, indexed by LayerRasterCacheKey::kind_slot.

§shadow_shape_cache_hits: u32

Shadows drawn from a cached blurred texture.

§shadow_shape_cache_misses: u32

Shadows blurred anew because the shadow cache held no match.

§shadow_shape_cache_hit_pixels: u64

Pixels composited from the cached shadow textures.

§shadow_shape_cache_miss_pixels: u64

Pixels of the shadow textures blurred anew.

§shadow_text_blur_fallbacks: u32

Shadows whose source holds more than shapes, such as text, that found no cached texture and were blurred anew.

§blur_passes: u32

Blur passes the frame encoded, each downsample, horizontal and vertical pass counting one.

§stages: u32

Backdrop stages resolved: every stage flushes the page and captures once, so the layer pass count is one more than this.

§backdrop_admissions: u32

Backdrops whose stage texture the layer cache pinned this frame, so later frames replay their composites from it.

§prefix_admissions: u32

Opaque page prefixes copied into the layer cache this frame.

§substrates: u32

Captures averaged into a quarter-size substrate for a shader’s wide taps.

§composite_passes: u32

Passes that draw at least one resolved composite: a final pass holding twelve glass tails counts once, a composite resolved into its own texture counts its own pass.

§effect_applies: u32

Render effects, such as offsets and runtime shaders, the frame applied to an offscreen source.

§shader_pixels: u64

Pixels shaded by runtime shader composites: what every glass surface costs a tiling GPU per frame, each capture that re-shades one included.

§blur_pixels: u64

Pixels the blur passes write: every downsample, horizontal and vertical pass of a backdrop’s blur and of its substrates, within the scissor the pass was given.

§shape_fill_pixels: u64

Pixels the shape draws rasterize: a band drawn as a mesh counts its mesh, everything else its quad. Fill rate is what a scene of rings costs a tiling GPU, however few draws it takes.

§shape_fill_pixels_by_class: [u64; 10]

shape_fill_pixels split by shape kind and brush, in the order of ShapeFill::LABELS: which records a fill-bound frame pays for.

§shape_vertices: u64

Vertices the shape draws run through the vertex stage: six per quad, six per band segment. A tiling GPU stores every vertex’s varyings before it shades a pixel, so this bounds a frame as fill does.

§shape_passes: u32

Batches of shape draws the frame recorded.

§shape_pipeline_fallback_draws: u32

Shape draws that took a stand-in while their pipeline compiled: a general pipeline, or triangles the CPU laid out.

§instant_draws: u32

Image, glyph, shadow and layer draws that took the instant pipeline while their own compiled.

§shape_specialized_draws: u32

Shape draws using a completed specialized pipeline.

§shape_interior_draws: u32

Shape draws laying opaque interiors down in a pass’s depth pre-pass.

§depth_passes: u32

Render passes that took a depth buffer for their opaque interiors.

§pipelines_created: u64

Pipelines this process has built, counted since it started rather than over the frame. A count that grows while a person is interacting names a backend shader compile they waited through.

§shader_pipeline_fallback_draws: u32

Runtime shader draws using a shader’s general pipeline while the specialization they asked for compiles in the background.

§shader_specialized_draws: u32

Runtime shader draws using a completed specialized pipeline.

§placeholder_draws: u32

Effects drawn as their placeholder, or left out, because no pipeline they need had compiled yet.

§image_passes: u32

Batches of image draws the frame recorded.

§text_passes: u32

Batches of text draws the frame recorded.

§draw_calls: u32

Shape, image, glyph and composite draws recorded this frame. The *_passes counters above count batches or passes, so a single image batch reports image_passes=1 however many images it draws; this counts what the driver actually sees. Blur and effect quads are not included: they are one draw each and already counted by blur_passes and effect_applies.

§damage: FrameDamage

The window pixels the frame changes against the frame the renderer’s composition target kept.

§repainted_pixels: u64

The window pixels the frame drew again: all of them, or those of the damage, over what the frame before left in the rest.

§kept_stand_in_pixels: u64

The window pixels the frame’s image still shows as an earlier frame drew them with stand-ins, which the frame did not draw again: no pipeline landed since. A frame after the next landing draws them.

§text_image_cache_hits: u32

Texts drawn from the cache of rasterized text images.

§text_image_cache_misses: u32

Texts rasterized into an image because the cache held none.

§text_image_cache_hit_pixels: u64

Pixels of the text images taken from the cache.

§text_image_cache_miss_pixels: u64

Pixels of the text images rasterized.

§text_image_raster_bytes: u64

Bytes of the text images rasterized, four per pixel.

§text_glyph_atlas_hits: u32

Glyphs found in the glyph atlas.

§text_glyph_atlas_misses: u32

Glyphs rasterized and added to the glyph atlas.

§text_glyph_atlas_miss_pixels: u64

Pixels of the glyphs added to the glyph atlas.

§text_glyph_runs_collected: u32

Texts whose glyph runs the frame laid out again: a text drawn as it was before takes its run from the cache.

§offscreen_pool_size: u32

Textures held for reuse at the end of the frame, with the composition target.

§offscreen_pool_bytes: u64

Bytes of the textures counted by offscreen_pool_size.

§text_pool_size: u32

Rasterized text images in the text image cache at the end of the frame.

§layer_cache_size: u32

Layers in the layer cache at the end of the frame.

§layer_cache_bytes: u64

Bytes of the layer cache’s textures at the end of the frame.

§image_cache_size: u32

Image textures cached at the end of the frame.

§top_isolated_layers: [Option<IsolatedLayerStat>; 8]

The largest isolated layers of the frame by pixel area, largest first, in the first top_isolated_layer_count entries; the rest are None.

§top_isolated_layer_count: usize

How many entries of top_isolated_layers are filled, at most eight.

Implementations§

Source§

impl FrameStatsSnapshot

Source

pub fn top_isolated_layers(self) -> impl Iterator<Item = IsolatedLayerStat>

The largest isolated layers of the frame by pixel area, largest first.

Trait Implementations§

Source§

impl Clone for FrameStatsSnapshot

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FrameStatsSnapshot

Source§

impl Debug for FrameStatsSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FrameStatsSnapshot

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FrameStatsSnapshot

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FrameStatsSnapshot

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutData for T
where T: Any + Debug + PartialEq,

Source§

fn same_as(&self, other: &(dyn LayoutData + 'static)) -> bool

Whether other holds the same data, so a parent can keep its last measure.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

The data as Any, to read it by its type.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,