An ARGB8Unorm attachment is an R8G8B8A8_UNORM image holding Metal's alpha,
red, green and blue in its red, green, blue and alpha. A blend whose factors
read Metal's destination alpha in a colour factor (or the saturated source
alpha, the blend colour's red, green or blue, or different colour and alpha
operations) has no Vulkan factor on that image, and the pipeline was refused
NotImplemented(Format) on every device, where plain Metal makes and runs it.
Metal blends the format as RGBA8Unorm with its channels rotated (recorded by
argb8-targets-destination-alpha). So the fragment function now computes
Metal's 8-bit unorm blend (extended_range::Blend::unorm8, the model the storage
form already uses for RGBA8Unorm) over the texel rotated into Metal's order:
- where the device orders fetch through the pixel interlock alone (MoltenVK,
RADV, ANV, NVIDIA), in the interlocked storage form: StorageView::rotated
rotates each texel read and written, the storage form now takes the
RotatedView emulation, and unorm8_format includes ARGB8Unorm;
- where it orders fetch through rasterization-order input attachments
(lavapipe, SwiftShader), over the input attachment: a new
RotatedInputBlend plan and RuntimeFact::RotatedInputBlend, the blended
value written through the rotated output, link giving no Vulkan blend;
- on a device with neither ordering, the pipeline is refused
FramebufferFetch needing either one (fetch::unordered_extended_fetch).
The routing predicate is color_writes::shader_rotated_blend (rotated_blend
refuses the blend NotImplemented(Format), and no factor reads the second
source). Second-source factors stay refused. The device's conversion of the
result is noted (DeviceColorConversion); a module stating no math is noted as
other unorm8 storage blends are.
SEMANTICS_VERSION 1985 and ARTIFACT_FORMAT_VERSION 491 are provisional (a new
RuntimeFact variant changes the encoding): renumber at landing if taken.
Verified: none yet; build, tests and the conformance case follow.
(cherry picked from commit 413c7377771fc524b7d974747b25062260ea5646)