pub struct SceneStats {
pub players: u32,
pub prims: u32,
pub draw_calls: u32,
pub uploaded_bytes: u64,
pub mergeable_draws: u32,
pub redundant_texture_binds: u32,
pub coverage_layers: u32,
pub group_layers: u32,
pub gpu_pass_time_ns: Option<u64>,
}Expand description
What one frame of a crate::SSScene cost.
Counts are exact and always populated. gpu_pass_time_ns needs
Features::TIMESTAMP_QUERY on the device and lags by a frame or two, so it
is a profiling counter rather than this frame’s number.
Fields§
§players: u32Players that contributed geometry (hidden and culled ones do not).
prims: u32Primitives in the frame’s table — parts, shape fans and effect particles.
draw_calls: u32Draw calls recorded.
uploaded_bytes: u64Bytes written to the SoA arena, the primitive table and the mesh stream.
mergeable_draws: u32Draw calls that could be folded into the one before them as they stand: same pipeline, same texture, and a vertex range that carries straight on.
redundant_texture_binds: u32Texture bind-group sets that repeat the previous draw’s texture.
coverage_layers: u32Coverage bitmaps rasterised this frame — one per masking player, and one more for each further 24 mask writers in its instance tree, each its own render pass. Always zero under the stencil backend, which is the point of having the number: it is what the coverage backend costs.
group_layers: u32Players drawn into a layer of their own this frame and folded back at
their alpha (see crate::SSScene::set_group_alpha) — each a render pass,
a target-sized layer, and a composite over the target.
gpu_pass_time_ns: Option<u64>GPU time for the last render pass whose timestamps came back, in
nanoseconds. None until one has, or always without the feature.