pub struct RenderStatsSnapshot {Show 73 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 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: u32Submissions to the GPU queue during the frame.
encoder_count: u32Command encoders the frame recorded.
submit_count: u32Submissions to the GPU queue, as counted from the recorded commands; equals submits.
pass_count: u32Render passes the frame recorded.
pass_pixels: u64Sum of every render pass’s first color target area: the tile traffic a tiling GPU pays whatever the passes draw.
copy_count: u32Texture regions copied outside any pass, and their texels.
copy_pixels: u64Texels of those copies.
offscreen_acquires: u32Offscreen textures the frame took from the pool or created.
offscreen_news: u32Of the acquired offscreen textures, those created because the pool held none that fit.
offscreen_total_bytes: u64Bytes of every offscreen texture the frame acquired, new or reused.
transient_texture_bytes: u64Bytes of the textures the frame used for one frame only.
retained_texture_bytes: u64Bytes of the textures kept between frames: the offscreen pool and the layer cache.
upload_bytes: u64Bytes the frame uploaded to the GPU.
upload_writes: u32Buffer writes the frame staged: uploads that reach the GPU as one write each, however many draws they carry.
isolated_layer_renders: u32Layers the frame drew into an offscreen texture of their own.
isolated_layer_pixels: u64Pixels of the offscreen textures of those layers.
layer_cache_hits: u32Layers drawn from the layer cache instead of drawn again.
capture_fixup_passes: u32Capture passes that replayed ops not yet on the page.
layer_cache_misses: u32Layers drawn anew and stored in the layer cache, because it held no match.
layer_cache_hit_pixels: u64Pixels of the layers drawn from the layer cache.
layer_cache_miss_pixels: u64Pixels 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: u32Shadows drawn from a cached blurred texture.
shadow_shape_cache_misses: u32Shadows blurred anew because the shadow cache held no match.
shadow_shape_cache_hit_pixels: u64Pixels composited from the cached shadow textures.
shadow_shape_cache_miss_pixels: u64Pixels of the shadow textures blurred anew.
shadow_text_blur_fallbacks: u32Shadows whose source holds more than shapes, such as text, that found no cached texture and were blurred anew.
blur_passes: u32Blur passes the frame encoded, each downsample, horizontal and vertical pass counting one.
stages: u32Backdrop stages resolved: every stage flushes the page and captures once, so the layer pass count is one more than this.
backdrop_admissions: u32Backdrops whose stage texture the layer cache pinned this frame, so later frames replay their composites from it.
prefix_admissions: u32Opaque page prefixes copied into the layer cache this frame.
substrates: u32Captures averaged into a quarter-size substrate for a shader’s wide taps.
composite_passes: u32Passes 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: u32Render effects, such as offsets and runtime shaders, the frame applied to an offscreen source.
shader_pixels: u64Pixels shaded by runtime shader composites: what every glass surface costs a tiling GPU per frame, each capture that re-shades one included.
blur_pixels: u64Pixels 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: u64Pixels 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: u64Vertices 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: u32Batches of shape draws the frame recorded.
shape_pipeline_fallback_draws: u32Shape draws that took a stand-in while their pipeline compiled: a general pipeline, or triangles the CPU laid out.
instant_draws: u32Image, glyph, shadow and layer draws that took the instant pipeline while their own compiled.
shape_specialized_draws: u32Shape draws using a completed specialized pipeline.
shape_interior_draws: u32Shape draws laying opaque interiors down in a pass’s depth pre-pass.
depth_passes: u32Render passes that took a depth buffer for their opaque interiors.
pipelines_created: u64Pipelines 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: u32Runtime shader draws using a shader’s general pipeline while the specialization they asked for compiles in the background.
shader_specialized_draws: u32Runtime shader draws using a completed specialized pipeline.
placeholder_draws: u32Effects drawn as their placeholder, or left out, because no pipeline they need had compiled yet.
image_passes: u32Batches of image draws the frame recorded.
text_passes: u32Batches of text draws the frame recorded.
draw_calls: u32Shape, 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: FrameDamageThe window pixels the frame changes against the frame the renderer’s composition target kept.
repainted_pixels: u64The window pixels the frame drew again: all of them, or those of the damage, over what the frame before left in the rest.
text_image_cache_hits: u32Texts drawn from the cache of rasterized text images.
text_image_cache_misses: u32Texts rasterized into an image because the cache held none.
text_image_cache_hit_pixels: u64Pixels of the text images taken from the cache.
text_image_cache_miss_pixels: u64Pixels of the text images rasterized.
text_image_raster_bytes: u64Bytes of the text images rasterized, four per pixel.
text_glyph_atlas_hits: u32Glyphs found in the glyph atlas.
text_glyph_atlas_misses: u32Glyphs rasterized and added to the glyph atlas.
text_glyph_atlas_miss_pixels: u64Pixels of the glyphs added to the glyph atlas.
text_glyph_runs_collected: u32Texts whose glyph runs the frame laid out again: a text drawn as it was before takes its run from the cache.
offscreen_pool_size: u32Textures held for reuse at the end of the frame, with the composition target.
offscreen_pool_bytes: u64Bytes of the textures counted by offscreen_pool_size.
text_pool_size: u32Rasterized text images in the text image cache at the end of the frame.
layer_cache_size: u32Layers in the layer cache at the end of the frame.
layer_cache_bytes: u64Bytes of the layer cache’s textures at the end of the frame.
image_cache_size: u32Image 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: usizeHow many entries of top_isolated_layers are filled, at most eight.
Implementations§
Source§impl FrameStatsSnapshot
impl FrameStatsSnapshot
Sourcepub fn top_isolated_layers(self) -> impl Iterator<Item = IsolatedLayerStat>
pub fn top_isolated_layers(self) -> impl Iterator<Item = IsolatedLayerStat>
The largest isolated layers of the frame by pixel area, largest first.