Files
metal2vulkan/docs
Anees Iqbal 524c2f7346 Record the device's own alpha to coverage as a native precision note
One work packet, landed as 4 commits (f6834405b7..7ec539ceb2 on archive/development-linear-2026-10-28), in order:

* Record the device's own alpha to coverage as a native precision note

What: a render pipeline that keeps alpha to coverage now records
`PrecisionNote::DeviceAlphaCoverage` on its fragment stage, which the
runtime announces as `device-alpha-coverage`, on every profile not
measured to cover as Metal does. `link::graphics::coverage_notes` decides
it from the graphics state alone and hands it through `Linked`'s new
`fragment_notes` and `fragment_properties`, as the vertex stage's
fixed-function notes already go. A profile that takes the new measured
driver fact `DriverDeviation::MetalAlphaCoverage` (MoltenVK on Apple's
GPUs of the M3 Max's macOS 27 identity, the APPLE9 row) records no note and
requires `VkProperty::MetalAlphaCoverage` instead.

Why: Vulkan specifies no algorithm for turning an alpha into a coverage
mask, and Metal's is not the floor rule we assumed. Measured on the M3 Max
(macOS 27.0.1) over 639 alphas a sample count with our own probe
(probes/alpha_coverage_sweep.m): one sample covers above an alpha of 1/2;
two and four samples cover ceil(alpha * n - t), t a 2x2 ordered dither.
Under rule 1 the device's answer is the contract, so the note records it
and nothing in the shader or the sample mask imitates Metal's.

Bound, pixel by pixel against Metal's committed reading
(runtime_lane::alpha_coverage, 10,224 pixels a count): lavapipe (Mesa on
LLVM 21.1.8, arm64) dithers at one sample too, 2,560 pixels apart (a whole
fragment stored or dropped), and at four samples 96 pixels one sample
apart, all within an f32 ulp of a threshold; every pixel within
floor..ceil of alpha * n. MoltenVK 1.4.2 on the M3 Max: 0 apart at 1, 2
and 4 samples (its reading is byte-identical to plain Metal's). NVIDIA is
unmeasured beyond its known-gaps row. Stated in the note, the runtime
kind, docs/API.md's catalogue and docs/FAST-PATHS.md's device gaps;
`CoverageReadsRoundedAlpha`'s docs now say its bound is the rounding's
alone. Validation derives no tolerance from it (`Allowance::Unbounded`).

Versions: SEMANTICS_VERSION 1980, ARTIFACT_FORMAT_VERSION 490 (the codec
gains a note and a property), RUNTIME_VERSION 1790.

Verified: tests::engine_alpha_coverage (five profiles, 1 and 4 samples,
coverage on and off) passes and fails with the note's recording removed;
the lane passes on lavapipe (linux-gate arm64) and on MoltenVK (maclock),
printing the counts above and asserting the announcement iff the note;
nextest of metal2vulkan, -runtime, -conformance and -validation pass but
for the golden table (stale at this base; against development's re-blessed
table only the moltenvk-m3 profile fingerprint moves) and the runtime
sources pin, both re-blessed on development; clippy (all features, and
--cfg m2v_gpu) and rustdoc clean; api_signatures.tsv re-blessed.

* Declare device-alpha-coverage native in the suite and fix Metal's coverage rule

What: `replay::NATIVE_NOTES` gains `DeviceAlphaCoverage` (the coverage
class), so no a2c case must declare the notice the device announces at
its own coverage; values still compare field by field. The two
`a2c-on-1-alpha-50` known-gaps rows (llvmpipe, RTX 5080 Laptop) keep
their identity and now name the note and its bound: on llvmpipe the
measured dither and counts; on NVIDIA the bound is open until the
coverage lane's sweep runs there. `alpha_coverage_pairs`' model and docs,
and `render.rs`'s field doc, said Metal covers floor(alpha * n) samples;
they now state the measured rule (above 1/2 at one sample; ceil(alpha * n
- t) under a 2x2 ordered dither at two and four), and the model's test
holds the cases' recordings to it. docs/CONFORMANCE-COVERAGE.md
regenerated.

Why: the suite's standing declarations name every note that is the
device's native answer, and the rows must say what differs and whose
answer it is.

Verified: the conformance suite passes (nextest); coverage.py and
refusal_surface.py regenerated (REFUSALS.md unchanged).

* Number SEMANTICS_VERSION 1906, ARTIFACT_FORMAT_VERSION 474 and RUNTIME_VERSION 1679, past development's

The alpha-coverage note took the placeholders 1980, 490 and 1790;
development is at 1905, 473 and 1678.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:23 +02:00
..