Commit Graph
4 Commits
Author SHA1 Message Date
Anees Iqbal e6ff175880 🐛 Write back ICB lengths per word and strides by kernel binds
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
2026-10-26 12:24:31 +02:00
Anees Iqbal 1c6aaa5c6a 🔥 Record the suite for macOS 27 alone, dropping 26.7's files
The suite's host has been the M3 Max on macOS 27.0.1 (26A434) since
2026-10-13, and every behaviour change since was recorded there alone. The
1361 expected files keyed AppleM3Max-40c-25G229 (macOS 26.7), last written
on 2026-10-11, describe a library that no longer exists, and no host runs
25G229 to record them again, so they go. A host on another build records
its files with make bless, as after any OS update.

README.md, docs/testing.md and tests/suite/README.md name 26A434's key, and
testing.md says which build each scenario's measurements were made on.
Nothing the suite runs or compares on this host changes.

Source: f958e21c6
2026-10-26 12:24:31 +02:00
Anees Iqbal 23f971ebe2 🐛 Run on macOS 27.0.1 hosts: end rate-map passes with an empty draw
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.
2026-10-15 22:02:38 +03:00
Anees Iqbal 98fe2a3bd5 🆕 Replace the tree with libreims_vgpu and its C API
This repository now holds libreims_vgpu, a Rust library that is the host
side of the paravirtualized GPU macOS guests drive, in place of Apple's
ParavirtualizedGraphics.framework: the library and its C API
(reims_vgpu.h), the PCI device's option ROM, QEMU's apple-gfx on that API
(vendor/qemu), the behaviour-lock suite that drives the C API as QEMU
does, and reims-ctl, the VM manager users run. README.md says what it is
and how it is laid out, and AGENTS.md how to change it.

Every file of the earlier tree is replaced. vendor/qemu moves to the
steelbrain/reims-vgpu branch of the same public repository.
2026-10-11 20:27:17 +03:00