From fde4ef5bb326eada64d4a1b1d55e5d7d9e33a970 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 7 Nov 2026 08:26:12 -0800 Subject: [PATCH] Ledger: RADV's sRGB decode beyond the read-write tier, four rule-1 rows naming srgb-texel-decode The whole RADV replay (AMD Radeon RX 7900 XTX, RADV NAVI31, Mesa 26.2.6; potluck job m3-max-4016 at 7470a49e6d) read four lines not in known-gaps.tsv at the 8-bit sRGB `beyond` sites of read-write-tier-round-trip-float (768 elements, largest 67649) and read-write-tier-held (192 elements, largest 64922), for BGRA8 and RGBA8 alike. They are the device's native sRGB decode, the same answer the case's llvmpipe and NVIDIA rows hold at the same sites: - both cases announce srgb-texel-decode on RADV; - the U32 difference is between f32 bit patterns, not codes: the round trip's first element is Metal 0x3C840841 (66 / 4095) against our 0x3C830000; the held read's are Metal 0x3D080881 (136 / 4095) against our 0x3D0798DA, the transfer of code 51, and 0x3BB80B81 (23 / 4095) against 0x3BB7AD6B, the transfer of code 17; - RADV stores no sRGB format (its optimal tiling of B8G8R8A8_SRGB and R8G8B8A8_SRGB lists no STORAGE_IMAGE, read with vulkaninfo, job m3-max-4052), so the held texture is read through its UNORM alias and decoded through the device's Pow, as on the other two venues. The rows are scoped to RADV: the decode is the driver's compiler's, not one Mesa build's. CONFORMANCE-COVERAGE.md re-derived (2600 rows). (cherry picked from commit 6efa9157436862f6e6d990f298f53fd84ab11b06) --- crates/metal2vulkan-conformance/known-gaps.tsv | 4 ++++ docs/CONFORMANCE-COVERAGE.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-conformance/known-gaps.tsv b/crates/metal2vulkan-conformance/known-gaps.tsv index 33a666151..466481035 100644 --- a/crates/metal2vulkan-conformance/known-gaps.tsv +++ b/crates/metal2vulkan-conformance/known-gaps.tsv @@ -2724,3 +2724,7 @@ ycbcr-minify-band-x NVIDIA GeForce RTX 5080 Laptop GPU divergent case/samples th ycbcr-minify-band-x NVIDIA GeForce RTX 5080 Laptop GPU divergent case/samples/ends the digest is 4357ed31b7cedf0354f0a19f06dfd475707aab6943932bbea506a947fa25531c on Metal and 4d5be3b95fbe739ae1e9deea0331883d7ed70e95e5340b5f09be1bae842669f9 here The site is the first and last 256 samples of the band: a 4K `x420` (`YCBCR10_420_2P`) surface minified along x through a linear sampler, at the 2,048 places along the axis where a footprint's rounding decides which side of a 1/256 step a sample reads. Metal reads the planes in place and its filter puts the switches where the recording holds them. The RTX 5080 Laptop's memory is not the host's, so the slot binds the texture's image of converted texels; the device does not convert this 10-bit format (`RuntimeDriverDefect::TenBitCodesReadAsWords`, which `ycbcr_device.rs` names for NVIDIA), so the texels hold Metal's fixed-point conversion, and each sample is the device's own linear filter of them, off the grid Metal sums the format's steps on, so the switches fall elsewhere. The filter is the device's native answer, announced for this case as `device-sampling`, a suite native note that loosens no value (`replay::NATIVE_NOTES`), and no other form is built. The site compares by its digest, so how many samples moved and by how much is not separated here. On lavapipe and MoltenVK the band matches Metal exactly. Measured on the RTX 5080 Laptop (615.71.09), 2026-11-07. ycbcr-minify-band-y NVIDIA GeForce RTX 5080 Laptop GPU divergent case/samples the digest is 536bb62bdfb366a18744a10f34682339739b789ee08d08d2d6d601731baf7533 on Metal and 864d994376c7d20513fcff2e874ec4fb11b394bf6225aa938d1342d7359d26be here The site is the whole band's 34,816 samples, held by their digest alone: a 4K `x420` (`YCBCR10_420_2P`) surface minified along y through a linear sampler, at the 2,048 places along the axis where a footprint's rounding decides which side of a 1/256 step a sample reads. Metal reads the planes in place and its filter puts the switches where the recording holds them. The RTX 5080 Laptop's memory is not the host's, so the slot binds the texture's image of converted texels; the device does not convert this 10-bit format (`RuntimeDriverDefect::TenBitCodesReadAsWords`, which `ycbcr_device.rs` names for NVIDIA), so the texels hold Metal's fixed-point conversion, and each sample is the device's own linear filter of them, off the grid Metal sums the format's steps on, so the switches fall elsewhere. The filter is the device's native answer, announced for this case as `device-sampling`, a suite native note that loosens no value (`replay::NATIVE_NOTES`), and no other form is built. The site compares by its digest, so how many samples moved and by how much is not separated here. On lavapipe and MoltenVK the band matches Metal exactly. Measured on the RTX 5080 Laptop (615.71.09), 2026-11-07. ycbcr-minify-band-y NVIDIA GeForce RTX 5080 Laptop GPU divergent case/samples/ends the digest is 74811b9b801f4e14f0642cb23504778fc1e4fd8d899d6bd2aad19483bc8b034a on Metal and da99137e58410181f232afb9bec32198a2d799dd7a013b7cc84e0721e92f420c here The site is the first and last 256 samples of the band: a 4K `x420` (`YCBCR10_420_2P`) surface minified along y through a linear sampler, at the 2,048 places along the axis where a footprint's rounding decides which side of a 1/256 step a sample reads. Metal reads the planes in place and its filter puts the switches where the recording holds them. The RTX 5080 Laptop's memory is not the host's, so the slot binds the texture's image of converted texels; the device does not convert this 10-bit format (`RuntimeDriverDefect::TenBitCodesReadAsWords`, which `ycbcr_device.rs` names for NVIDIA), so the texels hold Metal's fixed-point conversion, and each sample is the device's own linear filter of them, off the grid Metal sums the format's steps on, so the switches fall elsewhere. The filter is the device's native answer, announced for this case as `device-sampling`, a suite native note that loosens no value (`replay::NATIVE_NOTES`), and no other form is built. The site compares by its digest, so how many samples moved and by how much is not separated here. On lavapipe and MoltenVK the band matches Metal exactly. Measured on the RTX 5080 Laptop (615.71.09), 2026-11-07. +read-write-tier-round-trip-float RADV divergent case/MTLPixelFormatBGRA8Unorm_sRGB/beyond/texels 768 elements differ (U32), the largest difference 67649 A read of the round-tripped 8-bit sRGB texels through the texture's sRGB view: the device decodes each 8-bit code by its own sRGB transfer function, where Metal decodes it through its twelve-bit table (`k / 4095` for the code's step `k`): the first differing element is Metal 0x3C840841 (66 / 4095) against our 0x3C830000, a value whose low sixteen bits are zero, and the site's largest difference is 67649 between the two words' bits. Under the native-arithmetic contract the device's decode is the answer: `srgb-texel-decode`, announced for this case here, records it under the bound format and states no bound, and validation derives no tolerance from it; the case's rows on llvmpipe and NVIDIA are the same answer at the same sites. Open: nothing. +read-write-tier-round-trip-float RADV divergent case/MTLPixelFormatRGBA8Unorm_sRGB/beyond/texels 768 elements differ (U32), the largest difference 67649 A read of the round-tripped 8-bit sRGB texels through the texture's sRGB view: the device decodes each 8-bit code by its own sRGB transfer function, where Metal decodes it through its twelve-bit table (`k / 4095` for the code's step `k`): the first differing element is Metal 0x3C840841 (66 / 4095) against our 0x3C830000, a value whose low sixteen bits are zero, and the site's largest difference is 67649 between the two words' bits. Under the native-arithmetic contract the device's decode is the answer: `srgb-texel-decode`, announced for this case here, records it under the bound format and states no bound, and validation derives no tolerance from it; the case's rows on llvmpipe and NVIDIA are the same answer at the same sites. Open: nothing. +read-write-tier-held RADV divergent case/MTLPixelFormatBGRA8Unorm_sRGB/beyond/texels 192 elements differ (U32), the largest difference 64922 A read of an 8-bit sRGB texel of a texture held in an argument buffer: the device stores no sRGB format (RADV's optimal tiling of `B8G8R8A8_SRGB` and `R8G8B8A8_SRGB` lists no `STORAGE_IMAGE` (Mesa 26.2.6, read with vulkaninfo on 2026-11-07)), so the heap views the texture through its UNORM alias (`B8G8R8A8_UNORM`) and the function decodes each code by the MSL transfer through the device's `Pow`, as a storage slot's alias does, where Metal decodes it through its twelve-bit table (`k / 4095` for the code's step `k`): the first differing element is Metal 0x3D080881 (136 / 4095) against our 0x3D0798DA, the transfer of code 51. Under the native-arithmetic contract the device's decode is the answer: `srgb-texel-decode`, announced for this case here, records it and states no bound, and validation derives no tolerance from it; the case's rows on llvmpipe and NVIDIA are the same answer at the same sites. Open: nothing. +read-write-tier-held RADV divergent case/MTLPixelFormatRGBA8Unorm_sRGB/beyond/texels 192 elements differ (U32), the largest difference 64922 A read of an 8-bit sRGB texel of a texture held in an argument buffer: the device stores no sRGB format (RADV's optimal tiling of `B8G8R8A8_SRGB` and `R8G8B8A8_SRGB` lists no `STORAGE_IMAGE` (Mesa 26.2.6, read with vulkaninfo on 2026-11-07)), so the heap views the texture through its UNORM alias (`R8G8B8A8_UNORM`) and the function decodes each code by the MSL transfer through the device's `Pow`, as a storage slot's alias does, where Metal decodes it through its twelve-bit table (`k / 4095` for the code's step `k`): the first differing element is Metal 0x3BB80B81 (23 / 4095) against our 0x3BB7AD6B, the transfer of code 17. Under the native-arithmetic contract the device's decode is the answer: `srgb-texel-decode`, announced for this case here, records it and states no bound, and validation derives no tolerance from it; the case's rows on llvmpipe and NVIDIA are the same answer at the same sites. Open: nothing. diff --git a/docs/CONFORMANCE-COVERAGE.md b/docs/CONFORMANCE-COVERAGE.md index ad3e9342f..f8ad142fd 100644 --- a/docs/CONFORMANCE-COVERAGE.md +++ b/docs/CONFORMANCE-COVERAGE.md @@ -44,7 +44,7 @@ Its limits, measured rather than asserted: | committed recordings | 1229 | | distinct SDK items the Metal leg reaches, of any status | 820 | | of those, reached only where this cannot name the family | 3 | -| ledger rows (a case whose gap is recorded) | 2616 | +| ledger rows (a case whose gap is recorded) | 2620 | | declared crossings of the option space (pairs put to Metal at once) | 26 | | declared crossings that are no pair of it (a boolean or numeric field, or one type in two slots) | 30 | @@ -4850,4 +4850,8 @@ A case whose difference from Metal is recorded rather than compared away. The le | `ycbcr-minify-band-x` | The site is the first and last 256 samples of the band: a 4K `x420` (`YCBCR10_420_2P`) surface minified along x through a linear sampler, at the 2,048 places al… | | `ycbcr-minify-band-y` | The site is the whole band's 34,816 samples, held by their digest alone: a 4K `x420` (`YCBCR10_420_2P`) surface minified along y through a linear sampler, at th… | | `ycbcr-minify-band-y` | The site is the first and last 256 samples of the band: a 4K `x420` (`YCBCR10_420_2P`) surface minified along y through a linear sampler, at the 2,048 places al… | +| `read-write-tier-round-trip-float` | A read of the round-tripped 8-bit sRGB texels through the texture's sRGB view: the device decodes each 8-bit code by its own sRGB transfer function, where Metal… | +| `read-write-tier-round-trip-float` | A read of the round-tripped 8-bit sRGB texels through the texture's sRGB view: the device decodes each 8-bit code by its own sRGB transfer function, where Metal… | +| `read-write-tier-held` | A read of an 8-bit sRGB texel of a texture held in an argument buffer: the device stores no sRGB format (RADV's optimal tiling of `B8G8R8A8_SRGB` and `R8G8B8A8_… | +| `read-write-tier-held` | A read of an 8-bit sRGB texel of a texture held in an argument buffer: the device stores no sRGB format (RADV's optimal tiling of `B8G8R8A8_SRGB` and `R8G8B8A8_… |