The runtime had no answer for supports32BitMSAA (METAL-COVERAGE listed it
missing), so the consumer passed None through. Metal's answer promises a
multisample texture of each 32-bit integer format and the resolve of
each 32-bit float one; the M3 Max, a Radeon Pro 5300M and a UHD 630 all
answer 1.
What the runtime did before was read first: a multisample texture of each
of the nine formats is planned as any texture is (image_plan), within the
device's limits for the image (vkGetPhysicalDeviceImageFormatProperties2),
and refused as a count its format lacks; draws and texture2d_ms reads of
it, the float formats' AVERAGE resolves (Metal's own on MoltenVK,
device-rounded-resolve elsewhere) and the refusal of an integer resolve
(ResolveFormat, as Metal stops it) were all in place. The render
pipeline, sample planes and interleave all take a format's own counts
beside framebufferIntegerColorSampleCounts. Nothing was wrong; the
query was missing.
Device::supports_32bit_msaa answers yes where the device makes every
texture and resolve the answer promises, each probed exactly as
pixel_format_capabilities probes a capability (the probe closure of
families::formats::answers is now a function both share): the texture
sample counts hold 4, a 2D multisample RenderTarget|ShaderRead texture of
each of the nine formats is made at every count above 1 the textures take,
and each float format resolves (its Resolve capability). A device method,
as supports_family is, because it reads the device's per-format limits:
Vulkan floors an integer format at framebufferIntegerColorSampleCounts,
one sample on RADV and lavapipe, while their 32-bit integer formats each
take 1 to 8 (1, 4, 8 on lavapipe), as the venue profiles' captured
per-format counts state.
Tests:
- runtime tests::msaa_32bit: every committed profile pinned, with the
limits it states (a venue profile's own per-format color attachment
counts, else Vulkan's floors). Yes on every venue (moltenvk-m3, both
780M RADV, both gate lavapipe, the ANV and NVIDIA ones) and on the
Intel and NVIDIA profiles whose floors cover the counts; no on
amd-rdna2/rdna3-radv, lavapipe, lunarg-desktop-baseline-2023,
swiftshader and vk12-floor (R32Uint at the lowest count, naming
FramebufferIntegerColorSampleCount), and roadmap-2022 (no 4 samples).
A yes agrees with each format's Msaa and float Resolve capabilities;
the rule needs 4 and every count, and a missing resolve texture says
so. A negative control that probes 4 samples alone fails two of them.
- validation runtime_lane::msaa_32bit (--cfg m2v_gpu): the answer is what
the device makes; R32Uint and RGBA32Uint targets at 2 and 4 drawn at
sample rate hold every bit, read back through texture2d_ms<uint>
(Metal: every channel as written); an RG32Float 4-sample target keeps
its samples and resolves to the probe's Metal texels, exact where the
driver's average is Metal's; an RGBA32Uint resolve is refused.
Verified: runtime tests msaa_32bit, families and capabilities, the
metal_coverage and runtime-sources pin tests; on the M3 Max (MoltenVK
1.4.2, macOS 27.0.1) through the Mac GPU lock, runtime_lane msaa_32bit,
families and capabilities 7/7: supports32BitMSAA true, counts [2, 4],
nothing refused, 0 integer channels differ, 32 of 32 resolved channels
as Metal's, device-rounded-resolve not announced. clippy with all
features and with --cfg m2v_gpu, rustdoc -D warnings, refusal_surface
--check (no refusal moved), api-signatures (one method added),
METAL-COVERAGE and CONFORMANCE-COVERAGE regenerated (the item now
implemented, not yet exercised by the suite).
RUNTIME_VERSION 1718 (a new answer); runtime sources re-pinned.
(cherry picked from commit 2376157b3bf7bf99221579f42a795ef351b8144c)