From 81bd82fdaa2848e145edf2c305c15af79cbfef8a Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 16:58:30 -0800 Subject: [PATCH] Fix forward of 60846: the old render key at SEMANTICS 2224, and the memory writer at pixel rate on a portability device the_old_render_descriptor_key_keeps_its_value pins the key of an old render descriptor, which carries SEMANTICS_VERSION. 1c9ed73d4c moved SEMANTICS to 2224. The pin is the key that m3-max-60846 printed at bb5a1c3612 (left: f65d353b...). a_center_varying_at_sample_rate_needs_the_interpolation_functions held multisample_counter, a memory writer, to the per-sample refusal on moltenvk-m3 with shaderSampleRateInterpolationFunctions withheld. Since 1c9ed73d4c it runs at pixel rate, so it compiles there: its center varying reads where the device evaluates it. The test now asserts that, with no requirement of the member and with the MultisamplePosition note. With the member, it keeps the pixel form's assertions. Verified: m3-max-60846 at bb5a1c3612 passed fmt, clippy plain/gpu/cpu, Windows clippy x2, doc, signatures, refusals, the conformance suite, the validation focus tests, the lavapipe runtime suite and lost_writes on lavapipe. The translator suite had 3391 of 3393 passing; these two tests were the failures. A focused job on this sha follows. --- crates/metal2vulkan/src/pipeline/compile/tests.rs | 2 +- crates/metal2vulkan/src/tests/engine_multisample.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan/src/pipeline/compile/tests.rs b/crates/metal2vulkan/src/pipeline/compile/tests.rs index e27aa5918..db6ef01a8 100644 --- a/crates/metal2vulkan/src/pipeline/compile/tests.rs +++ b/crates/metal2vulkan/src/pipeline/compile/tests.rs @@ -1273,7 +1273,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, "b46ad11dd573c1e70446d3417bb0497b56093d6fcf3c5152e4ee91ef419f5dd0", + hex, "f65d353b285b15718f52e7a7e654de45d332f5a68c80627b84b362830cdbfbb9", "the old runtime's key of the descriptor" ); } diff --git a/crates/metal2vulkan/src/tests/engine_multisample.rs b/crates/metal2vulkan/src/tests/engine_multisample.rs index 356b5e624..dcb5799d8 100644 --- a/crates/metal2vulkan/src/tests/engine_multisample.rs +++ b/crates/metal2vulkan/src/tests/engine_multisample.rs @@ -570,7 +570,9 @@ fn the_interface_states_the_pixel_reads() { /// pixel form only where the portability member allows it, and is refused naming the member: with /// it the pipeline compiles, requires the member and the centered offset, and converts to MSL that /// Metal compiles; either way, the pipeline of the same function at one sample compiles without -/// either. +/// either. The memory writer runs at pixel rate: with the member it reads its center varying +/// through the same pixel form, and without it where the device evaluates it, noting +/// `MultisamplePosition`, rather than being refused. #[test] fn a_center_varying_at_sample_rate_needs_the_interpolation_functions() { let Some(lib) = fixture() else { return }; @@ -600,6 +602,11 @@ fn a_center_varying_at_sample_rate_needs_the_interpolation_functions() { Err(AssembleError::Missing(why)) => eprintln!("SKIPPED: {why}"), Err(AssembleError::Rejected(why)) => panic!("{what}: MoltenVK's MSL: {why}"), } + } else if fragment == COUNTER { + let p = four.unwrap_or_else(|e| panic!("{what}: {e}")); + validate(&p, &dev, &what); + assert!(!p.requirements.features.contains(&feature), "{what}"); + assert!(noted(&p), "{what}"); } else { assert_eq!( four.map(|_| ()),