From 2deffb9e1d4849ba16b3f5982921c0a01b0eec9e Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 9 Nov 2026 23:20:16 -0800 Subject: [PATCH] RUNTIME_VERSION 1998 and the runtime-sources pin for at most 4096 spare command buffers What: the spare command pools now hold at most 4,096 command buffers across all pools, counting pools that are out (taken, being freed, beginning a primary ahead). Over the bound, the oldest spares free their command buffers on the free thread; if that is not enough, the pool given back frees its newest past the bound. RUNTIME_VERSION 1997 -> 1998 and the runtime-sources pin follow. Why: on the Iris Xe (ANV below Xe-HP, Mesa 26.2.4) each command buffer that records a binding table takes a 64 KiB block of a 1 GiB pool: 16,384 per device, and the next recording fails with VK_ERROR_OUT_OF_DEVICE_MEMORY. The spares held 9,716-9,771 before the failing frame in all 6 failed loaded runs of checked_frames_merge_once. Verified (exitcrash, at 9ddb267dbd on 8636a26f43): - loaded Iris, the iris-flakes shape: checked_frames_merge_once 0 of 76 vs 6 of 79 at base; runtime suite 16/16 loops; teardown threads 0 of 6,528. - new device test, spares held after three big command buffers alive at once: 4,096 on lavapipe, M3 MoltenVK and Iris; with the bound disabled 12,417 / 12,675 / 12,417 (fails). - Iris cost, the test alone, 5 runs each: spares max 4,096 vs 7,787-7,793; frees on the free thread 220 vs 14-17; test time 13.6-14.0 vs 13.6-13.9 s. - tests::spares 14/14 on the three venues; lavapipe runtime suite 2025/2025; clippy and rustdoc clean. Generators and api-signatures --check unchanged at landing. Not run: the full gate and the other venues (development's checks). --- 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 df675e269..e48278bdc 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -c6cd9f4633b158c32016a5f98f1dadad0c6a22eee2fd22b98add79a96d97b995 +c07ecaa672a62917003fe8b891a1a29afe40709f2d0655da98ad0e03119a4928 diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index c3adbfb3f..3aa560470 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 = 1997; +pub const RUNTIME_VERSION: u32 = 1998; /// 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