Files
metal2vulkan/crates
Anees Iqbal 3cfd7f7aa0 Hold an 8-bit sRGB word's encode and decode to the device's announced conversions in color_writes and word_samples_msaa
On the RTX 5080 Laptop GPU (NVIDIA 615.71.09) the lane's color_writes stored 3,170 of 53,907
R8Unorm_sRGB channels a code from Metal's, and word_samples_msaa's sRGB reads differed from the
transfer by up to 1.88e-3 over 29 reads at 0b556ddfd6. The device renders neither R8_SRGB nor
R8G8_SRGB, so the runtime draws through the word's view (metal::format::WordAttachment::Srgb8):
the fragment encodes through its own Pow, recorded as PrecisionNote::DevicePackConversion, where
Metal encodes through its twelve-bit table; and the device decodes an sRGB sample its own way
(srgb-texel-decode; it rounds its decode of R8_SRGB to a 1/256 step). Both are announced; the lane
held them to Metal's bits. A test bug, not a translation gap.

What:
- color_writes: an 8-bit sRGB word's codes count as the device's conversion where the fragment
  stage records DevicePackConversion; they are printed against Metal's and not held.
- word_samples_msaa: an sRGB word's read is held within 1e-3 of the transfer where the device
  decodes through Metal's own texture unit (VkProperty::MetalSampler, MoltenVK on Apple's GPU) and
  within a code (1/255) elsewhere, where srgb-texel-decode is allowed among the notices.

Verified: in the lane proof runs on the 5080 and the M3 (counts in the series' last commit).
(cherry picked from commit dbc5461c6b96524f6c318a81c078c8f954c4c3c8)
2026-11-05 05:10:38 -08:00
..