From 48ca4bba632f31f796cd4b6778ee4faeaddf5745 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 13 Nov 2026 03:30:36 -0800 Subject: [PATCH] The derived-slot probe records Metal's answers on the M3 Max What: overlapping_derived_slots.m's header records its run: Metal refuses the function for kind 0 batch 0 ("texture argument src has invalid location (<0,1>)"), and makes and runs it for kind 0 batch 1 (dst reads 1 2 3 4) and kind 2 batch 0 (dst gated off, reads 0 0 0 0). Why: it settles that a runtime refusal of a kernel whose constants put two present textures on one slot through derived constants is Metal's own answer, made at the pipeline state where Metal makes it at the function. Verified: potluck job m3-max-25307 on the M3 Max (macOS 27.0.1), one run. --- .../probes/overlapping_derived_slots.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/metal2vulkan-conformance/probes/overlapping_derived_slots.m b/crates/metal2vulkan-conformance/probes/overlapping_derived_slots.m index 10b554a7b..924b1cfb7 100644 --- a/crates/metal2vulkan-conformance/probes/overlapping_derived_slots.m +++ b/crates/metal2vulkan-conformance/probes/overlapping_derived_slots.m @@ -18,6 +18,14 @@ // clang -fobjc-arc -O1 -fmodules -o overlapping_derived_slots overlapping_derived_slots.m \ // -framework Foundation -framework Metal // Run: ./overlapping_derived_slots, MTL_DEBUG_LAYER unset. +// +// WHAT IT MEASURED (Apple M3 Max, macOS 27.0.1, one run): +// - kind 0, batch 0: Metal refuses the function: "texture argument src has invalid location +// (<0,1>) in overlapping_derived_slots". +// - kind 0, batch 1: the function and pipeline are made; `dst` reads 1 2 3 4. +// - kind 2, batch 0: made; `dst`, gated off, reads 0 0 0 0. +// The runtime makes this check at the pipeline state rather than at the function +// (`Library::new_function_with_name_constant_values`). #import #import #include