ris-ktx2-api 0.1.0-dev.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1130 @@
1
+ //#region src/ris-ktx2/KtxUastcFlags.ts
2
+ /**
3
+ * UASTC encoding configuration flags.
4
+ *
5
+ * Packed bitfield matching libktx `ktx_pack_uastc_flag_bits_e`.
6
+ * Bits 0–3 hold the compression level ({@link KtxUastcFlags.LEVEL_MASK}).
7
+ * {@link KtxUastcFlags.FAVOR_UASTC_ERROR} is `8`, so it sits inside that mask:
8
+ * combining it with a level changes the value `LEVEL_MASK` extracts.
9
+ * Hints at bit 4 and above (`16`, `64`, `128`, `256`) combine with a level
10
+ * with bitwise OR and leave bits 0–3 unchanged.
11
+ */
12
+ var KtxUastcFlags = /* @__PURE__ */ function(KtxUastcFlags) {
13
+ /**
14
+ * Fastest compression (lowest quality, highest speed). About 43.45 dB.
15
+ */
16
+ KtxUastcFlags[KtxUastcFlags["LEVEL_FASTEST"] = 0] = "LEVEL_FASTEST";
17
+ /**
18
+ * Faster compression. About 46.49 dB.
19
+ */
20
+ KtxUastcFlags[KtxUastcFlags["LEVEL_FASTER"] = 1] = "LEVEL_FASTER";
21
+ /**
22
+ * Default compression level. About 47.47 dB.
23
+ */
24
+ KtxUastcFlags[KtxUastcFlags["LEVEL_DEFAULT"] = 2] = "LEVEL_DEFAULT";
25
+ /**
26
+ * Slower compression (higher quality). About 48.01 dB.
27
+ */
28
+ KtxUastcFlags[KtxUastcFlags["LEVEL_SLOWER"] = 3] = "LEVEL_SLOWER";
29
+ /**
30
+ * Very slow compression (highest quality). About 48.24 dB.
31
+ */
32
+ KtxUastcFlags[KtxUastcFlags["LEVEL_VERY_SLOW"] = 4] = "LEVEL_VERY_SLOW";
33
+ /**
34
+ * Mask for the compression level in bits 0–3.
35
+ */
36
+ KtxUastcFlags[KtxUastcFlags["LEVEL_MASK"] = 15] = "LEVEL_MASK";
37
+ /**
38
+ * Optimize encoding for the lowest UASTC reconstruction error.
39
+ */
40
+ KtxUastcFlags[KtxUastcFlags["FAVOR_UASTC_ERROR"] = 8] = "FAVOR_UASTC_ERROR";
41
+ /**
42
+ * Optimize encoding for the lowest BC7 decode error.
43
+ */
44
+ KtxUastcFlags[KtxUastcFlags["FAVOR_BC7_ERROR"] = 16] = "FAVOR_BC7_ERROR";
45
+ /**
46
+ * Hint to optimize for faster ETC1 transcoding.
47
+ */
48
+ KtxUastcFlags[KtxUastcFlags["ETC1_FASTER_HINTS"] = 64] = "ETC1_FASTER_HINTS";
49
+ /**
50
+ * Hint to optimize for the fastest ETC1 transcoding.
51
+ */
52
+ KtxUastcFlags[KtxUastcFlags["ETC1_FASTEST_HINTS"] = 128] = "ETC1_FASTEST_HINTS";
53
+ /**
54
+ * Disables flip-and-individual optimizations for ETC1 transcoding.
55
+ */
56
+ KtxUastcFlags[KtxUastcFlags["ETC1_DISABLE_FLIP_AND_INDIVIDUAL"] = 256] = "ETC1_DISABLE_FLIP_AND_INDIVIDUAL";
57
+ return KtxUastcFlags;
58
+ }({});
59
+ //#endregion
60
+ //#region src/ris-ktx2/KtxCreateStorage.ts
61
+ /**
62
+ * How image storage is allocated when a KTX2 texture is created.
63
+ *
64
+ * Values match libktx `ktxTextureCreateStorageEnum`:
65
+ * `KTX_TEXTURE_CREATE_NO_STORAGE` is `0` and
66
+ * `KTX_TEXTURE_CREATE_ALLOC_STORAGE` is `1`.
67
+ */
68
+ var KtxCreateStorage = /* @__PURE__ */ function(KtxCreateStorage) {
69
+ /** Do not allocate image storage. */
70
+ KtxCreateStorage[KtxCreateStorage["NO_STORAGE"] = 0] = "NO_STORAGE";
71
+ /** Allocate image storage for the texture. */
72
+ KtxCreateStorage[KtxCreateStorage["ALLOC_STORAGE"] = 1] = "ALLOC_STORAGE";
73
+ return KtxCreateStorage;
74
+ }({});
75
+ //#endregion
76
+ //#region src/ris-ktx2/KtxTranscodeFlags.ts
77
+ /**
78
+ * Flags that select options for Basis Universal transcoding.
79
+ *
80
+ * Numeric values match the libktx `ktx_transcode_flag_bits_e` enumerators.
81
+ * Combine them with bitwise OR when more than one option applies.
82
+ */
83
+ var KtxTranscodeFlags = /* @__PURE__ */ function(KtxTranscodeFlags) {
84
+ /** No special transcoding options. */
85
+ KtxTranscodeFlags[KtxTranscodeFlags["NONE"] = 0] = "NONE";
86
+ /**
87
+ * For PVRTC1, decode a non-power-of-two ETC1S level to the next larger
88
+ * power of two.
89
+ *
90
+ * libktx still documents this option as not implemented. It is ignored
91
+ * when the slice dimensions are already powers of two.
92
+ */
93
+ KtxTranscodeFlags[KtxTranscodeFlags["PVRTC_DECODE_TO_NEXT_POW2"] = 2] = "PVRTC_DECODE_TO_NEXT_POW2";
94
+ /**
95
+ * When transcoding to an opaque format, decode the alpha slice instead of
96
+ * the color slice if the Basis data has alpha. Has no effect when there
97
+ * is no alpha data.
98
+ */
99
+ KtxTranscodeFlags[KtxTranscodeFlags["TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS"] = 4] = "TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS";
100
+ /**
101
+ * Request a higher-quality transcode of UASTC to BC1, BC3, ETC2 EAC R11,
102
+ * or ETC2 EAC RG11. Unused by other UASTC transcode targets.
103
+ */
104
+ KtxTranscodeFlags[KtxTranscodeFlags["HIGH_QUALITY"] = 32] = "HIGH_QUALITY";
105
+ return KtxTranscodeFlags;
106
+ }({});
107
+ //#endregion
108
+ //#region src/ris-ktx2/KtxTranscodeFormat.ts
109
+ /**
110
+ * Target formats for transcoding a Basis Universal (ETC1S or UASTC) texture.
111
+ *
112
+ * Numeric values match the libktx `ktx_transcode_fmt_e` enumerators.
113
+ * Gaps in the numbering are formats libktx does not expose (there is no
114
+ * equivalent `VkFormat` for the omitted targets).
115
+ */
116
+ var KtxTranscodeFormat = /* @__PURE__ */ function(KtxTranscodeFormat) {
117
+ /**
118
+ * Opaque ETC1 RGB. Returns alpha data instead when
119
+ * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.
120
+ */
121
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_ETC1_RGB"] = 0] = "KTX_TTF_ETC1_RGB";
122
+ /**
123
+ * ETC2 RGBA. An EAC alpha block followed by an ETC1 block.
124
+ * Textures without alpha get an opaque alpha channel.
125
+ */
126
+ KtxTranscodeFormat[KtxTranscodeFormat["ETC2_RGBA"] = 1] = "ETC2_RGBA";
127
+ /**
128
+ * Opaque BC1 RGB. Returns alpha data instead when
129
+ * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.
130
+ */
131
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_BC1_RGB"] = 2] = "KTX_TTF_BC1_RGB";
132
+ /**
133
+ * BC3 compressed RGBA.
134
+ * Common on desktop devices. Widely supported block compression for color textures.
135
+ */
136
+ KtxTranscodeFormat[KtxTranscodeFormat["BC3_RGBA"] = 3] = "BC3_RGBA";
137
+ /**
138
+ * Single-channel BC4. The red channel is the opaque or alpha green component,
139
+ * depending on {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS}.
140
+ */
141
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_BC4_R"] = 4] = "KTX_TTF_BC4_R";
142
+ /**
143
+ * Two-channel BC5 (red and green). Intended for tangent-space normal maps.
144
+ * The texture should have an alpha channel; otherwise green is 255.
145
+ */
146
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_BC5_RG"] = 5] = "KTX_TTF_BC5_RG";
147
+ /**
148
+ * BC7 compressed RGBA.
149
+ * High quality block compression for color textures.
150
+ * Supports an alpha channel and is suitable for diffuse and physically based textures.
151
+ */
152
+ KtxTranscodeFormat[KtxTranscodeFormat["BC7_RGBA"] = 6] = "BC7_RGBA";
153
+ /**
154
+ * Opaque PVRTC1 4bpp RGB. Returns alpha data instead when
155
+ * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.
156
+ */
157
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_PVRTC1_4_RGB"] = 8] = "KTX_TTF_PVRTC1_4_RGB";
158
+ /**
159
+ * PVRTC1 4bpp RGBA. Useful for simple opacity maps.
160
+ * If the texture has no alpha channel, PVRTC1 4bpp RGB is used instead.
161
+ */
162
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_PVRTC1_4_RGBA"] = 9] = "KTX_TTF_PVRTC1_4_RGBA";
163
+ /**
164
+ * ASTC 4×4 RGBA.
165
+ * Common on mobile devices, especially Apple. High quality block compression
166
+ * for color textures, including an alpha channel.
167
+ */
168
+ KtxTranscodeFormat[KtxTranscodeFormat["ASTC_4X4_RGBA"] = 10] = "ASTC_4X4_RGBA";
169
+ /**
170
+ * Uncompressed 32bpp RGBA in raster order (R, G, B, A).
171
+ * Supported on all devices.
172
+ */
173
+ KtxTranscodeFormat[KtxTranscodeFormat["RGBA32"] = 13] = "RGBA32";
174
+ /** Uncompressed 16bpp RGB565 in raster order, with red in the high bits. */
175
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_RGB565"] = 14] = "KTX_TTF_RGB565";
176
+ /** Uncompressed 16bpp BGR565 in raster order, with red in the low bits. */
177
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_BGR565"] = 15] = "KTX_TTF_BGR565";
178
+ /** Uncompressed 16bpp RGBA4444 in raster order. */
179
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_RGBA4444"] = 16] = "KTX_TTF_RGBA4444";
180
+ /**
181
+ * Opaque PVRTC2 4bpp RGB. Supports arbitrary dimensions, unlike PVRTC1.
182
+ */
183
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_PVRTC2_4_RGB"] = 18] = "KTX_TTF_PVRTC2_4_RGB";
184
+ /** PVRTC2 4bpp RGBA. Premultiplied alpha is recommended. */
185
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_PVRTC2_4_RGBA"] = 19] = "KTX_TTF_PVRTC2_4_RGBA";
186
+ /**
187
+ * Unsigned ETC2 EAC R11. The red channel is the opaque or alpha green
188
+ * component, depending on
189
+ * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS}.
190
+ */
191
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_ETC2_EAC_R11"] = 20] = "KTX_TTF_ETC2_EAC_R11";
192
+ /**
193
+ * Unsigned ETC2 EAC RG11. Intended for tangent-space normal maps.
194
+ * The texture should have an alpha channel; otherwise green is 255.
195
+ */
196
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_ETC2_EAC_RG11"] = 21] = "KTX_TTF_ETC2_EAC_RG11";
197
+ /**
198
+ * Selects {@link KtxTranscodeFormat.KTX_TTF_ETC1_RGB} or
199
+ * {@link KtxTranscodeFormat.ETC2_RGBA} according to whether the texture has alpha.
200
+ */
201
+ KtxTranscodeFormat[KtxTranscodeFormat["KTX_TTF_ETC"] = 22] = "KTX_TTF_ETC";
202
+ /**
203
+ * Selects {@link KtxTranscodeFormat.KTX_TTF_BC1_RGB} or
204
+ * {@link KtxTranscodeFormat.BC3_RGBA} according to whether the texture has alpha.
205
+ */
206
+ KtxTranscodeFormat[KtxTranscodeFormat["BC1_OR_3"] = 23] = "BC1_OR_3";
207
+ /** No transcode format selected. */
208
+ KtxTranscodeFormat[KtxTranscodeFormat["NO_SELECTION"] = 2147483647] = "NO_SELECTION";
209
+ return KtxTranscodeFormat;
210
+ }({});
211
+ //#endregion
212
+ //#region src/ris-ktx2/VkFormat.ts
213
+ /**
214
+ * Vulkan `VkFormat` enumerators.
215
+ *
216
+ * Names and numeric values match the Vulkan API so they can be stored in
217
+ * KTX2 files and passed through to graphics APIs. Extension enumerators that
218
+ * share a value with a core enumerator are documented as aliases.
219
+ * See THIRD_PARTY_NOTICES.md.
220
+ */
221
+ var VkFormat = /* @__PURE__ */ function(VkFormat) {
222
+ /** No format is specified. */
223
+ VkFormat[VkFormat["UNDEFINED"] = 0] = "UNDEFINED";
224
+ /** 4-bit red and green, unsigned normalized, packed into an 8-bit word. */
225
+ VkFormat[VkFormat["R4G4_UNORM_PACK8"] = 1] = "R4G4_UNORM_PACK8";
226
+ /** 4-bit red, green, blue, and alpha, unsigned normalized, packed into a 16-bit word. */
227
+ VkFormat[VkFormat["R4G4B4A4_UNORM_PACK16"] = 2] = "R4G4B4A4_UNORM_PACK16";
228
+ /** 4-bit blue, green, red, and alpha, unsigned normalized, packed into a 16-bit word. */
229
+ VkFormat[VkFormat["B4G4R4A4_UNORM_PACK16"] = 3] = "B4G4R4A4_UNORM_PACK16";
230
+ /** 5-bit red, 6-bit green, and 5-bit blue, unsigned normalized, packed into a 16-bit word. */
231
+ VkFormat[VkFormat["R5G6B5_UNORM_PACK16"] = 4] = "R5G6B5_UNORM_PACK16";
232
+ /** 5-bit blue, 6-bit green, and 5-bit red, unsigned normalized, packed into a 16-bit word. */
233
+ VkFormat[VkFormat["B5G6R5_UNORM_PACK16"] = 5] = "B5G6R5_UNORM_PACK16";
234
+ /** 5-bit red, 5-bit green, 5-bit blue, and 1-bit alpha, unsigned normalized, packed into a 16-bit word. */
235
+ VkFormat[VkFormat["R5G5B5A1_UNORM_PACK16"] = 6] = "R5G5B5A1_UNORM_PACK16";
236
+ /** 5-bit blue, 5-bit green, 5-bit red, and 1-bit alpha, unsigned normalized, packed into a 16-bit word. */
237
+ VkFormat[VkFormat["B5G5R5A1_UNORM_PACK16"] = 7] = "B5G5R5A1_UNORM_PACK16";
238
+ /** 1-bit alpha, 5-bit red, 5-bit green, and 5-bit blue, unsigned normalized, packed into a 16-bit word. */
239
+ VkFormat[VkFormat["A1R5G5B5_UNORM_PACK16"] = 8] = "A1R5G5B5_UNORM_PACK16";
240
+ /** 8-bit red, unsigned normalized. */
241
+ VkFormat[VkFormat["R8_UNORM"] = 9] = "R8_UNORM";
242
+ /** 8-bit red, signed normalized. */
243
+ VkFormat[VkFormat["R8_SNORM"] = 10] = "R8_SNORM";
244
+ /** 8-bit red, unsigned scaled. */
245
+ VkFormat[VkFormat["R8_USCALED"] = 11] = "R8_USCALED";
246
+ /** 8-bit red, signed scaled. */
247
+ VkFormat[VkFormat["R8_SSCALED"] = 12] = "R8_SSCALED";
248
+ /** 8-bit red, unsigned integer. */
249
+ VkFormat[VkFormat["R8_UINT"] = 13] = "R8_UINT";
250
+ /** 8-bit red, signed integer. */
251
+ VkFormat[VkFormat["R8_SINT"] = 14] = "R8_SINT";
252
+ /** 8-bit red, sRGB. */
253
+ VkFormat[VkFormat["R8_SRGB"] = 15] = "R8_SRGB";
254
+ /** 8-bit red and green, unsigned normalized. */
255
+ VkFormat[VkFormat["R8G8_UNORM"] = 16] = "R8G8_UNORM";
256
+ /** 8-bit red and green, signed normalized. */
257
+ VkFormat[VkFormat["R8G8_SNORM"] = 17] = "R8G8_SNORM";
258
+ /** 8-bit red and green, unsigned scaled. */
259
+ VkFormat[VkFormat["R8G8_USCALED"] = 18] = "R8G8_USCALED";
260
+ /** 8-bit red and green, signed scaled. */
261
+ VkFormat[VkFormat["R8G8_SSCALED"] = 19] = "R8G8_SSCALED";
262
+ /** 8-bit red and green, unsigned integer. */
263
+ VkFormat[VkFormat["R8G8_UINT"] = 20] = "R8G8_UINT";
264
+ /** 8-bit red and green, signed integer. */
265
+ VkFormat[VkFormat["R8G8_SINT"] = 21] = "R8G8_SINT";
266
+ /** 8-bit red and green, sRGB. */
267
+ VkFormat[VkFormat["R8G8_SRGB"] = 22] = "R8G8_SRGB";
268
+ /** 8-bit red, green, and blue, unsigned normalized. */
269
+ VkFormat[VkFormat["R8G8B8_UNORM"] = 23] = "R8G8B8_UNORM";
270
+ /** 8-bit red, green, and blue, signed normalized. */
271
+ VkFormat[VkFormat["R8G8B8_SNORM"] = 24] = "R8G8B8_SNORM";
272
+ /** 8-bit red, green, and blue, unsigned scaled. */
273
+ VkFormat[VkFormat["R8G8B8_USCALED"] = 25] = "R8G8B8_USCALED";
274
+ /** 8-bit red, green, and blue, signed scaled. */
275
+ VkFormat[VkFormat["R8G8B8_SSCALED"] = 26] = "R8G8B8_SSCALED";
276
+ /** 8-bit red, green, and blue, unsigned integer. */
277
+ VkFormat[VkFormat["R8G8B8_UINT"] = 27] = "R8G8B8_UINT";
278
+ /** 8-bit red, green, and blue, signed integer. */
279
+ VkFormat[VkFormat["R8G8B8_SINT"] = 28] = "R8G8B8_SINT";
280
+ /** 8-bit red, green, and blue, sRGB. */
281
+ VkFormat[VkFormat["R8G8B8_SRGB"] = 29] = "R8G8B8_SRGB";
282
+ /** 8-bit blue, green, and red, unsigned normalized. */
283
+ VkFormat[VkFormat["B8G8R8_UNORM"] = 30] = "B8G8R8_UNORM";
284
+ /** 8-bit blue, green, and red, signed normalized. */
285
+ VkFormat[VkFormat["B8G8R8_SNORM"] = 31] = "B8G8R8_SNORM";
286
+ /** 8-bit blue, green, and red, unsigned scaled. */
287
+ VkFormat[VkFormat["B8G8R8_USCALED"] = 32] = "B8G8R8_USCALED";
288
+ /** 8-bit blue, green, and red, signed scaled. */
289
+ VkFormat[VkFormat["B8G8R8_SSCALED"] = 33] = "B8G8R8_SSCALED";
290
+ /** 8-bit blue, green, and red, unsigned integer. */
291
+ VkFormat[VkFormat["B8G8R8_UINT"] = 34] = "B8G8R8_UINT";
292
+ /** 8-bit blue, green, and red, signed integer. */
293
+ VkFormat[VkFormat["B8G8R8_SINT"] = 35] = "B8G8R8_SINT";
294
+ /** 8-bit blue, green, and red, sRGB. */
295
+ VkFormat[VkFormat["B8G8R8_SRGB"] = 36] = "B8G8R8_SRGB";
296
+ /** 8-bit red, green, blue, and alpha, unsigned normalized. */
297
+ VkFormat[VkFormat["R8G8B8A8_UNORM"] = 37] = "R8G8B8A8_UNORM";
298
+ /** 8-bit red, green, blue, and alpha, signed normalized. */
299
+ VkFormat[VkFormat["R8G8B8A8_SNORM"] = 38] = "R8G8B8A8_SNORM";
300
+ /** 8-bit red, green, blue, and alpha, unsigned scaled. */
301
+ VkFormat[VkFormat["R8G8B8A8_USCALED"] = 39] = "R8G8B8A8_USCALED";
302
+ /** 8-bit red, green, blue, and alpha, signed scaled. */
303
+ VkFormat[VkFormat["R8G8B8A8_SSCALED"] = 40] = "R8G8B8A8_SSCALED";
304
+ /** 8-bit red, green, blue, and alpha, unsigned integer. */
305
+ VkFormat[VkFormat["R8G8B8A8_UINT"] = 41] = "R8G8B8A8_UINT";
306
+ /** 8-bit red, green, blue, and alpha, signed integer. */
307
+ VkFormat[VkFormat["R8G8B8A8_SINT"] = 42] = "R8G8B8A8_SINT";
308
+ /** 8-bit red, green, blue, and alpha, sRGB. */
309
+ VkFormat[VkFormat["R8G8B8A8_SRGB"] = 43] = "R8G8B8A8_SRGB";
310
+ /** 8-bit blue, green, red, and alpha, unsigned normalized. */
311
+ VkFormat[VkFormat["B8G8R8A8_UNORM"] = 44] = "B8G8R8A8_UNORM";
312
+ /** 8-bit blue, green, red, and alpha, signed normalized. */
313
+ VkFormat[VkFormat["B8G8R8A8_SNORM"] = 45] = "B8G8R8A8_SNORM";
314
+ /** 8-bit blue, green, red, and alpha, unsigned scaled. */
315
+ VkFormat[VkFormat["B8G8R8A8_USCALED"] = 46] = "B8G8R8A8_USCALED";
316
+ /** 8-bit blue, green, red, and alpha, signed scaled. */
317
+ VkFormat[VkFormat["B8G8R8A8_SSCALED"] = 47] = "B8G8R8A8_SSCALED";
318
+ /** 8-bit blue, green, red, and alpha, unsigned integer. */
319
+ VkFormat[VkFormat["B8G8R8A8_UINT"] = 48] = "B8G8R8A8_UINT";
320
+ /** 8-bit blue, green, red, and alpha, signed integer. */
321
+ VkFormat[VkFormat["B8G8R8A8_SINT"] = 49] = "B8G8R8A8_SINT";
322
+ /** 8-bit blue, green, red, and alpha, sRGB. */
323
+ VkFormat[VkFormat["B8G8R8A8_SRGB"] = 50] = "B8G8R8A8_SRGB";
324
+ /** 8-bit alpha, blue, green, and red, unsigned normalized, packed into a 32-bit word. */
325
+ VkFormat[VkFormat["A8B8G8R8_UNORM_PACK32"] = 51] = "A8B8G8R8_UNORM_PACK32";
326
+ /** 8-bit alpha, blue, green, and red, signed normalized, packed into a 32-bit word. */
327
+ VkFormat[VkFormat["A8B8G8R8_SNORM_PACK32"] = 52] = "A8B8G8R8_SNORM_PACK32";
328
+ /** 8-bit alpha, blue, green, and red, unsigned scaled, packed into a 32-bit word. */
329
+ VkFormat[VkFormat["A8B8G8R8_USCALED_PACK32"] = 53] = "A8B8G8R8_USCALED_PACK32";
330
+ /** 8-bit alpha, blue, green, and red, signed scaled, packed into a 32-bit word. */
331
+ VkFormat[VkFormat["A8B8G8R8_SSCALED_PACK32"] = 54] = "A8B8G8R8_SSCALED_PACK32";
332
+ /** 8-bit alpha, blue, green, and red, unsigned integer, packed into a 32-bit word. */
333
+ VkFormat[VkFormat["A8B8G8R8_UINT_PACK32"] = 55] = "A8B8G8R8_UINT_PACK32";
334
+ /** 8-bit alpha, blue, green, and red, signed integer, packed into a 32-bit word. */
335
+ VkFormat[VkFormat["A8B8G8R8_SINT_PACK32"] = 56] = "A8B8G8R8_SINT_PACK32";
336
+ /** 8-bit alpha, blue, green, and red, sRGB, packed into a 32-bit word. */
337
+ VkFormat[VkFormat["A8B8G8R8_SRGB_PACK32"] = 57] = "A8B8G8R8_SRGB_PACK32";
338
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned normalized, packed into a 32-bit word. */
339
+ VkFormat[VkFormat["A2R10G10B10_UNORM_PACK32"] = 58] = "A2R10G10B10_UNORM_PACK32";
340
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed normalized, packed into a 32-bit word. */
341
+ VkFormat[VkFormat["A2R10G10B10_SNORM_PACK32"] = 59] = "A2R10G10B10_SNORM_PACK32";
342
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned scaled, packed into a 32-bit word. */
343
+ VkFormat[VkFormat["A2R10G10B10_USCALED_PACK32"] = 60] = "A2R10G10B10_USCALED_PACK32";
344
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed scaled, packed into a 32-bit word. */
345
+ VkFormat[VkFormat["A2R10G10B10_SSCALED_PACK32"] = 61] = "A2R10G10B10_SSCALED_PACK32";
346
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned integer, packed into a 32-bit word. */
347
+ VkFormat[VkFormat["A2R10G10B10_UINT_PACK32"] = 62] = "A2R10G10B10_UINT_PACK32";
348
+ /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed integer, packed into a 32-bit word. */
349
+ VkFormat[VkFormat["A2R10G10B10_SINT_PACK32"] = 63] = "A2R10G10B10_SINT_PACK32";
350
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned normalized, packed into a 32-bit word. */
351
+ VkFormat[VkFormat["A2B10G10R10_UNORM_PACK32"] = 64] = "A2B10G10R10_UNORM_PACK32";
352
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed normalized, packed into a 32-bit word. */
353
+ VkFormat[VkFormat["A2B10G10R10_SNORM_PACK32"] = 65] = "A2B10G10R10_SNORM_PACK32";
354
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned scaled, packed into a 32-bit word. */
355
+ VkFormat[VkFormat["A2B10G10R10_USCALED_PACK32"] = 66] = "A2B10G10R10_USCALED_PACK32";
356
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed scaled, packed into a 32-bit word. */
357
+ VkFormat[VkFormat["A2B10G10R10_SSCALED_PACK32"] = 67] = "A2B10G10R10_SSCALED_PACK32";
358
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned integer, packed into a 32-bit word. */
359
+ VkFormat[VkFormat["A2B10G10R10_UINT_PACK32"] = 68] = "A2B10G10R10_UINT_PACK32";
360
+ /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed integer, packed into a 32-bit word. */
361
+ VkFormat[VkFormat["A2B10G10R10_SINT_PACK32"] = 69] = "A2B10G10R10_SINT_PACK32";
362
+ /** 16-bit red, unsigned normalized. */
363
+ VkFormat[VkFormat["R16_UNORM"] = 70] = "R16_UNORM";
364
+ /** 16-bit red, signed normalized. */
365
+ VkFormat[VkFormat["R16_SNORM"] = 71] = "R16_SNORM";
366
+ /** 16-bit red, unsigned scaled. */
367
+ VkFormat[VkFormat["R16_USCALED"] = 72] = "R16_USCALED";
368
+ /** 16-bit red, signed scaled. */
369
+ VkFormat[VkFormat["R16_SSCALED"] = 73] = "R16_SSCALED";
370
+ /** 16-bit red, unsigned integer. */
371
+ VkFormat[VkFormat["R16_UINT"] = 74] = "R16_UINT";
372
+ /** 16-bit red, signed integer. */
373
+ VkFormat[VkFormat["R16_SINT"] = 75] = "R16_SINT";
374
+ /** 16-bit red, signed floating-point. */
375
+ VkFormat[VkFormat["R16_SFLOAT"] = 76] = "R16_SFLOAT";
376
+ /** 16-bit red and green, unsigned normalized. */
377
+ VkFormat[VkFormat["R16G16_UNORM"] = 77] = "R16G16_UNORM";
378
+ /** 16-bit red and green, signed normalized. */
379
+ VkFormat[VkFormat["R16G16_SNORM"] = 78] = "R16G16_SNORM";
380
+ /** 16-bit red and green, unsigned scaled. */
381
+ VkFormat[VkFormat["R16G16_USCALED"] = 79] = "R16G16_USCALED";
382
+ /** 16-bit red and green, signed scaled. */
383
+ VkFormat[VkFormat["R16G16_SSCALED"] = 80] = "R16G16_SSCALED";
384
+ /** 16-bit red and green, unsigned integer. */
385
+ VkFormat[VkFormat["R16G16_UINT"] = 81] = "R16G16_UINT";
386
+ /** 16-bit red and green, signed integer. */
387
+ VkFormat[VkFormat["R16G16_SINT"] = 82] = "R16G16_SINT";
388
+ /** 16-bit red and green, signed floating-point. */
389
+ VkFormat[VkFormat["R16G16_SFLOAT"] = 83] = "R16G16_SFLOAT";
390
+ /** 16-bit red, green, and blue, unsigned normalized. */
391
+ VkFormat[VkFormat["R16G16B16_UNORM"] = 84] = "R16G16B16_UNORM";
392
+ /** 16-bit red, green, and blue, signed normalized. */
393
+ VkFormat[VkFormat["R16G16B16_SNORM"] = 85] = "R16G16B16_SNORM";
394
+ /** 16-bit red, green, and blue, unsigned scaled. */
395
+ VkFormat[VkFormat["R16G16B16_USCALED"] = 86] = "R16G16B16_USCALED";
396
+ /** 16-bit red, green, and blue, signed scaled. */
397
+ VkFormat[VkFormat["R16G16B16_SSCALED"] = 87] = "R16G16B16_SSCALED";
398
+ /** 16-bit red, green, and blue, unsigned integer. */
399
+ VkFormat[VkFormat["R16G16B16_UINT"] = 88] = "R16G16B16_UINT";
400
+ /** 16-bit red, green, and blue, signed integer. */
401
+ VkFormat[VkFormat["R16G16B16_SINT"] = 89] = "R16G16B16_SINT";
402
+ /** 16-bit red, green, and blue, signed floating-point. */
403
+ VkFormat[VkFormat["R16G16B16_SFLOAT"] = 90] = "R16G16B16_SFLOAT";
404
+ /** 16-bit red, green, blue, and alpha, unsigned normalized. */
405
+ VkFormat[VkFormat["R16G16B16A16_UNORM"] = 91] = "R16G16B16A16_UNORM";
406
+ /** 16-bit red, green, blue, and alpha, signed normalized. */
407
+ VkFormat[VkFormat["R16G16B16A16_SNORM"] = 92] = "R16G16B16A16_SNORM";
408
+ /** 16-bit red, green, blue, and alpha, unsigned scaled. */
409
+ VkFormat[VkFormat["R16G16B16A16_USCALED"] = 93] = "R16G16B16A16_USCALED";
410
+ /** 16-bit red, green, blue, and alpha, signed scaled. */
411
+ VkFormat[VkFormat["R16G16B16A16_SSCALED"] = 94] = "R16G16B16A16_SSCALED";
412
+ /** 16-bit red, green, blue, and alpha, unsigned integer. */
413
+ VkFormat[VkFormat["R16G16B16A16_UINT"] = 95] = "R16G16B16A16_UINT";
414
+ /** 16-bit red, green, blue, and alpha, signed integer. */
415
+ VkFormat[VkFormat["R16G16B16A16_SINT"] = 96] = "R16G16B16A16_SINT";
416
+ /** 16-bit red, green, blue, and alpha, signed floating-point. */
417
+ VkFormat[VkFormat["R16G16B16A16_SFLOAT"] = 97] = "R16G16B16A16_SFLOAT";
418
+ /** 32-bit red, unsigned integer. */
419
+ VkFormat[VkFormat["R32_UINT"] = 98] = "R32_UINT";
420
+ /** 32-bit red, signed integer. */
421
+ VkFormat[VkFormat["R32_SINT"] = 99] = "R32_SINT";
422
+ /** 32-bit red, signed floating-point. */
423
+ VkFormat[VkFormat["R32_SFLOAT"] = 100] = "R32_SFLOAT";
424
+ /** 32-bit red and green, unsigned integer. */
425
+ VkFormat[VkFormat["R32G32_UINT"] = 101] = "R32G32_UINT";
426
+ /** 32-bit red and green, signed integer. */
427
+ VkFormat[VkFormat["R32G32_SINT"] = 102] = "R32G32_SINT";
428
+ /** 32-bit red and green, signed floating-point. */
429
+ VkFormat[VkFormat["R32G32_SFLOAT"] = 103] = "R32G32_SFLOAT";
430
+ /** 32-bit red, green, and blue, unsigned integer. */
431
+ VkFormat[VkFormat["R32G32B32_UINT"] = 104] = "R32G32B32_UINT";
432
+ /** 32-bit red, green, and blue, signed integer. */
433
+ VkFormat[VkFormat["R32G32B32_SINT"] = 105] = "R32G32B32_SINT";
434
+ /** 32-bit red, green, and blue, signed floating-point. */
435
+ VkFormat[VkFormat["R32G32B32_SFLOAT"] = 106] = "R32G32B32_SFLOAT";
436
+ /** 32-bit red, green, blue, and alpha, unsigned integer. */
437
+ VkFormat[VkFormat["R32G32B32A32_UINT"] = 107] = "R32G32B32A32_UINT";
438
+ /** 32-bit red, green, blue, and alpha, signed integer. */
439
+ VkFormat[VkFormat["R32G32B32A32_SINT"] = 108] = "R32G32B32A32_SINT";
440
+ /** 32-bit red, green, blue, and alpha, signed floating-point. */
441
+ VkFormat[VkFormat["R32G32B32A32_SFLOAT"] = 109] = "R32G32B32A32_SFLOAT";
442
+ /** 64-bit red, unsigned integer. */
443
+ VkFormat[VkFormat["R64_UINT"] = 110] = "R64_UINT";
444
+ /** 64-bit red, signed integer. */
445
+ VkFormat[VkFormat["R64_SINT"] = 111] = "R64_SINT";
446
+ /** 64-bit red, signed floating-point. */
447
+ VkFormat[VkFormat["R64_SFLOAT"] = 112] = "R64_SFLOAT";
448
+ /** 64-bit red and green, unsigned integer. */
449
+ VkFormat[VkFormat["R64G64_UINT"] = 113] = "R64G64_UINT";
450
+ /** 64-bit red and green, signed integer. */
451
+ VkFormat[VkFormat["R64G64_SINT"] = 114] = "R64G64_SINT";
452
+ /** 64-bit red and green, signed floating-point. */
453
+ VkFormat[VkFormat["R64G64_SFLOAT"] = 115] = "R64G64_SFLOAT";
454
+ /** 64-bit red, green, and blue, unsigned integer. */
455
+ VkFormat[VkFormat["R64G64B64_UINT"] = 116] = "R64G64B64_UINT";
456
+ /** 64-bit red, green, and blue, signed integer. */
457
+ VkFormat[VkFormat["R64G64B64_SINT"] = 117] = "R64G64B64_SINT";
458
+ /** 64-bit red, green, and blue, signed floating-point. */
459
+ VkFormat[VkFormat["R64G64B64_SFLOAT"] = 118] = "R64G64B64_SFLOAT";
460
+ /** 64-bit red, green, blue, and alpha, unsigned integer. */
461
+ VkFormat[VkFormat["R64G64B64A64_UINT"] = 119] = "R64G64B64A64_UINT";
462
+ /** 64-bit red, green, blue, and alpha, signed integer. */
463
+ VkFormat[VkFormat["R64G64B64A64_SINT"] = 120] = "R64G64B64A64_SINT";
464
+ /** 64-bit red, green, blue, and alpha, signed floating-point. */
465
+ VkFormat[VkFormat["R64G64B64A64_SFLOAT"] = 121] = "R64G64B64A64_SFLOAT";
466
+ /** 10-bit blue, 11-bit green, and 11-bit red, unsigned floating-point, packed into a 32-bit word. */
467
+ VkFormat[VkFormat["B10G11R11_UFLOAT_PACK32"] = 122] = "B10G11R11_UFLOAT_PACK32";
468
+ /** 5-bit shared exponent, 9-bit blue, 9-bit green, and 9-bit red, unsigned floating-point, packed into a 32-bit word. */
469
+ VkFormat[VkFormat["E5B9G9R9_UFLOAT_PACK32"] = 123] = "E5B9G9R9_UFLOAT_PACK32";
470
+ /** 16-bit unsigned normalized depth. */
471
+ VkFormat[VkFormat["D16_UNORM"] = 124] = "D16_UNORM";
472
+ /** 24-bit unsigned normalized depth packed into a 32-bit word with 8 unused bits. */
473
+ VkFormat[VkFormat["X8_D24_UNORM_PACK32"] = 125] = "X8_D24_UNORM_PACK32";
474
+ /** 32-bit signed floating-point depth. */
475
+ VkFormat[VkFormat["D32_SFLOAT"] = 126] = "D32_SFLOAT";
476
+ /** 8-bit unsigned integer stencil. */
477
+ VkFormat[VkFormat["S8_UINT"] = 127] = "S8_UINT";
478
+ /** 16-bit unsigned normalized depth and 8-bit unsigned integer stencil. */
479
+ VkFormat[VkFormat["D16_UNORM_S8_UINT"] = 128] = "D16_UNORM_S8_UINT";
480
+ /** 24-bit unsigned normalized depth and 8-bit unsigned integer stencil. */
481
+ VkFormat[VkFormat["D24_UNORM_S8_UINT"] = 129] = "D24_UNORM_S8_UINT";
482
+ /** 32-bit signed floating-point depth and 8-bit unsigned integer stencil. */
483
+ VkFormat[VkFormat["D32_SFLOAT_S8_UINT"] = 130] = "D32_SFLOAT_S8_UINT";
484
+ /** 4×4 BC1 RGB block compression, unsigned normalized (8 bytes per block). */
485
+ VkFormat[VkFormat["BC1_RGB_UNORM_BLOCK"] = 131] = "BC1_RGB_UNORM_BLOCK";
486
+ /** 4×4 BC1 RGB block compression, sRGB (8 bytes per block). */
487
+ VkFormat[VkFormat["BC1_RGB_SRGB_BLOCK"] = 132] = "BC1_RGB_SRGB_BLOCK";
488
+ /** 4×4 BC1 RGBA block compression with punch-through alpha, unsigned normalized (8 bytes per block). */
489
+ VkFormat[VkFormat["BC1_RGBA_UNORM_BLOCK"] = 133] = "BC1_RGBA_UNORM_BLOCK";
490
+ /** 4×4 BC1 RGBA block compression with punch-through alpha, sRGB (8 bytes per block). */
491
+ VkFormat[VkFormat["BC1_RGBA_SRGB_BLOCK"] = 134] = "BC1_RGBA_SRGB_BLOCK";
492
+ /** 4×4 BC2 RGBA block compression, unsigned normalized (16 bytes per block). */
493
+ VkFormat[VkFormat["BC2_UNORM_BLOCK"] = 135] = "BC2_UNORM_BLOCK";
494
+ /** 4×4 BC2 RGBA block compression, sRGB (16 bytes per block). */
495
+ VkFormat[VkFormat["BC2_SRGB_BLOCK"] = 136] = "BC2_SRGB_BLOCK";
496
+ /** 4×4 BC3 RGBA block compression, unsigned normalized (16 bytes per block). */
497
+ VkFormat[VkFormat["BC3_UNORM_BLOCK"] = 137] = "BC3_UNORM_BLOCK";
498
+ /** 4×4 BC3 RGBA block compression, sRGB (16 bytes per block). */
499
+ VkFormat[VkFormat["BC3_SRGB_BLOCK"] = 138] = "BC3_SRGB_BLOCK";
500
+ /** 4×4 BC4 single-channel block compression, unsigned normalized (8 bytes per block). */
501
+ VkFormat[VkFormat["BC4_UNORM_BLOCK"] = 139] = "BC4_UNORM_BLOCK";
502
+ /** 4×4 BC4 single-channel block compression, signed normalized (8 bytes per block). */
503
+ VkFormat[VkFormat["BC4_SNORM_BLOCK"] = 140] = "BC4_SNORM_BLOCK";
504
+ /** 4×4 BC5 two-channel block compression, unsigned normalized (16 bytes per block). */
505
+ VkFormat[VkFormat["BC5_UNORM_BLOCK"] = 141] = "BC5_UNORM_BLOCK";
506
+ /** 4×4 BC5 two-channel block compression, signed normalized (16 bytes per block). */
507
+ VkFormat[VkFormat["BC5_SNORM_BLOCK"] = 142] = "BC5_SNORM_BLOCK";
508
+ /** 4×4 BC6H HDR block compression, unsigned floating-point (16 bytes per block). */
509
+ VkFormat[VkFormat["BC6H_UFLOAT_BLOCK"] = 143] = "BC6H_UFLOAT_BLOCK";
510
+ /** 4×4 BC6H HDR block compression, signed floating-point (16 bytes per block). */
511
+ VkFormat[VkFormat["BC6H_SFLOAT_BLOCK"] = 144] = "BC6H_SFLOAT_BLOCK";
512
+ /** 4×4 BC7 RGBA block compression, unsigned normalized (16 bytes per block). */
513
+ VkFormat[VkFormat["BC7_UNORM_BLOCK"] = 145] = "BC7_UNORM_BLOCK";
514
+ /** 4×4 BC7 RGBA block compression, sRGB (16 bytes per block). */
515
+ VkFormat[VkFormat["BC7_SRGB_BLOCK"] = 146] = "BC7_SRGB_BLOCK";
516
+ /** 4×4 ETC2 RGB block compression, unsigned normalized (8 bytes per block). */
517
+ VkFormat[VkFormat["ETC2_R8G8B8_UNORM_BLOCK"] = 147] = "ETC2_R8G8B8_UNORM_BLOCK";
518
+ /** 4×4 ETC2 RGB block compression, sRGB (8 bytes per block). */
519
+ VkFormat[VkFormat["ETC2_R8G8B8_SRGB_BLOCK"] = 148] = "ETC2_R8G8B8_SRGB_BLOCK";
520
+ /** 4×4 ETC2 RGB block compression with 1-bit alpha, unsigned normalized (8 bytes per block). */
521
+ VkFormat[VkFormat["ETC2_R8G8B8A1_UNORM_BLOCK"] = 149] = "ETC2_R8G8B8A1_UNORM_BLOCK";
522
+ /** 4×4 ETC2 RGB block compression with 1-bit alpha, sRGB (8 bytes per block). */
523
+ VkFormat[VkFormat["ETC2_R8G8B8A1_SRGB_BLOCK"] = 150] = "ETC2_R8G8B8A1_SRGB_BLOCK";
524
+ /** 4×4 ETC2 RGBA block compression, unsigned normalized (16 bytes per block). */
525
+ VkFormat[VkFormat["ETC2_R8G8B8A8_UNORM_BLOCK"] = 151] = "ETC2_R8G8B8A8_UNORM_BLOCK";
526
+ /** 4×4 ETC2 RGBA block compression, sRGB (16 bytes per block). */
527
+ VkFormat[VkFormat["ETC2_R8G8B8A8_SRGB_BLOCK"] = 152] = "ETC2_R8G8B8A8_SRGB_BLOCK";
528
+ /** 4×4 EAC single-channel block compression, unsigned normalized (8 bytes per block). */
529
+ VkFormat[VkFormat["EAC_R11_UNORM_BLOCK"] = 153] = "EAC_R11_UNORM_BLOCK";
530
+ /** 4×4 EAC single-channel block compression, signed normalized (8 bytes per block). */
531
+ VkFormat[VkFormat["EAC_R11_SNORM_BLOCK"] = 154] = "EAC_R11_SNORM_BLOCK";
532
+ /** 4×4 EAC two-channel block compression, unsigned normalized (16 bytes per block). */
533
+ VkFormat[VkFormat["EAC_R11G11_UNORM_BLOCK"] = 155] = "EAC_R11G11_UNORM_BLOCK";
534
+ /** 4×4 EAC two-channel block compression, signed normalized (16 bytes per block). */
535
+ VkFormat[VkFormat["EAC_R11G11_SNORM_BLOCK"] = 156] = "EAC_R11G11_SNORM_BLOCK";
536
+ /** ASTC 4×4 block compression, unsigned normalized (16 bytes per block). */
537
+ VkFormat[VkFormat["ASTC_4X4_UNORM_BLOCK"] = 157] = "ASTC_4X4_UNORM_BLOCK";
538
+ /** ASTC 4×4 block compression, sRGB (16 bytes per block). */
539
+ VkFormat[VkFormat["ASTC_4X4_SRGB_BLOCK"] = 158] = "ASTC_4X4_SRGB_BLOCK";
540
+ /** ASTC 5×4 block compression, unsigned normalized (16 bytes per block). */
541
+ VkFormat[VkFormat["ASTC_5X4_UNORM_BLOCK"] = 159] = "ASTC_5X4_UNORM_BLOCK";
542
+ /** ASTC 5×4 block compression, sRGB (16 bytes per block). */
543
+ VkFormat[VkFormat["ASTC_5X4_SRGB_BLOCK"] = 160] = "ASTC_5X4_SRGB_BLOCK";
544
+ /** ASTC 5×5 block compression, unsigned normalized (16 bytes per block). */
545
+ VkFormat[VkFormat["ASTC_5X5_UNORM_BLOCK"] = 161] = "ASTC_5X5_UNORM_BLOCK";
546
+ /** ASTC 5×5 block compression, sRGB (16 bytes per block). */
547
+ VkFormat[VkFormat["ASTC_5X5_SRGB_BLOCK"] = 162] = "ASTC_5X5_SRGB_BLOCK";
548
+ /** ASTC 6×5 block compression, unsigned normalized (16 bytes per block). */
549
+ VkFormat[VkFormat["ASTC_6X5_UNORM_BLOCK"] = 163] = "ASTC_6X5_UNORM_BLOCK";
550
+ /** ASTC 6×5 block compression, sRGB (16 bytes per block). */
551
+ VkFormat[VkFormat["ASTC_6X5_SRGB_BLOCK"] = 164] = "ASTC_6X5_SRGB_BLOCK";
552
+ /** ASTC 6×6 block compression, unsigned normalized (16 bytes per block). */
553
+ VkFormat[VkFormat["ASTC_6X6_UNORM_BLOCK"] = 165] = "ASTC_6X6_UNORM_BLOCK";
554
+ /** ASTC 6×6 block compression, sRGB (16 bytes per block). */
555
+ VkFormat[VkFormat["ASTC_6X6_SRGB_BLOCK"] = 166] = "ASTC_6X6_SRGB_BLOCK";
556
+ /** ASTC 8×5 block compression, unsigned normalized (16 bytes per block). */
557
+ VkFormat[VkFormat["ASTC_8X5_UNORM_BLOCK"] = 167] = "ASTC_8X5_UNORM_BLOCK";
558
+ /** ASTC 8×5 block compression, sRGB (16 bytes per block). */
559
+ VkFormat[VkFormat["ASTC_8X5_SRGB_BLOCK"] = 168] = "ASTC_8X5_SRGB_BLOCK";
560
+ /** ASTC 8×6 block compression, unsigned normalized (16 bytes per block). */
561
+ VkFormat[VkFormat["ASTC_8X6_UNORM_BLOCK"] = 169] = "ASTC_8X6_UNORM_BLOCK";
562
+ /** ASTC 8×6 block compression, sRGB (16 bytes per block). */
563
+ VkFormat[VkFormat["ASTC_8X6_SRGB_BLOCK"] = 170] = "ASTC_8X6_SRGB_BLOCK";
564
+ /** ASTC 8×8 block compression, unsigned normalized (16 bytes per block). */
565
+ VkFormat[VkFormat["ASTC_8X8_UNORM_BLOCK"] = 171] = "ASTC_8X8_UNORM_BLOCK";
566
+ /** ASTC 8×8 block compression, sRGB (16 bytes per block). */
567
+ VkFormat[VkFormat["ASTC_8X8_SRGB_BLOCK"] = 172] = "ASTC_8X8_SRGB_BLOCK";
568
+ /** ASTC 10×5 block compression, unsigned normalized (16 bytes per block). */
569
+ VkFormat[VkFormat["ASTC_10X5_UNORM_BLOCK"] = 173] = "ASTC_10X5_UNORM_BLOCK";
570
+ /** ASTC 10×5 block compression, sRGB (16 bytes per block). */
571
+ VkFormat[VkFormat["ASTC_10X5_SRGB_BLOCK"] = 174] = "ASTC_10X5_SRGB_BLOCK";
572
+ /** ASTC 10×6 block compression, unsigned normalized (16 bytes per block). */
573
+ VkFormat[VkFormat["ASTC_10X6_UNORM_BLOCK"] = 175] = "ASTC_10X6_UNORM_BLOCK";
574
+ /** ASTC 10×6 block compression, sRGB (16 bytes per block). */
575
+ VkFormat[VkFormat["ASTC_10X6_SRGB_BLOCK"] = 176] = "ASTC_10X6_SRGB_BLOCK";
576
+ /** ASTC 10×8 block compression, unsigned normalized (16 bytes per block). */
577
+ VkFormat[VkFormat["ASTC_10X8_UNORM_BLOCK"] = 177] = "ASTC_10X8_UNORM_BLOCK";
578
+ /** ASTC 10×8 block compression, sRGB (16 bytes per block). */
579
+ VkFormat[VkFormat["ASTC_10X8_SRGB_BLOCK"] = 178] = "ASTC_10X8_SRGB_BLOCK";
580
+ /** ASTC 10×10 block compression, unsigned normalized (16 bytes per block). */
581
+ VkFormat[VkFormat["ASTC_10X10_UNORM_BLOCK"] = 179] = "ASTC_10X10_UNORM_BLOCK";
582
+ /** ASTC 10×10 block compression, sRGB (16 bytes per block). */
583
+ VkFormat[VkFormat["ASTC_10X10_SRGB_BLOCK"] = 180] = "ASTC_10X10_SRGB_BLOCK";
584
+ /** ASTC 12×10 block compression, unsigned normalized (16 bytes per block). */
585
+ VkFormat[VkFormat["ASTC_12X10_UNORM_BLOCK"] = 181] = "ASTC_12X10_UNORM_BLOCK";
586
+ /** ASTC 12×10 block compression, sRGB (16 bytes per block). */
587
+ VkFormat[VkFormat["ASTC_12X10_SRGB_BLOCK"] = 182] = "ASTC_12X10_SRGB_BLOCK";
588
+ /** ASTC 12×12 block compression, unsigned normalized (16 bytes per block). */
589
+ VkFormat[VkFormat["ASTC_12X12_UNORM_BLOCK"] = 183] = "ASTC_12X12_UNORM_BLOCK";
590
+ /** ASTC 12×12 block compression, sRGB (16 bytes per block). */
591
+ VkFormat[VkFormat["ASTC_12X12_SRGB_BLOCK"] = 184] = "ASTC_12X12_SRGB_BLOCK";
592
+ /** Packed 4:2:2 format with 8-bit unsigned normalized components in order G, B, G, R. */
593
+ VkFormat[VkFormat["G8B8G8R8_422_UNORM"] = 1000156e3] = "G8B8G8R8_422_UNORM";
594
+ /** Packed 4:2:2 format with 8-bit unsigned normalized components in order B, G, R, G. */
595
+ VkFormat[VkFormat["B8G8R8G8_422_UNORM"] = 1000156001] = "B8G8R8G8_422_UNORM";
596
+ /** 4:2:0 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */
597
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_420_UNORM"] = 1000156002] = "G8_B8_R8_3PLANE_420_UNORM";
598
+ /** 4:2:0 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */
599
+ VkFormat[VkFormat["G8_B8R8_2PLANE_420_UNORM"] = 1000156003] = "G8_B8R8_2PLANE_420_UNORM";
600
+ /** 4:2:2 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */
601
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_422_UNORM"] = 1000156004] = "G8_B8_R8_3PLANE_422_UNORM";
602
+ /** 4:2:2 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */
603
+ VkFormat[VkFormat["G8_B8R8_2PLANE_422_UNORM"] = 1000156005] = "G8_B8R8_2PLANE_422_UNORM";
604
+ /** 4:4:4 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */
605
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_444_UNORM"] = 1000156006] = "G8_B8_R8_3PLANE_444_UNORM";
606
+ /** red with 10 significant bits and 6 unused bits, unsigned normalized, packed into a 16-bit word. */
607
+ VkFormat[VkFormat["R10X6_UNORM_PACK16"] = 1000156007] = "R10X6_UNORM_PACK16";
608
+ /** red and green, each with 10 significant bits and 6 unused bits, unsigned normalized, packed into two 16-bit words. */
609
+ VkFormat[VkFormat["R10X6G10X6_UNORM_2PACK16"] = 1000156008] = "R10X6G10X6_UNORM_2PACK16";
610
+ /** red, green, blue, and alpha, each with 10 significant bits and 6 unused bits, unsigned normalized, packed into four 16-bit words. */
611
+ VkFormat[VkFormat["R10X6G10X6B10X6A10X6_UNORM_4PACK16"] = 1000156009] = "R10X6G10X6B10X6A10X6_UNORM_4PACK16";
612
+ /** Packed 4:2:2 format, unsigned normalized, each component with 10 significant bits and 6 unused bits, component order G, B, G, R. */
613
+ VkFormat[VkFormat["G10X6B10X6G10X6R10X6_422_UNORM_4PACK16"] = 1000156010] = "G10X6B10X6G10X6R10X6_422_UNORM_4PACK16";
614
+ /** Packed 4:2:2 format, unsigned normalized, each component with 10 significant bits and 6 unused bits, component order B, G, R, G. */
615
+ VkFormat[VkFormat["B10X6G10X6R10X6G10X6_422_UNORM_4PACK16"] = 1000156011] = "B10X6G10X6R10X6G10X6_422_UNORM_4PACK16";
616
+ /** 4:2:0 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
617
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16"] = 1000156012] = "G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16";
618
+ /** 4:2:0 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
619
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16"] = 1000156013] = "G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16";
620
+ /** 4:2:2 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
621
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16"] = 1000156014] = "G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16";
622
+ /** 4:2:2 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
623
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16"] = 1000156015] = "G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16";
624
+ /** 4:4:4 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
625
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16"] = 1000156016] = "G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16";
626
+ /** red with 12 significant bits and 4 unused bits, unsigned normalized, packed into a 16-bit word. */
627
+ VkFormat[VkFormat["R12X4_UNORM_PACK16"] = 1000156017] = "R12X4_UNORM_PACK16";
628
+ /** red and green, each with 12 significant bits and 4 unused bits, unsigned normalized, packed into two 16-bit words. */
629
+ VkFormat[VkFormat["R12X4G12X4_UNORM_2PACK16"] = 1000156018] = "R12X4G12X4_UNORM_2PACK16";
630
+ /** red, green, blue, and alpha, each with 12 significant bits and 4 unused bits, unsigned normalized, packed into four 16-bit words. */
631
+ VkFormat[VkFormat["R12X4G12X4B12X4A12X4_UNORM_4PACK16"] = 1000156019] = "R12X4G12X4B12X4A12X4_UNORM_4PACK16";
632
+ /** Packed 4:2:2 format, unsigned normalized, each component with 12 significant bits and 4 unused bits, component order G, B, G, R. */
633
+ VkFormat[VkFormat["G12X4B12X4G12X4R12X4_422_UNORM_4PACK16"] = 1000156020] = "G12X4B12X4G12X4R12X4_422_UNORM_4PACK16";
634
+ /** Packed 4:2:2 format, unsigned normalized, each component with 12 significant bits and 4 unused bits, component order B, G, R, G. */
635
+ VkFormat[VkFormat["B12X4G12X4R12X4G12X4_422_UNORM_4PACK16"] = 1000156021] = "B12X4G12X4R12X4G12X4_422_UNORM_4PACK16";
636
+ /** 4:2:0 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
637
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16"] = 1000156022] = "G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16";
638
+ /** 4:2:0 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
639
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16"] = 1000156023] = "G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16";
640
+ /** 4:2:2 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
641
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16"] = 1000156024] = "G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16";
642
+ /** 4:2:2 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
643
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16"] = 1000156025] = "G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16";
644
+ /** 4:4:4 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
645
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16"] = 1000156026] = "G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16";
646
+ /** Packed 4:2:2 format with 16-bit unsigned normalized components in order G, B, G, R. */
647
+ VkFormat[VkFormat["G16B16G16R16_422_UNORM"] = 1000156027] = "G16B16G16R16_422_UNORM";
648
+ /** Packed 4:2:2 format with 16-bit unsigned normalized components in order B, G, R, G. */
649
+ VkFormat[VkFormat["B16G16R16G16_422_UNORM"] = 1000156028] = "B16G16R16G16_422_UNORM";
650
+ /** 4:2:0 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */
651
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_420_UNORM"] = 1000156029] = "G16_B16_R16_3PLANE_420_UNORM";
652
+ /** 4:2:0 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */
653
+ VkFormat[VkFormat["G16_B16R16_2PLANE_420_UNORM"] = 1000156030] = "G16_B16R16_2PLANE_420_UNORM";
654
+ /** 4:2:2 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */
655
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_422_UNORM"] = 1000156031] = "G16_B16_R16_3PLANE_422_UNORM";
656
+ /** 4:2:2 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */
657
+ VkFormat[VkFormat["G16_B16R16_2PLANE_422_UNORM"] = 1000156032] = "G16_B16R16_2PLANE_422_UNORM";
658
+ /** 4:4:4 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */
659
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_444_UNORM"] = 1000156033] = "G16_B16_R16_3PLANE_444_UNORM";
660
+ /** 4:4:4 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */
661
+ VkFormat[VkFormat["G8_B8R8_2PLANE_444_UNORM"] = 100033e4] = "G8_B8R8_2PLANE_444_UNORM";
662
+ /** 4:4:4 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */
663
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16"] = 1000330001] = "G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16";
664
+ /** 4:4:4 format stored as two planes (G, and interleaved B and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */
665
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16"] = 1000330002] = "G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16";
666
+ /** 4:4:4 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */
667
+ VkFormat[VkFormat["G16_B16R16_2PLANE_444_UNORM"] = 1000330003] = "G16_B16R16_2PLANE_444_UNORM";
668
+ /** 4-bit alpha, red, green, and blue, unsigned normalized, packed into a 16-bit word. */
669
+ VkFormat[VkFormat["A4R4G4B4_UNORM_PACK16"] = 100034e4] = "A4R4G4B4_UNORM_PACK16";
670
+ /** 4-bit alpha, blue, green, and red, unsigned normalized, packed into a 16-bit word. */
671
+ VkFormat[VkFormat["A4B4G4R4_UNORM_PACK16"] = 1000340001] = "A4B4G4R4_UNORM_PACK16";
672
+ /** ASTC 4×4 block compression, signed floating-point (16 bytes per block). */
673
+ VkFormat[VkFormat["ASTC_4X4_SFLOAT_BLOCK"] = 1000066e3] = "ASTC_4X4_SFLOAT_BLOCK";
674
+ /** ASTC 5×4 block compression, signed floating-point (16 bytes per block). */
675
+ VkFormat[VkFormat["ASTC_5X4_SFLOAT_BLOCK"] = 1000066001] = "ASTC_5X4_SFLOAT_BLOCK";
676
+ /** ASTC 5×5 block compression, signed floating-point (16 bytes per block). */
677
+ VkFormat[VkFormat["ASTC_5X5_SFLOAT_BLOCK"] = 1000066002] = "ASTC_5X5_SFLOAT_BLOCK";
678
+ /** ASTC 6×5 block compression, signed floating-point (16 bytes per block). */
679
+ VkFormat[VkFormat["ASTC_6X5_SFLOAT_BLOCK"] = 1000066003] = "ASTC_6X5_SFLOAT_BLOCK";
680
+ /** ASTC 6×6 block compression, signed floating-point (16 bytes per block). */
681
+ VkFormat[VkFormat["ASTC_6X6_SFLOAT_BLOCK"] = 1000066004] = "ASTC_6X6_SFLOAT_BLOCK";
682
+ /** ASTC 8×5 block compression, signed floating-point (16 bytes per block). */
683
+ VkFormat[VkFormat["ASTC_8X5_SFLOAT_BLOCK"] = 1000066005] = "ASTC_8X5_SFLOAT_BLOCK";
684
+ /** ASTC 8×6 block compression, signed floating-point (16 bytes per block). */
685
+ VkFormat[VkFormat["ASTC_8X6_SFLOAT_BLOCK"] = 1000066006] = "ASTC_8X6_SFLOAT_BLOCK";
686
+ /** ASTC 8×8 block compression, signed floating-point (16 bytes per block). */
687
+ VkFormat[VkFormat["ASTC_8X8_SFLOAT_BLOCK"] = 1000066007] = "ASTC_8X8_SFLOAT_BLOCK";
688
+ /** ASTC 10×5 block compression, signed floating-point (16 bytes per block). */
689
+ VkFormat[VkFormat["ASTC_10X5_SFLOAT_BLOCK"] = 1000066008] = "ASTC_10X5_SFLOAT_BLOCK";
690
+ /** ASTC 10×6 block compression, signed floating-point (16 bytes per block). */
691
+ VkFormat[VkFormat["ASTC_10X6_SFLOAT_BLOCK"] = 1000066009] = "ASTC_10X6_SFLOAT_BLOCK";
692
+ /** ASTC 10×8 block compression, signed floating-point (16 bytes per block). */
693
+ VkFormat[VkFormat["ASTC_10X8_SFLOAT_BLOCK"] = 1000066010] = "ASTC_10X8_SFLOAT_BLOCK";
694
+ /** ASTC 10×10 block compression, signed floating-point (16 bytes per block). */
695
+ VkFormat[VkFormat["ASTC_10X10_SFLOAT_BLOCK"] = 1000066011] = "ASTC_10X10_SFLOAT_BLOCK";
696
+ /** ASTC 12×10 block compression, signed floating-point (16 bytes per block). */
697
+ VkFormat[VkFormat["ASTC_12X10_SFLOAT_BLOCK"] = 1000066012] = "ASTC_12X10_SFLOAT_BLOCK";
698
+ /** ASTC 12×12 block compression, signed floating-point (16 bytes per block). */
699
+ VkFormat[VkFormat["ASTC_12X12_SFLOAT_BLOCK"] = 1000066013] = "ASTC_12X12_SFLOAT_BLOCK";
700
+ /** 1-bit alpha, 5-bit blue, 5-bit green, and 5-bit red, unsigned normalized, packed into a 16-bit word. */
701
+ VkFormat[VkFormat["A1B5G5R5_UNORM_PACK16"] = 100047e4] = "A1B5G5R5_UNORM_PACK16";
702
+ /** 8-bit alpha, unsigned normalized. */
703
+ VkFormat[VkFormat["A8_UNORM"] = 1000470001] = "A8_UNORM";
704
+ /** PVRTC1 2 bits per pixel, unsigned normalized. */
705
+ VkFormat[VkFormat["PVRTC1_2BPP_UNORM_BLOCK_IMG"] = 1000054e3] = "PVRTC1_2BPP_UNORM_BLOCK_IMG";
706
+ /** PVRTC1 4 bits per pixel, unsigned normalized. */
707
+ VkFormat[VkFormat["PVRTC1_4BPP_UNORM_BLOCK_IMG"] = 1000054001] = "PVRTC1_4BPP_UNORM_BLOCK_IMG";
708
+ /** PVRTC2 2 bits per pixel, unsigned normalized. */
709
+ VkFormat[VkFormat["PVRTC2_2BPP_UNORM_BLOCK_IMG"] = 1000054002] = "PVRTC2_2BPP_UNORM_BLOCK_IMG";
710
+ /** PVRTC2 4 bits per pixel, unsigned normalized. */
711
+ VkFormat[VkFormat["PVRTC2_4BPP_UNORM_BLOCK_IMG"] = 1000054003] = "PVRTC2_4BPP_UNORM_BLOCK_IMG";
712
+ /** PVRTC1 2 bits per pixel, sRGB. */
713
+ VkFormat[VkFormat["PVRTC1_2BPP_SRGB_BLOCK_IMG"] = 1000054004] = "PVRTC1_2BPP_SRGB_BLOCK_IMG";
714
+ /** PVRTC1 4 bits per pixel, sRGB. */
715
+ VkFormat[VkFormat["PVRTC1_4BPP_SRGB_BLOCK_IMG"] = 1000054005] = "PVRTC1_4BPP_SRGB_BLOCK_IMG";
716
+ /** PVRTC2 2 bits per pixel, sRGB. */
717
+ VkFormat[VkFormat["PVRTC2_2BPP_SRGB_BLOCK_IMG"] = 1000054006] = "PVRTC2_2BPP_SRGB_BLOCK_IMG";
718
+ /** PVRTC2 4 bits per pixel, sRGB. */
719
+ VkFormat[VkFormat["PVRTC2_4BPP_SRGB_BLOCK_IMG"] = 1000054007] = "PVRTC2_4BPP_SRGB_BLOCK_IMG";
720
+ /** Two 16-bit signed fixed-point components (red and green). Each component has 10 integer bits and 5 fractional bits (NVIDIA). */
721
+ VkFormat[VkFormat["R16G16_SFIXED5_NV"] = 1000464e3] = "R16G16_SFIXED5_NV";
722
+ /** Alias of {@link VkFormat.ASTC_4X4_SFLOAT_BLOCK}. */
723
+ VkFormat[VkFormat["ASTC_4X4_SFLOAT_BLOCK_EXT"] = 1000066e3] = "ASTC_4X4_SFLOAT_BLOCK_EXT";
724
+ /** Alias of {@link VkFormat.ASTC_5X4_SFLOAT_BLOCK}. */
725
+ VkFormat[VkFormat["ASTC_5X4_SFLOAT_BLOCK_EXT"] = 1000066001] = "ASTC_5X4_SFLOAT_BLOCK_EXT";
726
+ /** Alias of {@link VkFormat.ASTC_5X5_SFLOAT_BLOCK}. */
727
+ VkFormat[VkFormat["ASTC_5X5_SFLOAT_BLOCK_EXT"] = 1000066002] = "ASTC_5X5_SFLOAT_BLOCK_EXT";
728
+ /** Alias of {@link VkFormat.ASTC_6X5_SFLOAT_BLOCK}. */
729
+ VkFormat[VkFormat["ASTC_6X5_SFLOAT_BLOCK_EXT"] = 1000066003] = "ASTC_6X5_SFLOAT_BLOCK_EXT";
730
+ /** Alias of {@link VkFormat.ASTC_6X6_SFLOAT_BLOCK}. */
731
+ VkFormat[VkFormat["ASTC_6X6_SFLOAT_BLOCK_EXT"] = 1000066004] = "ASTC_6X6_SFLOAT_BLOCK_EXT";
732
+ /** Alias of {@link VkFormat.ASTC_8X5_SFLOAT_BLOCK}. */
733
+ VkFormat[VkFormat["ASTC_8X5_SFLOAT_BLOCK_EXT"] = 1000066005] = "ASTC_8X5_SFLOAT_BLOCK_EXT";
734
+ /** Alias of {@link VkFormat.ASTC_8X6_SFLOAT_BLOCK}. */
735
+ VkFormat[VkFormat["ASTC_8X6_SFLOAT_BLOCK_EXT"] = 1000066006] = "ASTC_8X6_SFLOAT_BLOCK_EXT";
736
+ /** Alias of {@link VkFormat.ASTC_8X8_SFLOAT_BLOCK}. */
737
+ VkFormat[VkFormat["ASTC_8X8_SFLOAT_BLOCK_EXT"] = 1000066007] = "ASTC_8X8_SFLOAT_BLOCK_EXT";
738
+ /** Alias of {@link VkFormat.ASTC_10X5_SFLOAT_BLOCK}. */
739
+ VkFormat[VkFormat["ASTC_10X5_SFLOAT_BLOCK_EXT"] = 1000066008] = "ASTC_10X5_SFLOAT_BLOCK_EXT";
740
+ /** Alias of {@link VkFormat.ASTC_10X6_SFLOAT_BLOCK}. */
741
+ VkFormat[VkFormat["ASTC_10X6_SFLOAT_BLOCK_EXT"] = 1000066009] = "ASTC_10X6_SFLOAT_BLOCK_EXT";
742
+ /** Alias of {@link VkFormat.ASTC_10X8_SFLOAT_BLOCK}. */
743
+ VkFormat[VkFormat["ASTC_10X8_SFLOAT_BLOCK_EXT"] = 1000066010] = "ASTC_10X8_SFLOAT_BLOCK_EXT";
744
+ /** Alias of {@link VkFormat.ASTC_10X10_SFLOAT_BLOCK}. */
745
+ VkFormat[VkFormat["ASTC_10X10_SFLOAT_BLOCK_EXT"] = 1000066011] = "ASTC_10X10_SFLOAT_BLOCK_EXT";
746
+ /** Alias of {@link VkFormat.ASTC_12X10_SFLOAT_BLOCK}. */
747
+ VkFormat[VkFormat["ASTC_12X10_SFLOAT_BLOCK_EXT"] = 1000066012] = "ASTC_12X10_SFLOAT_BLOCK_EXT";
748
+ /** Alias of {@link VkFormat.ASTC_12X12_SFLOAT_BLOCK}. */
749
+ VkFormat[VkFormat["ASTC_12X12_SFLOAT_BLOCK_EXT"] = 1000066013] = "ASTC_12X12_SFLOAT_BLOCK_EXT";
750
+ /** Alias of {@link VkFormat.G8B8G8R8_422_UNORM}. */
751
+ VkFormat[VkFormat["G8B8G8R8_422_UNORM_KHR"] = 1000156e3] = "G8B8G8R8_422_UNORM_KHR";
752
+ /** Alias of {@link VkFormat.B8G8R8G8_422_UNORM}. */
753
+ VkFormat[VkFormat["B8G8R8G8_422_UNORM_KHR"] = 1000156001] = "B8G8R8G8_422_UNORM_KHR";
754
+ /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_420_UNORM}. */
755
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_420_UNORM_KHR"] = 1000156002] = "G8_B8_R8_3PLANE_420_UNORM_KHR";
756
+ /** Alias of {@link VkFormat.G8_B8R8_2PLANE_420_UNORM}. */
757
+ VkFormat[VkFormat["G8_B8R8_2PLANE_420_UNORM_KHR"] = 1000156003] = "G8_B8R8_2PLANE_420_UNORM_KHR";
758
+ /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_422_UNORM}. */
759
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_422_UNORM_KHR"] = 1000156004] = "G8_B8_R8_3PLANE_422_UNORM_KHR";
760
+ /** Alias of {@link VkFormat.G8_B8R8_2PLANE_422_UNORM}. */
761
+ VkFormat[VkFormat["G8_B8R8_2PLANE_422_UNORM_KHR"] = 1000156005] = "G8_B8R8_2PLANE_422_UNORM_KHR";
762
+ /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_444_UNORM}. */
763
+ VkFormat[VkFormat["G8_B8_R8_3PLANE_444_UNORM_KHR"] = 1000156006] = "G8_B8_R8_3PLANE_444_UNORM_KHR";
764
+ /** Alias of {@link VkFormat.R10X6_UNORM_PACK16}. */
765
+ VkFormat[VkFormat["R10X6_UNORM_PACK16_KHR"] = 1000156007] = "R10X6_UNORM_PACK16_KHR";
766
+ /** Alias of {@link VkFormat.R10X6G10X6_UNORM_2PACK16}. */
767
+ VkFormat[VkFormat["R10X6G10X6_UNORM_2PACK16_KHR"] = 1000156008] = "R10X6G10X6_UNORM_2PACK16_KHR";
768
+ /** Alias of {@link VkFormat.R10X6G10X6B10X6A10X6_UNORM_4PACK16}. */
769
+ VkFormat[VkFormat["R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR"] = 1000156009] = "R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR";
770
+ /** Alias of {@link VkFormat.G10X6B10X6G10X6R10X6_422_UNORM_4PACK16}. */
771
+ VkFormat[VkFormat["G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR"] = 1000156010] = "G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR";
772
+ /** Alias of {@link VkFormat.B10X6G10X6R10X6G10X6_422_UNORM_4PACK16}. */
773
+ VkFormat[VkFormat["B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR"] = 1000156011] = "B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR";
774
+ /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16}. */
775
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR"] = 1000156012] = "G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR";
776
+ /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16}. */
777
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR"] = 1000156013] = "G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR";
778
+ /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16}. */
779
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR"] = 1000156014] = "G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR";
780
+ /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16}. */
781
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR"] = 1000156015] = "G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR";
782
+ /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16}. */
783
+ VkFormat[VkFormat["G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR"] = 1000156016] = "G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR";
784
+ /** Alias of {@link VkFormat.R12X4_UNORM_PACK16}. */
785
+ VkFormat[VkFormat["R12X4_UNORM_PACK16_KHR"] = 1000156017] = "R12X4_UNORM_PACK16_KHR";
786
+ /** Alias of {@link VkFormat.R12X4G12X4_UNORM_2PACK16}. */
787
+ VkFormat[VkFormat["R12X4G12X4_UNORM_2PACK16_KHR"] = 1000156018] = "R12X4G12X4_UNORM_2PACK16_KHR";
788
+ /** Alias of {@link VkFormat.R12X4G12X4B12X4A12X4_UNORM_4PACK16}. */
789
+ VkFormat[VkFormat["R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR"] = 1000156019] = "R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR";
790
+ /** Alias of {@link VkFormat.G12X4B12X4G12X4R12X4_422_UNORM_4PACK16}. */
791
+ VkFormat[VkFormat["G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR"] = 1000156020] = "G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR";
792
+ /** Alias of {@link VkFormat.B12X4G12X4R12X4G12X4_422_UNORM_4PACK16}. */
793
+ VkFormat[VkFormat["B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR"] = 1000156021] = "B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR";
794
+ /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16}. */
795
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR"] = 1000156022] = "G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR";
796
+ /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16}. */
797
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR"] = 1000156023] = "G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR";
798
+ /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16}. */
799
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR"] = 1000156024] = "G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR";
800
+ /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16}. */
801
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR"] = 1000156025] = "G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR";
802
+ /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16}. */
803
+ VkFormat[VkFormat["G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR"] = 1000156026] = "G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR";
804
+ /** Alias of {@link VkFormat.G16B16G16R16_422_UNORM}. */
805
+ VkFormat[VkFormat["G16B16G16R16_422_UNORM_KHR"] = 1000156027] = "G16B16G16R16_422_UNORM_KHR";
806
+ /** Alias of {@link VkFormat.B16G16R16G16_422_UNORM}. */
807
+ VkFormat[VkFormat["B16G16R16G16_422_UNORM_KHR"] = 1000156028] = "B16G16R16G16_422_UNORM_KHR";
808
+ /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_420_UNORM}. */
809
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_420_UNORM_KHR"] = 1000156029] = "G16_B16_R16_3PLANE_420_UNORM_KHR";
810
+ /** Alias of {@link VkFormat.G16_B16R16_2PLANE_420_UNORM}. */
811
+ VkFormat[VkFormat["G16_B16R16_2PLANE_420_UNORM_KHR"] = 1000156030] = "G16_B16R16_2PLANE_420_UNORM_KHR";
812
+ /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_422_UNORM}. */
813
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_422_UNORM_KHR"] = 1000156031] = "G16_B16_R16_3PLANE_422_UNORM_KHR";
814
+ /** Alias of {@link VkFormat.G16_B16R16_2PLANE_422_UNORM}. */
815
+ VkFormat[VkFormat["G16_B16R16_2PLANE_422_UNORM_KHR"] = 1000156032] = "G16_B16R16_2PLANE_422_UNORM_KHR";
816
+ /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_444_UNORM}. */
817
+ VkFormat[VkFormat["G16_B16_R16_3PLANE_444_UNORM_KHR"] = 1000156033] = "G16_B16_R16_3PLANE_444_UNORM_KHR";
818
+ /** Alias of {@link VkFormat.G8_B8R8_2PLANE_444_UNORM}. */
819
+ VkFormat[VkFormat["G8_B8R8_2PLANE_444_UNORM_EXT"] = 100033e4] = "G8_B8R8_2PLANE_444_UNORM_EXT";
820
+ /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16}. */
821
+ VkFormat[VkFormat["G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT"] = 1000330001] = "G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT";
822
+ /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16}. */
823
+ VkFormat[VkFormat["G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT"] = 1000330002] = "G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT";
824
+ /** Alias of {@link VkFormat.G16_B16R16_2PLANE_444_UNORM}. */
825
+ VkFormat[VkFormat["G16_B16R16_2PLANE_444_UNORM_EXT"] = 1000330003] = "G16_B16R16_2PLANE_444_UNORM_EXT";
826
+ /** Alias of {@link VkFormat.A4R4G4B4_UNORM_PACK16}. */
827
+ VkFormat[VkFormat["A4R4G4B4_UNORM_PACK16_EXT"] = 100034e4] = "A4R4G4B4_UNORM_PACK16_EXT";
828
+ /** Alias of {@link VkFormat.A4B4G4R4_UNORM_PACK16}. */
829
+ VkFormat[VkFormat["A4B4G4R4_UNORM_PACK16_EXT"] = 1000340001] = "A4B4G4R4_UNORM_PACK16_EXT";
830
+ /** Alias of {@link VkFormat.R16G16_SFIXED5_NV}. */
831
+ VkFormat[VkFormat["R16G16_S10_5_NV"] = 1000464e3] = "R16G16_S10_5_NV";
832
+ /** Alias of {@link VkFormat.A1B5G5R5_UNORM_PACK16}. */
833
+ VkFormat[VkFormat["A1B5G5R5_UNORM_PACK16_KHR"] = 100047e4] = "A1B5G5R5_UNORM_PACK16_KHR";
834
+ /** Alias of {@link VkFormat.A8_UNORM}. */
835
+ VkFormat[VkFormat["A8_UNORM_KHR"] = 1000470001] = "A8_UNORM_KHR";
836
+ /** Largest enumerator value. Not a texture format. */
837
+ VkFormat[VkFormat["MAX_ENUM"] = 2147483647] = "MAX_ENUM";
838
+ return VkFormat;
839
+ }({});
840
+ //#endregion
841
+ //#region src/ris-ktx2/TextureFormatInfo.ts
842
+ /**
843
+ * Describes how a texture format is laid out in memory, in blocks.
844
+ *
845
+ * For uncompressed formats a block is one pixel:
846
+ * `blockWidth` and `blockHeight` are `1`, and `bytesPerBlock` is the bytes per pixel.
847
+ *
848
+ * For compressed formats such as BC7, a block is a group of pixels
849
+ * (typically 4×4) stored in a fixed number of bytes.
850
+ */
851
+ var TextureFormatInfo = class TextureFormatInfo {
852
+ /** Width of one block, in pixels. */
853
+ blockWidth;
854
+ /** Height of one block, in pixels. */
855
+ blockHeight;
856
+ /** Depth of one block, in pixels. */
857
+ blockDepth;
858
+ /** Size of one block, in bytes. */
859
+ bytesPerBlock;
860
+ /**
861
+ * Average number of bytes used per pixel.
862
+ *
863
+ * For uncompressed formats this is the bytes per pixel.
864
+ * For compressed formats this is the average storage cost per pixel.
865
+ */
866
+ get pixelSize() {
867
+ return this.bytesPerBlock / (this.blockWidth * this.blockHeight * this.blockDepth);
868
+ }
869
+ /**
870
+ * Creates a block-layout description.
871
+ *
872
+ * @param blockWidth - Block width, in pixels.
873
+ * @param blockHeight - Block height, in pixels.
874
+ * @param blockDepth - Block depth, in pixels.
875
+ * @param bytesPerBlock - Bytes stored in one block.
876
+ */
877
+ constructor(blockWidth, blockHeight, blockDepth, bytesPerBlock) {
878
+ this.blockWidth = blockWidth;
879
+ this.blockHeight = blockHeight;
880
+ this.blockDepth = blockDepth;
881
+ this.bytesPerBlock = bytesPerBlock;
882
+ }
883
+ /**
884
+ * Number of blocks needed to cover `width` pixels.
885
+ *
886
+ * @param width - Texture width, in pixels.
887
+ * @returns Block count, rounded up to a whole block.
888
+ */
889
+ getBlocksPerRow(width) {
890
+ return Math.ceil(width / this.blockWidth);
891
+ }
892
+ /**
893
+ * Number of block rows needed to cover `height` pixels.
894
+ *
895
+ * @param height - Texture height, in pixels.
896
+ * @returns Block-row count, rounded up to a whole block.
897
+ */
898
+ getBlocksPerColumn(height) {
899
+ return Math.ceil(height / this.blockHeight);
900
+ }
901
+ /**
902
+ * Number of block slices needed to cover `depth` pixels.
903
+ *
904
+ * @param depth - Texture depth, in pixels.
905
+ * @returns Block-slice count, rounded up to a whole block.
906
+ */
907
+ getBlocksPerSlice(depth) {
908
+ return Math.ceil(depth / this.blockDepth);
909
+ }
910
+ /**
911
+ * Unaligned number of bytes in one row of blocks.
912
+ *
913
+ * @param width - Texture width, in pixels.
914
+ * @returns Bytes per row, without a 256-byte alignment.
915
+ */
916
+ getBytesPerRow(width) {
917
+ return this.getBlocksPerRow(width) * this.bytesPerBlock;
918
+ }
919
+ /**
920
+ * WebGPU `bytesPerRow` for `width`.
921
+ *
922
+ * WebGPU requires `bytesPerRow` to be a multiple of 256.
923
+ *
924
+ * @param width - Texture width, in pixels.
925
+ * @returns `getBytesPerRow(width)` rounded up to a multiple of 256.
926
+ */
927
+ getAlignedBytesPerRow(width) {
928
+ const bytesPerRow = this.getBytesPerRow(width);
929
+ return Math.ceil(bytesPerRow / 256) * 256;
930
+ }
931
+ /**
932
+ * Byte size of one 2D mip level.
933
+ *
934
+ * @param width - Level width, in pixels.
935
+ * @param height - Level height, in pixels.
936
+ * @returns Level size, in bytes.
937
+ */
938
+ getDataSize(width, height) {
939
+ return this.getBlocksPerRow(width) * this.getBlocksPerColumn(height) * this.bytesPerBlock;
940
+ }
941
+ /**
942
+ * Byte size of one 3D mip level.
943
+ *
944
+ * @param width - Level width, in pixels.
945
+ * @param height - Level height, in pixels.
946
+ * @param depth - Level depth, in pixels.
947
+ * @returns Level size, in bytes.
948
+ */
949
+ getDataSize3D(width, height, depth) {
950
+ const blocksX = this.getBlocksPerRow(width);
951
+ const blocksY = this.getBlocksPerColumn(height);
952
+ const blocksZ = this.getBlocksPerSlice(depth);
953
+ return blocksX * blocksY * blocksZ * this.bytesPerBlock;
954
+ }
955
+ /**
956
+ * BC7 layout: 4×4 blocks, 16 bytes per block.
957
+ *
958
+ * @returns The BC7 {@link TextureFormatInfo}.
959
+ */
960
+ static bc7() {
961
+ return new TextureFormatInfo(4, 4, 1, 16);
962
+ }
963
+ /**
964
+ * BC3 layout: 4×4 blocks, 16 bytes per block.
965
+ *
966
+ * @returns The BC3 {@link TextureFormatInfo}.
967
+ */
968
+ static bc3() {
969
+ return new TextureFormatInfo(4, 4, 1, 16);
970
+ }
971
+ /**
972
+ * ETC2 RGBA layout: 4×4 blocks, 16 bytes per block.
973
+ *
974
+ * @returns The ETC2 RGBA {@link TextureFormatInfo}.
975
+ */
976
+ static etc2rgba() {
977
+ return new TextureFormatInfo(4, 4, 1, 16);
978
+ }
979
+ /**
980
+ * ASTC 4×4 RGBA layout: 4×4 blocks, 16 bytes per block.
981
+ *
982
+ * @returns The ASTC 4×4 RGBA {@link TextureFormatInfo}.
983
+ */
984
+ static astc4x4rgba() {
985
+ return new TextureFormatInfo(4, 4, 1, 16);
986
+ }
987
+ /**
988
+ * Uncompressed 8-bit 4-channel layout: 1×1 blocks, 4 bytes per pixel.
989
+ *
990
+ * Channel order does not change the size. `B8G8R8A8_*` and
991
+ * `A8B8G8R8_*_PACK32` use this same layout.
992
+ *
993
+ * @returns The 4-byte {@link TextureFormatInfo}.
994
+ */
995
+ static rgba32() {
996
+ return new TextureFormatInfo(1, 1, 1, 4);
997
+ }
998
+ /**
999
+ * `D24_UNORM_S8_UINT` layout: 4 bytes per pixel.
1000
+ *
1001
+ * @returns The depth/stencil {@link TextureFormatInfo}.
1002
+ */
1003
+ static depth24Stencil8() {
1004
+ return new TextureFormatInfo(1, 1, 1, 4);
1005
+ }
1006
+ /**
1007
+ * `D32_SFLOAT` layout: 4 bytes per pixel.
1008
+ *
1009
+ * @returns The 32-bit float depth {@link TextureFormatInfo}.
1010
+ */
1011
+ static depth32float() {
1012
+ return new TextureFormatInfo(1, 1, 1, 4);
1013
+ }
1014
+ /**
1015
+ * Block layout for a Vulkan format this package knows how to size.
1016
+ *
1017
+ * sRGB, signed, integer, and scaled variants share the block size of the
1018
+ * matching unsigned normalized format. Channel order does not change the
1019
+ * byte size.
1020
+ *
1021
+ * - `R8G8B8A8_*`, `B8G8R8A8_*`, and `A8B8G8R8_*_PACK32` use {@link TextureFormatInfo.rgba32}.
1022
+ * - `D24_UNORM_S8_UINT` uses {@link TextureFormatInfo.depth24Stencil8}.
1023
+ * - `D32_SFLOAT` uses {@link TextureFormatInfo.depth32float}.
1024
+ * - `BC3_UNORM_BLOCK` and `BC3_SRGB_BLOCK` use {@link TextureFormatInfo.bc3}.
1025
+ * - `BC7_UNORM_BLOCK` and `BC7_SRGB_BLOCK` use {@link TextureFormatInfo.bc7}.
1026
+ * - `ETC2_R8G8B8A8_UNORM_BLOCK` and `ETC2_R8G8B8A8_SRGB_BLOCK` use {@link TextureFormatInfo.etc2rgba}.
1027
+ * - `ASTC_4X4_UNORM_BLOCK`, `ASTC_4X4_SRGB_BLOCK`, and `ASTC_4X4_SFLOAT_BLOCK`
1028
+ * use {@link TextureFormatInfo.astc4x4rgba}. `ASTC_4X4_SFLOAT_BLOCK_EXT`
1029
+ * is the same value as `ASTC_4X4_SFLOAT_BLOCK`.
1030
+ *
1031
+ * @param vkFormat - Vulkan format.
1032
+ * @returns The matching layout.
1033
+ * @throws {Error} When `vkFormat` has no layout in this package.
1034
+ */
1035
+ static fromVkFormat(vkFormat) {
1036
+ switch (vkFormat) {
1037
+ case VkFormat.R8G8B8A8_UNORM:
1038
+ case VkFormat.R8G8B8A8_SNORM:
1039
+ case VkFormat.R8G8B8A8_USCALED:
1040
+ case VkFormat.R8G8B8A8_SSCALED:
1041
+ case VkFormat.R8G8B8A8_UINT:
1042
+ case VkFormat.R8G8B8A8_SINT:
1043
+ case VkFormat.R8G8B8A8_SRGB:
1044
+ case VkFormat.B8G8R8A8_UNORM:
1045
+ case VkFormat.B8G8R8A8_SNORM:
1046
+ case VkFormat.B8G8R8A8_USCALED:
1047
+ case VkFormat.B8G8R8A8_SSCALED:
1048
+ case VkFormat.B8G8R8A8_UINT:
1049
+ case VkFormat.B8G8R8A8_SINT:
1050
+ case VkFormat.B8G8R8A8_SRGB:
1051
+ case VkFormat.A8B8G8R8_UNORM_PACK32:
1052
+ case VkFormat.A8B8G8R8_SNORM_PACK32:
1053
+ case VkFormat.A8B8G8R8_USCALED_PACK32:
1054
+ case VkFormat.A8B8G8R8_SSCALED_PACK32:
1055
+ case VkFormat.A8B8G8R8_UINT_PACK32:
1056
+ case VkFormat.A8B8G8R8_SINT_PACK32:
1057
+ case VkFormat.A8B8G8R8_SRGB_PACK32: return this.rgba32();
1058
+ case VkFormat.D24_UNORM_S8_UINT: return this.depth24Stencil8();
1059
+ case VkFormat.D32_SFLOAT: return this.depth32float();
1060
+ case VkFormat.ASTC_4X4_UNORM_BLOCK:
1061
+ case VkFormat.ASTC_4X4_SRGB_BLOCK:
1062
+ case VkFormat.ASTC_4X4_SFLOAT_BLOCK: return this.astc4x4rgba();
1063
+ case VkFormat.BC7_UNORM_BLOCK:
1064
+ case VkFormat.BC7_SRGB_BLOCK: return this.bc7();
1065
+ case VkFormat.BC3_UNORM_BLOCK:
1066
+ case VkFormat.BC3_SRGB_BLOCK: return this.bc3();
1067
+ case VkFormat.ETC2_R8G8B8A8_UNORM_BLOCK:
1068
+ case VkFormat.ETC2_R8G8B8A8_SRGB_BLOCK: return this.etc2rgba();
1069
+ default: throw new Error(`TextureFormatInfo.fromVkFormat has no layout for VkFormat ${vkFormat}.`);
1070
+ }
1071
+ }
1072
+ };
1073
+ //#endregion
1074
+ //#region src/ris-ktx2/KtxErrorCode.ts
1075
+ /**
1076
+ * Result codes returned by KTX2 texture operations.
1077
+ *
1078
+ * Names and numeric values match libktx `ktx_error_code_e`.
1079
+ * `KTX_ERROR_MAX_ENUM` is not a member: in libktx it aliases
1080
+ * {@link KtxErrorCode.DECOMPRESS_CHECKSUM_ERROR} and is not a distinct result.
1081
+ */
1082
+ var KtxErrorCode = /* @__PURE__ */ function(KtxErrorCode) {
1083
+ /** The operation succeeded. */
1084
+ KtxErrorCode[KtxErrorCode["SUCCESS"] = 0] = "SUCCESS";
1085
+ /** The file data does not match the KTX specification. */
1086
+ KtxErrorCode[KtxErrorCode["FILE_DATA_ERROR"] = 1] = "FILE_DATA_ERROR";
1087
+ /** The file is a pipe or a named pipe. */
1088
+ KtxErrorCode[KtxErrorCode["FILE_ISPIPE"] = 2] = "FILE_ISPIPE";
1089
+ /** The target file could not be opened. */
1090
+ KtxErrorCode[KtxErrorCode["FILE_OPEN_FAILED"] = 3] = "FILE_OPEN_FAILED";
1091
+ /** The operation would exceed the maximum file size. */
1092
+ KtxErrorCode[KtxErrorCode["FILE_OVERFLOW"] = 4] = "FILE_OVERFLOW";
1093
+ /** Reading the file failed. */
1094
+ KtxErrorCode[KtxErrorCode["FILE_READ_ERROR"] = 5] = "FILE_READ_ERROR";
1095
+ /** Seeking in the file failed. */
1096
+ KtxErrorCode[KtxErrorCode["FILE_SEEK_ERROR"] = 6] = "FILE_SEEK_ERROR";
1097
+ /** The file ended before the requested data was read. */
1098
+ KtxErrorCode[KtxErrorCode["FILE_UNEXPECTED_EOF"] = 7] = "FILE_UNEXPECTED_EOF";
1099
+ /** Writing the file failed. */
1100
+ KtxErrorCode[KtxErrorCode["FILE_WRITE_ERROR"] = 8] = "FILE_WRITE_ERROR";
1101
+ /** An OpenGL call failed. */
1102
+ KtxErrorCode[KtxErrorCode["GL_ERROR"] = 9] = "GL_ERROR";
1103
+ /** The operation is not allowed in the current state. */
1104
+ KtxErrorCode[KtxErrorCode["INVALID_OPERATION"] = 10] = "INVALID_OPERATION";
1105
+ /** A parameter value was not valid. */
1106
+ KtxErrorCode[KtxErrorCode["INVALID_VALUE"] = 11] = "INVALID_VALUE";
1107
+ /** A metadata key was missing, or a required GPU entry point was not found. */
1108
+ KtxErrorCode[KtxErrorCode["NOT_FOUND"] = 12] = "NOT_FOUND";
1109
+ /** Not enough memory to complete the operation. */
1110
+ KtxErrorCode[KtxErrorCode["OUT_OF_MEMORY"] = 13] = "OUT_OF_MEMORY";
1111
+ /** Transcoding a block-compressed texture failed. */
1112
+ KtxErrorCode[KtxErrorCode["TRANSCODE_FAILED"] = 14] = "TRANSCODE_FAILED";
1113
+ /** The file is not a KTX file. */
1114
+ KtxErrorCode[KtxErrorCode["UNKNOWN_FILE_FORMAT"] = 15] = "UNKNOWN_FILE_FORMAT";
1115
+ /** The file requests a texture type this library does not support. */
1116
+ KtxErrorCode[KtxErrorCode["UNSUPPORTED_TEXTURE_TYPE"] = 16] = "UNSUPPORTED_TEXTURE_TYPE";
1117
+ /** The feature is not built into this library, or it is not implemented yet. */
1118
+ KtxErrorCode[KtxErrorCode["UNSUPPORTED_FEATURE"] = 17] = "UNSUPPORTED_FEATURE";
1119
+ /** An OpenGL or Vulkan dependency is not linked into the application. */
1120
+ KtxErrorCode[KtxErrorCode["LIBRARY_NOT_LINKED"] = 18] = "LIBRARY_NOT_LINKED";
1121
+ /** The decompressed byte count does not match the expected size. */
1122
+ KtxErrorCode[KtxErrorCode["DECOMPRESS_LENGTH_ERROR"] = 19] = "DECOMPRESS_LENGTH_ERROR";
1123
+ /** A checksum did not match while decompressing. */
1124
+ KtxErrorCode[KtxErrorCode["DECOMPRESS_CHECKSUM_ERROR"] = 20] = "DECOMPRESS_CHECKSUM_ERROR";
1125
+ return KtxErrorCode;
1126
+ }({});
1127
+ //#endregion
1128
+ export { KtxCreateStorage, KtxErrorCode, KtxTranscodeFlags, KtxTranscodeFormat, KtxUastcFlags, TextureFormatInfo, VkFormat };
1129
+
1130
+ //# sourceMappingURL=index.js.map