A layer that answers as Metal does needs to know, per refused pipeline, whether Metal returns nil
with an NSError or its descriptor validation asserts and ends the process. ColorAttachment now
carries `metal: MetalAnswer` (NilWithError | EndsProcess), set at each of its 17 sites from plain
Metal's answer on an Apple M3 Max under macOS 27.0.1 (probes/color_attachment_answers.m, no
MTL_DEBUG_LAYER, job m3-max-13738):
- EndsProcess (SIGABRT, "Render Pipeline Descriptor Validation"): blending on a bfloat attachment,
with a function, a fetching function or none ("... MTLPixelFormatRGBA16Bfloat for this render
target is not blendable."); alpha to coverage over an integer attachment 0, rasterizing or not
("... alphaToCoverageEnabled requires a float/unorm pixel format ..."). The link's doc said the
second was unmeasured with rasterization off; it is measured now.
- NilWithError (code 3, domain AGXMetalG15X_M1): an output of another numeric class (half4, float4
and int4 into RGBA8Uint; uint4 into RGBA8Unorm and RGBA8Sint; a fetching uint4 of RGBA8Unorm);
a color input of another class (uint4 of RGBA8Unorm, BGR10_XR, A8Unorm); fewer output components
than channels (with and without fetch); a blend of the second source without the second output,
or without the first (with and without fetch); a color input without an attachment; a tile
function's imageblock member without a format ("Invalid pixel format for render target 1").
- A `Compiled` tile function compiled under another format than the descriptor's has no Metal
counterpart (Metal compiles the function for its pipeline) and answers EndsProcess, the answer
of an unmeasured case; under no format it answers Metal's NilWithError.
Public API: the new `error::MetalAnswer` and the changed variant are in api_signatures.tsv and the
api_surface table. Refusals are not serialized in any cache, and translation output is unchanged,
so neither ARTIFACT_FORMAT_VERSION nor SEMANTICS_VERSION moves. docs/REFUSALS.md regenerates
unchanged (descriptor errors are not in it). docs/API.md states the two answers.
Tests: each existing test of a ColorAttachment refusal now names its answer (bfloat blends,
alpha to coverage, a tile function compiled for other formats: EndsProcess; output class and
components, the second source, unattached inputs, unformatted tile members: NilWithError), and a
new unit test holds the storage form's class refusal to NilWithError for reads and writes.
(cherry picked from commit cd17476e5a4ae2b9fbf8118453ad089691adaba2)