• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2015-2018 Khronos Group. This work is licensed under a
2// Creative Commons Attribution 4.0 International License; see
3// http://creativecommons.org/licenses/by/4.0/
4
5[appendix]
6= Compressed Image Formats
7
8The compressed texture formats used by Vulkan are described in the
9specifically identified sections of the <<data-format,Khronos Data Format
10Specification>>, version 1.1.
11
12Unless otherwise described, the quantities encoded in these compressed
13formats are treated as normalized, unsigned values.
14
15Those formats listed as sRGB-encoded have in-memory representations of
16[eq]#R#, [eq]#G# and [eq]#B# components which are nonlinearly-encoded as
17[eq]#R'#, [eq]#G'#, and [eq]#B'#; any alpha component is unchanged.
18As part of filtering, the nonlinear [eq]#R'#, [eq]#G'#, and [eq]#B'# values
19are converted to linear [eq]#R#, [eq]#G#, and [eq]#B# components; any alpha
20component is unchanged.
21The conversion between linear and nonlinear encoding is performed as
22described in the "`KHR_DF_TRANSFER_SRGB`" section of the Khronos Data Format
23Specification.
24
25<<<
26
27[[appendix-compressedtex-bc]]
28== Block-Compressed Image Formats
29
30.Mapping of Vulkan BC formats to descriptions
31[width="90%",options="header",cols="5,4"]
32|====
33| elink:VkFormat | <<data-format,Khronos Data Format Specification>> description
342+^| Formats described in the "`S3TC Compressed Texture Image Formats`" chapter
35| ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK |BC1 with no alpha
36| ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK  |BC1 with no alpha, sRGB-encoded
37| ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK|BC1 with alpha
38| ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK |BC1 with alpha, sRGB-encoded
39| ename:VK_FORMAT_BC2_UNORM_BLOCK     |BC2
40| ename:VK_FORMAT_BC2_SRGB_BLOCK      |BC2, sRGB-encoded
41| ename:VK_FORMAT_BC3_UNORM_BLOCK     |BC3
42| ename:VK_FORMAT_BC3_SRGB_BLOCK      |BC3, sRGB-encoded
432+^| Formats described in the "`RGTC Compressed Texture Image Formats`" chapter
44| ename:VK_FORMAT_BC4_UNORM_BLOCK     |BC4 unsigned
45| ename:VK_FORMAT_BC4_SNORM_BLOCK     |BC4 signed
46| ename:VK_FORMAT_BC5_UNORM_BLOCK     |BC5 unsigned
47| ename:VK_FORMAT_BC5_SNORM_BLOCK     |BC5 signed
482+^| Formats described in the "`BPTC Compressed Texture Image Formats`" chapter
49| ename:VK_FORMAT_BC6H_UFLOAT_BLOCK   |BC6H (unsigned version)
50| ename:VK_FORMAT_BC6H_SFLOAT_BLOCK   |BC6H (signed version)
51| ename:VK_FORMAT_BC7_UNORM_BLOCK     |BC7
52| ename:VK_FORMAT_BC7_SRGB_BLOCK      |BC7, sRGB-encoded
53|====
54
55<<<
56
57[[appendix-compressedtex-etc2]]
58== ETC Compressed Image Formats
59
60The following formats are described in the "`ETC2 Compressed Texture Image
61Formats`" chapter of the <<data-format,Khronos Data Format Specification>>.
62
63.Mapping of Vulkan ETC formats to descriptions
64[options="header",cols="1,1"]
65|====
66| elink:VkFormat | <<data-format,Khronos Data Format Specification>> description
67| ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK     |RGB ETC2
68| ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK      |RGB ETC2 with sRGB encoding
69| ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK   |RGB ETC2 with punch-through alpha
70| ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK    |RGB ETC2 with punch-through alpha and sRGB
71| ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK   |RGBA ETC2
72| ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK    |RGBA ETC2 with sRGB encoding
73| ename:VK_FORMAT_EAC_R11_UNORM_BLOCK         |Unsigned R11 EAC
74| ename:VK_FORMAT_EAC_R11_SNORM_BLOCK         |Signed R11 EAC
75| ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK      |Unsigned RG11 EAC
76| ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK      |Signed RG11 EAC
77|====
78
79<<<
80
81[[appendix-compressedtex-astc]]
82== ASTC Compressed Image Formats
83
84ASTC formats are described in the "`ASTC Compressed Texture Image Formats`"
85chapter of the <<data-format,Khronos Data Format Specification>>.
86
87.Mapping of Vulkan ASTC formats to descriptions
88[width="75%",options="header",cols="63%,15%,22%"]
89|====
90| elink:VkFormat ^| Compressed texel block dimensions ^| sRGB-encoded
91| ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK    ^|[eq]#4 {times} 4# ^|No
92| ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK     ^|[eq]#4 {times} 4# ^|Yes
93| ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK    ^|[eq]#5 {times} 4# ^|No
94| ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK     ^|[eq]#5 {times} 4# ^|Yes
95| ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK    ^|[eq]#5 {times} 5# ^|No
96| ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK     ^|[eq]#5 {times} 5# ^|Yes
97| ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK    ^|[eq]#6 {times} 5# ^|No
98| ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK     ^|[eq]#6 {times} 5# ^|Yes
99| ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK    ^|[eq]#6 {times} 6# ^|No
100| ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK     ^|[eq]#6 {times} 6# ^|Yes
101| ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK    ^|[eq]#8 {times} 5# ^|No
102| ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK     ^|[eq]#8 {times} 5# ^|Yes
103| ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK    ^|[eq]#8 {times} 6# ^|No
104| ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK     ^|[eq]#8 {times} 6# ^|Yes
105| ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK    ^|[eq]#8 {times} 8# ^|No
106| ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK     ^|[eq]#8 {times} 8# ^|Yes
107| ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK   ^|[eq]#10 {times} 5# ^|No
108| ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK    ^|[eq]#10 {times} 5# ^|Yes
109| ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK   ^|[eq]#10 {times} 6# ^|No
110| ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK    ^|[eq]#10 {times} 6# ^|Yes
111| ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK   ^|[eq]#10 {times} 8# ^|No
112| ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK    ^|[eq]#10 {times} 8# ^|Yes
113| ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK  ^|[eq]#10 {times} 10# ^|No
114| ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK   ^|[eq]#10 {times} 10# ^|Yes
115| ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK  ^|[eq]#12 {times} 10# ^|No
116| ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK   ^|[eq]#12 {times} 10# ^|Yes
117| ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK  ^|[eq]#12 {times} 12# ^|No
118| ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK   ^|[eq]#12 {times} 12# ^|Yes
119|====
120