Files
metal2vulkan/docs
Anees Iqbal b6a57f7958 Translator: LoweringInputs::srgb_storage writes an 8-bit sRGB texture through its UNORM twin
What: a new LoweringInputs field, srgb_storage, names texture slots whose texture is an 8-bit sRGB
texture held for storage through its UNORM twin's view. Such a slot, where storage_images names
no choice for it and its image class is float, declares its storage image without a format, of
class SrgbEncode: a write encodes red, green and blue by the MSL transfer (8.7.7) through the
device's conversion and keeps alpha linear, recording PrecisionNote::DevicePackConversion, and a
read decodes. A device that cannot write or read storage without a format refuses it as
Feature::Format. Under the identity domains the slot's element is the storage array's element of
its declaration's class, as an Unknown-format storage slot of class SrgbEncode now is.

Why: a guest dispatch writes a write-only BGRA8Unorm_sRGB storage texture hundreds of times a
session, and no device the runtime runs on stores an sRGB format; the runtime refused it
(Gap::StorageElement). The runtime's kernels compile from LoweringInputs, not VariantKey, so the
resident-table domain's srgb_textures and storage_images (another meaning) are not reused.

The compile key appends srgb_storage only when it is non-empty, so no existing key moves and no
version is bumped; with the field empty nothing a translation emits changes.

Verified: not yet built; the lane's quick check and suites run next. api_signatures.tsv is
blessed (one record) and docs/REFUSALS.md regenerated (one Feature::Format site more).
2026-11-25 18:08:49 -08:00
..