From 203673d873ff4e92e63c36734109d148283319af Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 9 Nov 2026 12:41:37 -0800 Subject: [PATCH] RUNTIME_VERSION 1985 and the runtime-sources pin for spare command pools that follow their uses 733db7a42c changes the runtime's spare command pools: a pool given back keeps, per level, the most command buffers any of its last 8 uses handed out and frees the rest; the oldest spare idle for 10 s sheds what it holds when a later give-back finds it; each give-back frees at most 32 (vkFreeCommandBuffers, then vkTrimCommandPool, in an exit-guard section on the giving thread). vkDestroyCommandPool still runs only at teardown (NVIDIA 615.71.09's hang there). reims measured the old rule's growth on a 780M: every VkCommandBuffer kept for the device's life, 96 KiB of GTT each, 2668 -> 6970 over 6 guest resets. Verified by the branch: um790 12300 at the rebased tip, 780M runtime suite 2009/2009 and lavapipe 2012/2012, clippy for both; the device test holds 3, 65, then 2 command buffers (65 after 10 more with the frees made no-ops, 3 of 11 spares tests failing). Iris Xe and RTX 5080 spares tests pass (5080 3/3 rounds, no hang). One give-back freeing 32: free 4-103 us, trim 0.4 us-3.0 ms (780M median 0.65 ms). MoltenVK cost pending. Here: signatures --check, REFUSALS and coverage docs regenerated, fmt. --- crates/metal2vulkan-validation/runtime-sources.sha256 | 2 +- crates/metal2vulkan/src/cache/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index ddbcdb06b..4253d92e1 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -a85cbd7c50837b6e742da573b8e6c23f1703a4db808bea5223bb2d5efbd0a487 +f9c1fd3d874e603b16486578cf153f698325d508852f915da007b4b2a810845b diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index a191d21aa..e0dc5ccf1 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 497; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 1984; +pub const RUNTIME_VERSION: u32 = 1985; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles