Docs: Metal's resolve rounds a tie as its GPU does, and the alpha-to-coverage note's devices at 8 samples

The planner's ruling on resolve rounding: rule 1 counts a resolve among the device's own answers,
and two Macs round an average that lies exactly halfway between two codes differently, so Metal
fixes no answer there for a guest. An Apple M3 Max (macOS 27.0.1) rounds the tie up, as the
conformance recordings sample-positions-default-2x and -4x hold (red 1/255 over half the samples
resolves to 1); an AMD Radeon Pro 5300M (macOS 26.7.1) rounds it to the even code (red 0 at 1 of
2, 2 of 4 and 4 of 8 samples, an alpha of 127.5 to 128; m3-max-82284). The device's own rounding
stands; no behaviour changes and neither Mac's rounding is emulated.

- PrecisionNote::DeviceRoundedResolve's doc and docs/API.md's catalogue entry name both measured
  answers with their sources.
- The seven known-gaps-rt.tsv rows of sample-positions-default-2x and -4x (Iris Xe, RADV, NVIDIA,
  llvmpipe) say they differ only by how a tie rounds, and why that stands;
  docs/CONFORMANCE-COVERAGE.md regenerated from them.
- PrecisionNote::DeviceAlphaCoverage's doc and its catalogue entry say exactly which devices are
  measured at 8 samples: the 5300M (m3-max-82239); the M3 Max, which renders no 8 samples and so
  has no answer there; no device the runtime runs on. They said before both that the 5300M was
  measured at 8 and that 8 was unmeasured on every device.
This commit is contained in:
Anees Iqbal committed 2026-12-02 23:19:49 -08:00
1 parent e54cf61edd
commit 28e4da1f17
4 files changed
+36 -23

No files matched your search

+12 -4
View File
@@ -1643,7 +1643,12 @@ bound.
boundary, a float channel in its last bits, and wholly where a sample is a
NaN or an infinity: Metal's resolve counts a half or small-float NaN as 0 and a half infinity as
65536 of its sign, and makes any 32-bit float NaN 0x7fc00000, where the device's average may
keep them.
keep them. Metal's rounding of an average that lies exactly halfway between two codes is the
GPU's own: an Apple M3 Max (macOS 27.0.1) rounds it up, as the conformance recordings
`sample-positions-default-2x` and `-4x` hold (red 1/255 over half the samples resolves to 1), and
an AMD Radeon Pro 5300M (macOS 26.7.1) rounds it to the even code (red 0 there, an alpha of 127.5
to 128; m3-max-82284). Neither is an answer a guest can count on from Metal, so the device's own
rounding stands and neither Mac's is emulated.
On `metal2vulkan-runtime` it is the static note `PrecisionNote::DeviceRoundedResolve` of a render
pass that resolves a color attachment (`RenderPassDescriptor::precision_note`), by Vulkan's
`AVERAGE` in the pass's own rendering, on every device: an extended-range, bfloat or YCbCr
@@ -2219,15 +2224,18 @@ bound.
`ceil(alpha * n - t)` samples, `t` a 2x2 ordered dither of the pixel's window coordinates (1/8,
5/8; 7/8, 3/8), either count within an `f32` ulp of a threshold. Metal's rule is the GPU's own: an
AMD Radeon Pro 5300M under macOS 26.7.1 covers a pixel at one sample at an alpha of 1/2 or above,
and at two, four and eight samples `floor(alpha * n + 1 - t)` samples (1/8, 3/8; 5/8, 3/8); on
both, every pixel covers `floor(alpha * n)` or `ceil(alpha * n)`. Recorded bound, pixel by pixel
and at two, four and eight samples `floor(alpha * n + 1 - t)` samples (1/8, 3/8; 5/8, 3/8)
(m3-max-82239); on both, every pixel covers `floor(alpha * n)` or `ceil(alpha * n)`. Recorded
bound, pixel by pixel
against Metal's reading: on lavapipe (Mesa 26.0.8, arm64) every pixel covers `floor(alpha * n)` or
`ceil(alpha * n)` samples, so within one sample of Metal's and Metal's where `alpha * n` is an
integer; at one sample, where lavapipe dithers too, a whole fragment is stored or dropped where
its alpha lies between its own threshold and 1/2 (2,560 of the sweep's 10,224 pixels); at four
samples a pixel is one sample apart only within an `f32` ulp of a threshold (96 of 10,224). An
NVIDIA RTX 5080 Laptop GPU stores a fragment of alpha 1/2 at one sample, where Metal drops it;
every other device and count is unmeasured, eight samples on every device included.
every other device and count is unmeasured. At eight samples: the 5300M is measured (above); the
M3 Max renders no eight samples, so it has no answer there; no device the runtime runs on is
measured.
- `metal2vulkan-degrade-rotated-blend-rounding` (precision). `PrecisionNote::RotatedBlendRounding`:
A fragment function writes an attachment held with its channels rotated (`ARGB8Unorm`) whose blend
is not exact by construction (`LoweringInputs::rotated_blends`): every blend but a minimum, a