From bf6eb6de0e71b5fa8df85ef6a1f9f9635d257a3d Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 13 Nov 2026 02:44:10 -0800 Subject: [PATCH] SEMANTICS_VERSION 2083, RUNTIME_VERSION 2215: a flagged rate-mapped draw is drawn in parts Under RateMapRegionPolicy::FanOut, the probe now also records each flagged draw's first and last flagged triangle (PROBE_DRAW_WORDS 1+2*32 -> 1+4*32), and a flagged triangle list of one instance that reads no [[primitive_id]] and writes no memory is drawn in its place in up to three parts: the triangles before the flagged range fanned out, the range region by region, the rest fanned out. Parts of a 16-bit index list begin at even triangles. Other flagged draws are drawn region by region whole, as before. Wide marks count only triangles the probe does not flag, so the fanned parts can take the four-copy variant. New counters: rate_map_parted_draws, rate_map_parted_region_triangles and rate_map_probe_wait_nanos. Exact is unchanged. The probe stage's SPIR-V changes (SEMANTICS) and the runtime draws flagged draws otherwise (RUNTIME). Verified by the change's own runs: rate_mapped_fan_out's four flagged draws go in parts and match the region-by-region frame pixel for pixel, and Exact draws none in parts with equal pixels; every tests::rate_map* test 21/21 on an RTX 2080 and a Radeon 780M; nextest of metal2vulkan and the runtime 5053 passed, the 2 failures the known golden re-bless rows; clippy clean. The pieces lane's frame with wide triangles, warm GPU: RTX 2080 39.6 -> 30.9 ms (Exact 68.5), Radeon 780M 373 -> 223 ms (Exact 566, a shared machine); the frame without wide triangles unchanged. --- crates/metal2vulkan/src/cache/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 1f3b75fdc..c1689ee14 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -60,7 +60,7 @@ mod tests; /// unchanged version, and its bless records the version. Independent of the crate's version and of /// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no /// history. -pub const SEMANTICS_VERSION: u32 = 2082; +pub const SEMANTICS_VERSION: u32 = 2083; /// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the /// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 516; /// 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 = 2214; +pub const RUNTIME_VERSION: u32 = 2215; /// 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