Appendix C: Compressed Image Formats
The compressed texture formats used by Vulkan are described in the specifically identified sections of the Khronos Data Format Specification, version 1.3.
Unless otherwise described, the quantities encoded in these compressed formats are treated as normalized, unsigned values.
Those formats listed as sRGB-encoded have in-memory representations of R, G and B components which are nonlinearly-encoded as R', G', and B'; any alpha component is unchanged. As part of filtering, the nonlinear R', G', and B' values are converted to linear R, G, and B components; any alpha component is unchanged. The conversion between linear and nonlinear encoding is performed as described in the “KHR_DF_TRANSFER_SRGB” section of the Khronos Data Format Specification.
Block-Compressed Image Formats
BC1, BC2 and BC3 formats are described in “S3TC Compressed Texture Image Formats” chapter of the Khronos Data Format Specification. BC4 and BC5 are described in the “RGTC Compressed Texture Image Formats” chapter. BC6H and BC7 are described in the “BPTC Compressed Texture Image Formats” chapter.
VkFormat | Khronos Data Format Specification description |
---|---|
Formats described in the “S3TC Compressed Texture Image Formats” chapter |
|
|
BC1 with no alpha |
|
BC1 with no alpha, sRGB-encoded |
|
BC1 with alpha |
|
BC1 with alpha, sRGB-encoded |
|
BC2 |
|
BC2, sRGB-encoded |
|
BC3 |
|
BC3, sRGB-encoded |
Formats described in the “RGTC Compressed Texture Image Formats” chapter |
|
|
BC4 unsigned |
|
BC4 signed |
|
BC5 unsigned |
|
BC5 signed |
Formats described in the “BPTC Compressed Texture Image Formats” chapter |
|
|
BC6H (unsigned version) |
|
BC6H (signed version) |
|
BC7 |
|
BC7, sRGB-encoded |
ETC Compressed Image Formats
The following formats are described in the “ETC2 Compressed Texture Image Formats” chapter of the Khronos Data Format Specification.
VkFormat | Khronos Data Format Specification description |
---|---|
|
RGB ETC2 |
|
RGB ETC2 with sRGB encoding |
|
RGB ETC2 with punch-through alpha |
|
RGB ETC2 with punch-through alpha and sRGB |
|
RGBA ETC2 |
|
RGBA ETC2 with sRGB encoding |
|
Unsigned R11 EAC |
|
Signed R11 EAC |
|
Unsigned RG11 EAC |
|
Signed RG11 EAC |
ASTC Compressed Image Formats
ASTC formats are described in the “ASTC Compressed Texture Image Formats” chapter of the Khronos Data Format Specification.
VkFormat | Compressed texel block dimensions | Requested mode |
---|---|---|
|
4 × 4 |
Linear LDR |
|
4 × 4 |
sRGB |
|
5 × 4 |
Linear LDR |
|
5 × 4 |
sRGB |
|
5 × 5 |
Linear LDR |
|
5 × 5 |
sRGB |
|
6 × 5 |
Linear LDR |
|
6 × 5 |
sRGB |
|
6 × 6 |
Linear LDR |
|
6 × 6 |
sRGB |
|
8 × 5 |
Linear LDR |
|
8 × 5 |
sRGB |
|
8 × 6 |
Linear LDR |
|
8 × 6 |
sRGB |
|
8 × 8 |
Linear LDR |
|
8 × 8 |
sRGB |
|
10 × 5 |
Linear LDR |
|
10 × 5 |
sRGB |
|
10 × 6 |
Linear LDR |
|
10 × 6 |
sRGB |
|
10 × 8 |
Linear LDR |
|
10 × 8 |
sRGB |
|
10 × 10 |
Linear LDR |
|
10 × 10 |
sRGB |
|
12 × 10 |
Linear LDR |
|
12 × 10 |
sRGB |
|
12 × 12 |
Linear LDR |
|
12 × 12 |
sRGB |
|
4 × 4 |
HDR |
|
5 × 4 |
HDR |
|
5 × 5 |
HDR |
|
6 × 5 |
HDR |
|
6 × 6 |
HDR |
|
8 × 5 |
HDR |
|
8 × 6 |
HDR |
|
8 × 8 |
HDR |
|
10 × 5 |
HDR |
|
10 × 6 |
HDR |
|
10 × 8 |
HDR |
|
10 × 10 |
HDR |
|
12 × 10 |
HDR |
|
12 × 12 |
HDR |
ASTC textures containing HDR block encodings should be passed to the API using an ASTC SFLOAT texture format.
Note
An HDR block in a texture passed using a LDR UNORM format will return the appropriate ASTC error color if the implementation supports only the ASTC LDR profile, but may result in either the error color or a decompressed HDR color if the implementation supports HDR decoding. |
ASTC decode mode
If the VK_EXT_astc_decode_mode
extension is enabled, the decode mode is
determined as follows:
VkFormat | Decoding mode |
---|---|
|
decode_float16 |
|
decode_unorm8 |
|
decode_rgb9e5 |
Otherwise, the ASTC decode mode is decode_float16.
Note that an implementation may use HDR mode when linear LDR mode is requested unless the decode mode is decode_unorm8.
PVRTC Compressed Image Formats
PVRTC formats are described in the “PVRTC Compressed Texture Image Formats” chapter of the Khronos Data Format Specification.
VkFormat | Compressed texel block dimensions | sRGB-encoded |
---|---|---|
|
8 × 4 |
No |
|
4 × 4 |
No |
|
8 × 4 |
No |
|
4 × 4 |
No |
|
8 × 4 |
Yes |
|
4 × 4 |
Yes |
|
8 × 4 |
Yes |
|
4 × 4 |
Yes |