KhronosGroup / KhronosGroup/Vulkan-Docs
sRGB texture formats are defined as having an sRGB-encoded alpha channel in vk.xml
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
In the formats section of vk.xml, sRGB formats are listed as having sRGB encoded alpha channels.
However, for **VK_FORMAT_R8G8B8A8_SRGB** the spec states the following:
> VK_FORMAT_R8G8B8A8_SRGB specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and **an 8-bit A component in byte 3.**
As such, sRGB formats with alpha channels should have their alpha channels listed as having a numericFormat of "UNORM", not "SRGB".
Example:
```XML
```
I've found that all the sRGB formats with alpha channels have this issue:
- VK_FORMAT_R8G8B8A8_SRGB
- VK_FORMAT_B8G8R8A8_SRGB
- VK_FORMAT_A8B8G8R8_SRGB_PACK32
- VK_FORMAT_BC1_RGBA_SRGB_BLOCK
- VK_FORMAT_BC2_SRGB_BLOCK
- VK_FORMAT_BC3_SRGB_BLOCK
- VK_FORMAT_BC7_SRGB_BLOCK
- VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK
- VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK
- All ASTC formats with sRGB encoding:
- VK_FORMAT_ASTC_4x4_SRGB_BLOCK
- VK_FORMAT_ASTC_5x4_SRGB_BLOCK
- VK_FORMAT_ASTC_5x5_SRGB_BLOCK
- VK_FORMAT_ASTC_6x5_SRGB_BLOCK
- VK_FORMAT_ASTC_6x6_SRGB_BLOCK
- VK_FORMAT_ASTC_8x5_SRGB_BLOCK
- VK_FORMAT_ASTC_8x6_SRGB_BLOCK
- VK_FORMAT_ASTC_8x8_SRGB_BLOCK
- VK_FORMAT_ASTC_10x5_SRGB_BLOCK
- VK_FORMAT_ASTC_10x6_SRGB_BLOCK
- VK_FORMAT_ASTC_10x8_SRGB_BLOCK
- VK_FORMAT_ASTC_10x10_SRGB_BLOCK
- VK_FORMAT_ASTC_12x10_SRGB_BLOCK
- VK_FORMAT_ASTC_12x12_SRGB_BLOCK
- VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG
- VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG
- VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG
- VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG
Contributor guide
Assessment
This issue has not been assessed yet.