A compute indirect command buffer's write-back (SynchronizeResources 53, and
the eviction at suspend) wrote every threadgroup memory length at the
layout's lengths offset, and sized its strides cursor by the descriptor's
vertex bind count. Apple's GPU task service on macOS 27.0.1 (read:
synchronizeIndirectComputeCommandBuffer) writes each length to its own word
and takes one stride a kernel bind, as prepare reads them, so testing.md
7.1's stride quirk is not Apple's on this release and leaves the list.
For the guest: a written-back compute command holds each threadgroup length
in its own word, and lengths that run past the command end the write-back
there; a dynamic-stride command holds a stride for each kernel bind,
whatever its vertex bind count. The expected files of icb_evict, icb_sync,
icb_sync_errors and mutgap_tex_icb_sync_more (26A434) are recorded again,
with the scenarios and generated inputs that make them.
Source: 03bcf248f 85b938f3c
The M3 Max moved to macOS 27.0.1 (26A434). There, a render pass that clears
over a mutable rasterization rate map and draws nothing hangs the host's GPU
(kIOGPUCommandBufferCallbackErrorHang, about 29 ms in), and a guest reaches
it through the Metal platform. Some of Metal's answers also changed, so the
tests and the suite are made to follow the host's release.
The fix, the one change in what runs:
- The Metal platform marks the encoder of a pass over a map that is not
immutable, and right before its endEncoding binds a cached pipeline (void
vertex function, rasterization off, no formats, the device's largest
amplification count) and draws no triangles. Measured on the M3 Max at
27.0.1, every attachment's stored bytes and the visibility buffer stay as
without the draw, across the pass shapes a guest can give, and nothing
raises under MTL_DEBUG_LAYER. gpu/rate_map.rs records the measurements,
and its tests fail with the hang without the draw.
Tests that follow the host's release:
- A depth-stencil state's gpuResourceID answers 0 at 27.0.1 where it raised
at 26.7, and resourceIndex still raises. The getter tests expect each
release's measured answer. Core's depth-stencil info reply reads both, so
the request still raises on either release.
- Three Vulkan tests follow the runtime's Metal level: the setter takes 301
values at 27.0.1 (288 at 26.7), YCbCr8_420_2P's cast class is 46 (43),
and the legacy-heap test leaves out formats 630 to 645, whose block rule
is 26.7's. format_info.rs records that Metal on the M3 Max describes none
of 630 to 645 at 27.0.1, where the runtime's level, measured on an M4,
describes all 16; the tests that hit that stay failing on this host until
metal2vulkan's level does.
- Metal answers supportsMemoryOrderAtomics true at 27.0.1 (false at 26.7).
The Vulkan platform's stand-in stays false, as the runtime has none, and
the test pins the device's own answer and Metal's at each level.
The suite:
- The 1361 host-keyed cases are recorded for AppleM3Max-40c-26A434; the
25G229 files stay for hosts on 26.7. 1089 differ only in the key. 272
differ in Metal answers the Metal platform passes through: device-info key
26 (memory-order atomics) is 1, and 13 buffer and heap-placement GPU
addresses in isolated tasks' replies come out lower.
- suspend_crafted_resume is keyed by host: its last suspend's blob holds the
host's device info. Its unkeyed 26.7 files are removed.
- interplay_decodewalk_27's walk ends at its host-dependent exec, an
indirect dispatch after two compute encoders of different dispatch types:
Metal ended the process there at 26.7 and runs it at 27.0.1. The seed is
keyed by host and stops at that exec, waiting for its stamp and comparing
every window with the model. Only seed 27's ops change. Its 26.7 outcome
cannot be recorded again without a 26.x host, so its unkeyed files are
removed.
Nothing changes for the guest or the host, except that the host's GPU no
longer hangs on such a pass. On this branch's tree, cargo xtask check fails
only the 11 tests the runtime's 27.0.1 level decides (formats 630 to 645,
format 263's heap alignment, four mipmap chains), plus YCbCr sweeps that pass
run again alone; make test passes on 26A434.