From dad45427b04ffe96fcb1f9436d8efa5870301b9a Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 27 Nov 2026 04:48:09 -0800 Subject: [PATCH] Probe swizzled_view_stores: record what it measured on the M3 Max (job m3-max-76829) A swizzled view used as colour attachment 0 stores the clear and the draw as written in all three cases; a plain Metal kernel's access::write through the view stores the colour permuted by the swizzle (channel s[l] takes lane l). Metal gives every swizzled view usage 0x11 over a base of 0x17, and its validation layer ends both uses for the missing RenderTarget and ShaderWrite usage. --- .../probes/swizzled_view_stores.m | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-conformance/probes/swizzled_view_stores.m b/crates/metal2vulkan-conformance/probes/swizzled_view_stores.m index a4accf6f3..e7bccd61a 100644 --- a/crates/metal2vulkan-conformance/probes/swizzled_view_stores.m +++ b/crates/metal2vulkan-conformance/probes/swizzled_view_stores.m @@ -39,7 +39,21 @@ // swizzle's lane l names, a missing channel 0 or alpha 1), and whether they are the colour as // written. // -// Not yet run. +// WHAT IT MEASURED, Apple M3 Max, macOS 27.0.1 (potluck job m3-max-76829, MTL_DEBUG_LAYER unset): +// render every case, clear and draw: as-written, on all 8 texels of each kind. Case 0: clear +// d1d0d03d.9b9a9a3e (0.1020, 0.3020), draw cdcc4c3e.cdcccc3e (0.2, 0.4), sampled +// r, g, 0, 1. Case 1: the same bytes, sampled g, r, 0, 1. Case 2: clear 1a.4d.99.e6, +// draw 33.66.b3.cc, sampled b, g, r, a. Every sample is the read rule's over the +// stored texel. +// compute case 0 as-written (cdcc4c3e.cdcccc3e); case 1 permuted, channels g, r +// (cdcccc3e.cdcc4c3e); case 2 permuted, channels b, g, r, a (b3.66.33.cc). The sample +// through the view then answers the colour as written. Texels x >= 4 keep 0xee. +// usage every view's usage is 0x11 (ShaderRead | PixelFormatView) over a base of 0x17. +// layer with MTL_DEBUG_LAYER=1 every case's render path ends the process (signal 6) with +// "Texture at colorAttachment[0] has usage (0x11) which doesn't specify +// MTLTextureUsageRenderTarget (0x04)", and every compute path with "Compute +// Function(kw): writes texture (t[0]) whose usage (0x11) doesn't specify +// MTLTextureUsageShaderWrite (0x02)". #import #import #include