From e170e6647eab280d55aa5fa9bf56e67d2ec3298d Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 01:01:15 -0800 Subject: [PATCH] Harness: the gauge list names every count of a live object kind What: the harness's named() list gains lod_clamp_variants, render_contents, attachment_views and device_samplers, and its doc says what the list holds: every count of an object kind the runtime keeps live, with the byte and age gauges and the thread ids left out. Why: its doc said "all of them, so the matrix's @drop check covers every kind of resource", but the list held 11 of the runtime's 15 object counts, so a leak of LOD-clamp sampler variants, render contents, attachment views or device samplers never reached the matrix's @drop check or its reading between the 100th and 200th runs. The byte and age gauges stay out: they move with load between those runs (an idle age grows by itself) and would read as growth. The runtime's own teardown test already holds every gauge at 0 after the device drops (tests/device.rs), so the four new @drop lines are expected 0 on every leg. Verified: the harness check job named in the next message; development's checks follow. --- crates/metal2vulkan-harness/src/rt.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-harness/src/rt.rs b/crates/metal2vulkan-harness/src/rt.rs index beb5ee914..a23d1b102 100644 --- a/crates/metal2vulkan-harness/src/rt.rs +++ b/crates/metal2vulkan-harness/src/rt.rs @@ -893,21 +893,26 @@ impl crate::ComputeCommandEncoder for rt::ComputeCommandEncoder { } } -/// The gauges the harness reports, by name: all of them, so the matrix's `@drop` check covers -/// every kind of resource. +/// The gauges the harness reports, by name: every count of an object kind the runtime keeps +/// live, so the matrix's `@drop` check and its reading between the 100th and 200th runs cover +/// each kind. The byte and age gauges, which move with load, and the thread ids are left out. fn named(gauges: rt::Gauges) -> Vec<(&'static str, u64)> { vec![ ("buffers", gauges.buffers), ("textures", gauges.textures), ("samplers", gauges.samplers), + ("lod_clamp_variants", gauges.lod_clamp_variants), ("pipelines", gauges.pipelines), ("kernels", gauges.kernels), ("kernel_entries", gauges.kernel_entries), ("kernel_variants", gauges.kernel_variants), + ("render_contents", gauges.render_contents), + ("attachment_views", gauges.attachment_views), ("command_buffers", gauges.command_buffers), ("descriptor_slots", gauges.descriptor_slots), ("blocks", gauges.blocks), ("events", gauges.events), + ("device_samplers", gauges.device_samplers), ] }