From b07b697aac622e27182e3047d94da4cbbb172144 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 3 Dec 2026 00:12:44 -0800 Subject: [PATCH] Docs: the M3's and the 5300M's supportsTextureSampleCount: answers cite their jobs The translator's TEXTURE_SAMPLE_COUNTS comment and the conformance sample-position family's module doc stated the Apple M3 Max's answer for 8 samples with no measurement behind it. Job 82550 asked an Apple M3 Max under macOS 27.0.1: yes for 1, 2 and 4, no for 3, 5, 8, 16 and 32. Job 82204 asked an AMD Radeon Pro 5300M under macOS 26.7.1: yes for 1, 2, 4 and 8, no for 16. Both comments now cite them. Comments only; the recorded EIGHT_NEVER_RE_RECORD text, which the 8x recordings carry, is unchanged. Verified: both jobs' SAMPLES and P8 lines read from their logs; cargo fmt --all leaves the tree unchanged. --- .../src/cases/sample_positions.rs | 18 +++++++++--------- crates/metal2vulkan/src/device/metal.rs | 9 +++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/crates/metal2vulkan-conformance/src/cases/sample_positions.rs b/crates/metal2vulkan-conformance/src/cases/sample_positions.rs index 9714de7bf..c8b5b3e10 100644 --- a/crates/metal2vulkan-conformance/src/cases/sample_positions.rs +++ b/crates/metal2vulkan-conformance/src/cases/sample_positions.rs @@ -49,15 +49,15 @@ //! fatal shapes from the input's own shape, so a case cannot build one by accident. //! //! **Carried from a discrete Mac** — the `EIGHT` table, the family's pass at 8 samples. The oracle -//! renders no 8 samples (an Apple M3 Max answers `supportsTextureSampleCount:` no for 8), and a Mac -//! with an AMD GPU does: an AMD Radeon Pro 5300M under macOS 26.7.1 ran the family's pass at 8 -//! samples, plain and under Metal's API validation layer, which passed it (job 82284, the probe -//! `sample_positions_8.m` of the usage-edges probes). Each row carries the resolved texel the probe -//! read, so the bytes compare as a recorded row's do. Every row's coverage avoids a resolve that -//! halves a code: where the 5300M's average lies halfway between two codes it rounds to the even -//! one (4 of 8 samples: red 0, alpha 128), the M3 Max rounds a half up (2 of 4: red 1), and that -//! rounding is the device's own (`PrecisionNote::DeviceRoundedResolve`), so a row there would -//! compare two devices' rounding rather than where the samples are. +//! renders no 8 samples (an Apple M3 Max under macOS 27.0.1 answers `supportsTextureSampleCount:` +//! no for 8, job 82550), and a Mac with an AMD GPU does: an AMD Radeon Pro 5300M under macOS 26.7.1 +//! ran the family's pass at 8 samples, plain and under Metal's API validation layer, which passed +//! it (job 82284, the probe `sample_positions_8.m` of the usage-edges probes). Each row carries the +//! resolved texel the probe read, so the bytes compare as a recorded row's do. Every row's coverage +//! avoids a resolve that halves a code: where the 5300M's average lies halfway between two codes it +//! rounds to the even one (4 of 8 samples: red 0, alpha 128), the M3 Max rounds a half up (2 of 4: +//! red 1), and that rounding is the device's own (`PrecisionNote::DeviceRoundedResolve`), so a row +//! there would compare two devices' rounding rather than where the samples are. use crate::allowance::{Allowance, Justification, Loosening}; use crate::case::{answered, Abort, Case, Failure, Input, MetalSource, Side}; diff --git a/crates/metal2vulkan/src/device/metal.rs b/crates/metal2vulkan/src/device/metal.rs index 31325560d..be1b57093 100644 --- a/crates/metal2vulkan/src/device/metal.rs +++ b/crates/metal2vulkan/src/device/metal.rs @@ -77,10 +77,11 @@ pub(crate) mod apple_gpu { /// The sample counts `supportsTextureSampleCount:` may answer yes for, where the device renders /// them into a color, a depth and a stencil attachment: 1, 2, 4 and 8. A Mac's AMD GPU answers yes -/// for each (an AMD Radeon Pro 5300M under macOS 26.7.1: yes for 1, 2, 4 and 8, no for 16), as -/// Apple10 does ("Maximum sample count in render passes with MSAA" is 8 from Apple10), where the -/// Apple9 GPUs the runtime otherwise answers as take 1, 2 and 4 alone (an Apple M3 Max under macOS -/// 27.0.1 answers no for 8). Neither Mac answers yes for 16. +/// for each (an AMD Radeon Pro 5300M under macOS 26.7.1: yes for 1, 2, 4 and 8, no for 16; job +/// 82204), as Apple10 does ("Maximum sample count in render passes with MSAA" is 8 from Apple10), +/// where the Apple9 GPUs the runtime otherwise answers as take 1, 2 and 4 alone (an Apple M3 Max +/// under macOS 27.0.1: yes for 1, 2 and 4, no for 3, 5, 8, 16 and 32; job 82550). Neither Mac +/// answers yes for 16. pub(crate) const TEXTURE_SAMPLE_COUNTS: vk::SampleCountFlags = vk::SampleCountFlags::COUNT_1 .union(vk::SampleCountFlags::COUNT_2) .union(vk::SampleCountFlags::COUNT_4)