From 760b5f7de240fad0c62c8596e9d5d90c6f610227 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 3 Dec 2026 09:55:58 -0800 Subject: [PATCH] Runtime metrics: count the render states that interpolate at a sample Where a render pipeline state's compiled content is made, beside the RenderContents gauge's rise, a content whose translated pipeline interpolates at a sample (GraphicsState::interpolates_at_sample) counts in Metrics::sample_interpolating_states. Red before it on lavapipe: job m3-max-84629. --- crates/metal2vulkan-runtime/src/render.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/metal2vulkan-runtime/src/render.rs b/crates/metal2vulkan-runtime/src/render.rs index 312802409..19a206dad 100644 --- a/crates/metal2vulkan-runtime/src/render.rs +++ b/crates/metal2vulkan-runtime/src/render.rs @@ -1561,6 +1561,9 @@ impl RenderCompiled { notes.sort_unstable(); notes.dedup(); core.counters.rise(Gauge::RenderContents); + if pipeline.graphics.interpolates_at_sample { + core.counters.count(Metric::SampleInterpolatingStates); + } // A state whose fragment function reaches an imageblock is not made (`unbuilt`), so its // sample is its colors alone. let colors = (lowered.color_attachments).map(|color| color.map(|c| c.pixel_format));