From 7d8a13ade2d7cb29b317e8da66110e4edf521276 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 09:30:04 -0800 Subject: [PATCH] Push fix forward: the address-form tessellation test pins the control stage at 0; the old render key re-pinned at 2204 m3-max-59292 at 8cc9127c94 (msi): clippy (all features, --cfg m2v_gpu, both Windows targets) and workspace Rustdoc passed; the metal2vulkan and metal2vulkan-runtime suites ran 3798 tests, 3795 passed, 3 failed: - pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value, which follows SEMANTICS_VERSION: re-pinned at 2204 from the job's value. - tests::engine_tessellation::under_the_identity_domains_the_control_stage_reads_the_factors_by_address asserted the control stage's push offset past the vertex function's fields; it is now 0, below the post-tessellation function's window, which the test asserts starts at TESSELLATION_BASE. - tests::golden_hashes::golden_hashes_match_the_table: the post-tessellation modules move; the table re-blesses on the M3 after the land. The engine inventory (llvm_as parts 1 to 8) passed unchanged. --- crates/metal2vulkan/src/pipeline/compile/tests.rs | 2 +- crates/metal2vulkan/src/tests/engine_tessellation.rs | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan/src/pipeline/compile/tests.rs b/crates/metal2vulkan/src/pipeline/compile/tests.rs index b95d2d8a2..a580a9700 100644 --- a/crates/metal2vulkan/src/pipeline/compile/tests.rs +++ b/crates/metal2vulkan/src/pipeline/compile/tests.rs @@ -1274,7 +1274,7 @@ fn the_old_render_descriptor_key_keeps_its_value() { let key = device("moltenvk-m3").render_descriptor_key(&d); let hex: String = key.digest().iter().map(|b| format!("{b:02x}")).collect(); assert_eq!( - hex, "459a25436a3c9b02635824eb9080912378e4fa120ace76b7a90f8e5e3709eb09", + hex, "578ed29fd96b4727681dce441ec42c3f14b17b8eda787940ae374e1b44760b28", "the old runtime's key of the descriptor" ); } diff --git a/crates/metal2vulkan/src/tests/engine_tessellation.rs b/crates/metal2vulkan/src/tests/engine_tessellation.rs index 22968d5a0..6b7e78e17 100644 --- a/crates/metal2vulkan/src/tests/engine_tessellation.rs +++ b/crates/metal2vulkan/src/tests/engine_tessellation.rs @@ -1829,7 +1829,8 @@ fn an_emulated_pipeline_reads_the_primitive_id_from_the_patch_position() { /// Under the identity domains (`Device::from_queries`' profile), a tessellation pipeline's control /// stage reads the factors through their address: the layout binds nothing, the interface states /// `PushField::TessellationFactorAddress` as a vertex-stage placement at the tessellation state's -/// push offset (a multiple of 8, past the functions' fields), the evaluation stage reaches its +/// push offset (0, below the post-tessellation function's window, which starts at +/// `push::TESSELLATION_BASE`), the evaluation stage reaches its /// pulled buffers through their pushed addresses with their strides, and every module passes L3, /// on each committed profile with `tessellationShader`, `bufferDeviceAddress` and `shaderInt64`. /// The stream's state (`fractionalOdd`, maximum 64, per patch, counter-clockwise) and Metal's @@ -1905,8 +1906,13 @@ fn under_the_identity_domains_the_control_stage_reads_the_factors_by_address() { "{stem}" ); let vertex = &p.interface.push[0]; - let end = vertex.push_range.map_or(0, |(o, s)| o + s); - assert!(ts.push_offset >= end, "{stem}: past the functions' fields"); + assert_eq!(ts.push_offset, 0, "{stem}: below the functions' fields"); + let base = crate::lower::push::TESSELLATION_BASE; + assert!( + (vertex.push_range).is_none_or(|(offset, _)| offset >= base), + "{stem}: the vertex function's fields from {base}: {:?}", + vertex.push_range + ); let slot = |index| SlotRef { stage: Stage::Vertex, class: SlotClass::Buffer,