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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/ris-ktx2/KtxUastcFlags.ts","../src/ris-ktx2/KtxCreateStorage.ts","../src/ris-ktx2/KtxTranscodeFlags.ts","../src/ris-ktx2/KtxTranscodeFormat.ts","../src/ris-ktx2/VkFormat.ts","../src/ris-ktx2/TextureFormatInfo.ts","../src/ris-ktx2/KtxErrorCode.ts"],"sourcesContent":["/**\n * UASTC encoding configuration flags.\n *\n * Packed bitfield matching libktx `ktx_pack_uastc_flag_bits_e`.\n * Bits 0–3 hold the compression level ({@link KtxUastcFlags.LEVEL_MASK}).\n * {@link KtxUastcFlags.FAVOR_UASTC_ERROR} is `8`, so it sits inside that mask:\n * combining it with a level changes the value `LEVEL_MASK` extracts.\n * Hints at bit 4 and above (`16`, `64`, `128`, `256`) combine with a level\n * with bitwise OR and leave bits 0–3 unchanged.\n */\nexport enum KtxUastcFlags {\n /**\n * Fastest compression (lowest quality, highest speed). About 43.45 dB.\n */\n LEVEL_FASTEST = 0,\n\n /**\n * Faster compression. About 46.49 dB.\n */\n LEVEL_FASTER = 1,\n\n /**\n * Default compression level. About 47.47 dB.\n */\n LEVEL_DEFAULT = 2,\n\n /**\n * Slower compression (higher quality). About 48.01 dB.\n */\n LEVEL_SLOWER = 3,\n\n /**\n * Very slow compression (highest quality). About 48.24 dB.\n */\n LEVEL_VERY_SLOW = 4,\n\n /**\n * Mask for the compression level in bits 0–3.\n */\n LEVEL_MASK = 15,\n\n /**\n * Optimize encoding for the lowest UASTC reconstruction error.\n */\n FAVOR_UASTC_ERROR = 8,\n\n /**\n * Optimize encoding for the lowest BC7 decode error.\n */\n FAVOR_BC7_ERROR = 16,\n\n /**\n * Hint to optimize for faster ETC1 transcoding.\n */\n ETC1_FASTER_HINTS = 64,\n\n /**\n * Hint to optimize for the fastest ETC1 transcoding.\n */\n ETC1_FASTEST_HINTS = 128,\n\n /**\n * Disables flip-and-individual optimizations for ETC1 transcoding.\n */\n ETC1_DISABLE_FLIP_AND_INDIVIDUAL = 256,\n}\n","/**\n * How image storage is allocated when a KTX2 texture is created.\n *\n * Values match libktx `ktxTextureCreateStorageEnum`:\n * `KTX_TEXTURE_CREATE_NO_STORAGE` is `0` and\n * `KTX_TEXTURE_CREATE_ALLOC_STORAGE` is `1`.\n */\nexport enum KtxCreateStorage {\n /** Do not allocate image storage. */\n NO_STORAGE = 0,\n\n /** Allocate image storage for the texture. */\n ALLOC_STORAGE = 1,\n}\n","/**\n * Flags that select options for Basis Universal transcoding.\n *\n * Numeric values match the libktx `ktx_transcode_flag_bits_e` enumerators.\n * Combine them with bitwise OR when more than one option applies.\n */\nexport enum KtxTranscodeFlags {\n /** No special transcoding options. */\n NONE = 0,\n\n /**\n * For PVRTC1, decode a non-power-of-two ETC1S level to the next larger\n * power of two.\n *\n * libktx still documents this option as not implemented. It is ignored\n * when the slice dimensions are already powers of two.\n */\n PVRTC_DECODE_TO_NEXT_POW2 = 2,\n\n /**\n * When transcoding to an opaque format, decode the alpha slice instead of\n * the color slice if the Basis data has alpha. Has no effect when there\n * is no alpha data.\n */\n TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS = 4,\n\n /**\n * Request a higher-quality transcode of UASTC to BC1, BC3, ETC2 EAC R11,\n * or ETC2 EAC RG11. Unused by other UASTC transcode targets.\n */\n HIGH_QUALITY = 32,\n}\n","/**\n * Target formats for transcoding a Basis Universal (ETC1S or UASTC) texture.\n *\n * Numeric values match the libktx `ktx_transcode_fmt_e` enumerators.\n * Gaps in the numbering are formats libktx does not expose (there is no\n * equivalent `VkFormat` for the omitted targets).\n */\nexport enum KtxTranscodeFormat {\n /**\n * Opaque ETC1 RGB. Returns alpha data instead when\n * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.\n */\n KTX_TTF_ETC1_RGB = 0,\n\n /**\n * ETC2 RGBA. An EAC alpha block followed by an ETC1 block.\n * Textures without alpha get an opaque alpha channel.\n */\n ETC2_RGBA = 1,\n\n /**\n * Opaque BC1 RGB. Returns alpha data instead when\n * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.\n */\n KTX_TTF_BC1_RGB = 2,\n\n /**\n * BC3 compressed RGBA.\n * Common on desktop devices. Widely supported block compression for color textures.\n */\n BC3_RGBA = 3,\n\n /**\n * Single-channel BC4. The red channel is the opaque or alpha green component,\n * depending on {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS}.\n */\n KTX_TTF_BC4_R = 4,\n\n /**\n * Two-channel BC5 (red and green). Intended for tangent-space normal maps.\n * The texture should have an alpha channel; otherwise green is 255.\n */\n KTX_TTF_BC5_RG = 5,\n\n /**\n * BC7 compressed RGBA.\n * High quality block compression for color textures.\n * Supports an alpha channel and is suitable for diffuse and physically based textures.\n */\n BC7_RGBA = 6,\n\n /**\n * Opaque PVRTC1 4bpp RGB. Returns alpha data instead when\n * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS} is set.\n */\n KTX_TTF_PVRTC1_4_RGB = 8,\n\n /**\n * PVRTC1 4bpp RGBA. Useful for simple opacity maps.\n * If the texture has no alpha channel, PVRTC1 4bpp RGB is used instead.\n */\n KTX_TTF_PVRTC1_4_RGBA = 9,\n\n /**\n * ASTC 4×4 RGBA.\n * Common on mobile devices, especially Apple. High quality block compression\n * for color textures, including an alpha channel.\n */\n ASTC_4X4_RGBA = 10,\n\n /**\n * Uncompressed 32bpp RGBA in raster order (R, G, B, A).\n * Supported on all devices.\n */\n RGBA32 = 13,\n\n /** Uncompressed 16bpp RGB565 in raster order, with red in the high bits. */\n KTX_TTF_RGB565 = 14,\n\n /** Uncompressed 16bpp BGR565 in raster order, with red in the low bits. */\n KTX_TTF_BGR565 = 15,\n\n /** Uncompressed 16bpp RGBA4444 in raster order. */\n KTX_TTF_RGBA4444 = 16,\n\n /**\n * Opaque PVRTC2 4bpp RGB. Supports arbitrary dimensions, unlike PVRTC1.\n */\n KTX_TTF_PVRTC2_4_RGB = 18,\n\n /** PVRTC2 4bpp RGBA. Premultiplied alpha is recommended. */\n KTX_TTF_PVRTC2_4_RGBA = 19,\n\n /**\n * Unsigned ETC2 EAC R11. The red channel is the opaque or alpha green\n * component, depending on\n * {@link KtxTranscodeFlags.TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS}.\n */\n KTX_TTF_ETC2_EAC_R11 = 20,\n\n /**\n * Unsigned ETC2 EAC RG11. Intended for tangent-space normal maps.\n * The texture should have an alpha channel; otherwise green is 255.\n */\n KTX_TTF_ETC2_EAC_RG11 = 21,\n\n /**\n * Selects {@link KtxTranscodeFormat.KTX_TTF_ETC1_RGB} or\n * {@link KtxTranscodeFormat.ETC2_RGBA} according to whether the texture has alpha.\n */\n KTX_TTF_ETC = 22,\n\n /**\n * Selects {@link KtxTranscodeFormat.KTX_TTF_BC1_RGB} or\n * {@link KtxTranscodeFormat.BC3_RGBA} according to whether the texture has alpha.\n */\n BC1_OR_3 = 23,\n\n /** No transcode format selected. */\n NO_SELECTION = 2147483647,\n}\n","/**\n * Vulkan `VkFormat` enumerators.\n *\n * Names and numeric values match the Vulkan API so they can be stored in\n * KTX2 files and passed through to graphics APIs. Extension enumerators that\n * share a value with a core enumerator are documented as aliases.\n * See THIRD_PARTY_NOTICES.md.\n */\nexport enum VkFormat {\n /** No format is specified. */\n UNDEFINED = 0,\n /** 4-bit red and green, unsigned normalized, packed into an 8-bit word. */\n R4G4_UNORM_PACK8 = 1,\n /** 4-bit red, green, blue, and alpha, unsigned normalized, packed into a 16-bit word. */\n R4G4B4A4_UNORM_PACK16 = 2,\n /** 4-bit blue, green, red, and alpha, unsigned normalized, packed into a 16-bit word. */\n B4G4R4A4_UNORM_PACK16 = 3,\n /** 5-bit red, 6-bit green, and 5-bit blue, unsigned normalized, packed into a 16-bit word. */\n R5G6B5_UNORM_PACK16 = 4,\n /** 5-bit blue, 6-bit green, and 5-bit red, unsigned normalized, packed into a 16-bit word. */\n B5G6R5_UNORM_PACK16 = 5,\n /** 5-bit red, 5-bit green, 5-bit blue, and 1-bit alpha, unsigned normalized, packed into a 16-bit word. */\n R5G5B5A1_UNORM_PACK16 = 6,\n /** 5-bit blue, 5-bit green, 5-bit red, and 1-bit alpha, unsigned normalized, packed into a 16-bit word. */\n B5G5R5A1_UNORM_PACK16 = 7,\n /** 1-bit alpha, 5-bit red, 5-bit green, and 5-bit blue, unsigned normalized, packed into a 16-bit word. */\n A1R5G5B5_UNORM_PACK16 = 8,\n /** 8-bit red, unsigned normalized. */\n R8_UNORM = 9,\n /** 8-bit red, signed normalized. */\n R8_SNORM = 10,\n /** 8-bit red, unsigned scaled. */\n R8_USCALED = 11,\n /** 8-bit red, signed scaled. */\n R8_SSCALED = 12,\n /** 8-bit red, unsigned integer. */\n R8_UINT = 13,\n /** 8-bit red, signed integer. */\n R8_SINT = 14,\n /** 8-bit red, sRGB. */\n R8_SRGB = 15,\n /** 8-bit red and green, unsigned normalized. */\n R8G8_UNORM = 16,\n /** 8-bit red and green, signed normalized. */\n R8G8_SNORM = 17,\n /** 8-bit red and green, unsigned scaled. */\n R8G8_USCALED = 18,\n /** 8-bit red and green, signed scaled. */\n R8G8_SSCALED = 19,\n /** 8-bit red and green, unsigned integer. */\n R8G8_UINT = 20,\n /** 8-bit red and green, signed integer. */\n R8G8_SINT = 21,\n /** 8-bit red and green, sRGB. */\n R8G8_SRGB = 22,\n /** 8-bit red, green, and blue, unsigned normalized. */\n R8G8B8_UNORM = 23,\n /** 8-bit red, green, and blue, signed normalized. */\n R8G8B8_SNORM = 24,\n /** 8-bit red, green, and blue, unsigned scaled. */\n R8G8B8_USCALED = 25,\n /** 8-bit red, green, and blue, signed scaled. */\n R8G8B8_SSCALED = 26,\n /** 8-bit red, green, and blue, unsigned integer. */\n R8G8B8_UINT = 27,\n /** 8-bit red, green, and blue, signed integer. */\n R8G8B8_SINT = 28,\n /** 8-bit red, green, and blue, sRGB. */\n R8G8B8_SRGB = 29,\n /** 8-bit blue, green, and red, unsigned normalized. */\n B8G8R8_UNORM = 30,\n /** 8-bit blue, green, and red, signed normalized. */\n B8G8R8_SNORM = 31,\n /** 8-bit blue, green, and red, unsigned scaled. */\n B8G8R8_USCALED = 32,\n /** 8-bit blue, green, and red, signed scaled. */\n B8G8R8_SSCALED = 33,\n /** 8-bit blue, green, and red, unsigned integer. */\n B8G8R8_UINT = 34,\n /** 8-bit blue, green, and red, signed integer. */\n B8G8R8_SINT = 35,\n /** 8-bit blue, green, and red, sRGB. */\n B8G8R8_SRGB = 36,\n /** 8-bit red, green, blue, and alpha, unsigned normalized. */\n R8G8B8A8_UNORM = 37,\n /** 8-bit red, green, blue, and alpha, signed normalized. */\n R8G8B8A8_SNORM = 38,\n /** 8-bit red, green, blue, and alpha, unsigned scaled. */\n R8G8B8A8_USCALED = 39,\n /** 8-bit red, green, blue, and alpha, signed scaled. */\n R8G8B8A8_SSCALED = 40,\n /** 8-bit red, green, blue, and alpha, unsigned integer. */\n R8G8B8A8_UINT = 41,\n /** 8-bit red, green, blue, and alpha, signed integer. */\n R8G8B8A8_SINT = 42,\n /** 8-bit red, green, blue, and alpha, sRGB. */\n R8G8B8A8_SRGB = 43,\n /** 8-bit blue, green, red, and alpha, unsigned normalized. */\n B8G8R8A8_UNORM = 44,\n /** 8-bit blue, green, red, and alpha, signed normalized. */\n B8G8R8A8_SNORM = 45,\n /** 8-bit blue, green, red, and alpha, unsigned scaled. */\n B8G8R8A8_USCALED = 46,\n /** 8-bit blue, green, red, and alpha, signed scaled. */\n B8G8R8A8_SSCALED = 47,\n /** 8-bit blue, green, red, and alpha, unsigned integer. */\n B8G8R8A8_UINT = 48,\n /** 8-bit blue, green, red, and alpha, signed integer. */\n B8G8R8A8_SINT = 49,\n /** 8-bit blue, green, red, and alpha, sRGB. */\n B8G8R8A8_SRGB = 50,\n /** 8-bit alpha, blue, green, and red, unsigned normalized, packed into a 32-bit word. */\n A8B8G8R8_UNORM_PACK32 = 51,\n /** 8-bit alpha, blue, green, and red, signed normalized, packed into a 32-bit word. */\n A8B8G8R8_SNORM_PACK32 = 52,\n /** 8-bit alpha, blue, green, and red, unsigned scaled, packed into a 32-bit word. */\n A8B8G8R8_USCALED_PACK32 = 53,\n /** 8-bit alpha, blue, green, and red, signed scaled, packed into a 32-bit word. */\n A8B8G8R8_SSCALED_PACK32 = 54,\n /** 8-bit alpha, blue, green, and red, unsigned integer, packed into a 32-bit word. */\n A8B8G8R8_UINT_PACK32 = 55,\n /** 8-bit alpha, blue, green, and red, signed integer, packed into a 32-bit word. */\n A8B8G8R8_SINT_PACK32 = 56,\n /** 8-bit alpha, blue, green, and red, sRGB, packed into a 32-bit word. */\n A8B8G8R8_SRGB_PACK32 = 57,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned normalized, packed into a 32-bit word. */\n A2R10G10B10_UNORM_PACK32 = 58,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed normalized, packed into a 32-bit word. */\n A2R10G10B10_SNORM_PACK32 = 59,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned scaled, packed into a 32-bit word. */\n A2R10G10B10_USCALED_PACK32 = 60,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed scaled, packed into a 32-bit word. */\n A2R10G10B10_SSCALED_PACK32 = 61,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, unsigned integer, packed into a 32-bit word. */\n A2R10G10B10_UINT_PACK32 = 62,\n /** 2-bit alpha, 10-bit red, 10-bit green, and 10-bit blue, signed integer, packed into a 32-bit word. */\n A2R10G10B10_SINT_PACK32 = 63,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned normalized, packed into a 32-bit word. */\n A2B10G10R10_UNORM_PACK32 = 64,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed normalized, packed into a 32-bit word. */\n A2B10G10R10_SNORM_PACK32 = 65,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned scaled, packed into a 32-bit word. */\n A2B10G10R10_USCALED_PACK32 = 66,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed scaled, packed into a 32-bit word. */\n A2B10G10R10_SSCALED_PACK32 = 67,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, unsigned integer, packed into a 32-bit word. */\n A2B10G10R10_UINT_PACK32 = 68,\n /** 2-bit alpha, 10-bit blue, 10-bit green, and 10-bit red, signed integer, packed into a 32-bit word. */\n A2B10G10R10_SINT_PACK32 = 69,\n /** 16-bit red, unsigned normalized. */\n R16_UNORM = 70,\n /** 16-bit red, signed normalized. */\n R16_SNORM = 71,\n /** 16-bit red, unsigned scaled. */\n R16_USCALED = 72,\n /** 16-bit red, signed scaled. */\n R16_SSCALED = 73,\n /** 16-bit red, unsigned integer. */\n R16_UINT = 74,\n /** 16-bit red, signed integer. */\n R16_SINT = 75,\n /** 16-bit red, signed floating-point. */\n R16_SFLOAT = 76,\n /** 16-bit red and green, unsigned normalized. */\n R16G16_UNORM = 77,\n /** 16-bit red and green, signed normalized. */\n R16G16_SNORM = 78,\n /** 16-bit red and green, unsigned scaled. */\n R16G16_USCALED = 79,\n /** 16-bit red and green, signed scaled. */\n R16G16_SSCALED = 80,\n /** 16-bit red and green, unsigned integer. */\n R16G16_UINT = 81,\n /** 16-bit red and green, signed integer. */\n R16G16_SINT = 82,\n /** 16-bit red and green, signed floating-point. */\n R16G16_SFLOAT = 83,\n /** 16-bit red, green, and blue, unsigned normalized. */\n R16G16B16_UNORM = 84,\n /** 16-bit red, green, and blue, signed normalized. */\n R16G16B16_SNORM = 85,\n /** 16-bit red, green, and blue, unsigned scaled. */\n R16G16B16_USCALED = 86,\n /** 16-bit red, green, and blue, signed scaled. */\n R16G16B16_SSCALED = 87,\n /** 16-bit red, green, and blue, unsigned integer. */\n R16G16B16_UINT = 88,\n /** 16-bit red, green, and blue, signed integer. */\n R16G16B16_SINT = 89,\n /** 16-bit red, green, and blue, signed floating-point. */\n R16G16B16_SFLOAT = 90,\n /** 16-bit red, green, blue, and alpha, unsigned normalized. */\n R16G16B16A16_UNORM = 91,\n /** 16-bit red, green, blue, and alpha, signed normalized. */\n R16G16B16A16_SNORM = 92,\n /** 16-bit red, green, blue, and alpha, unsigned scaled. */\n R16G16B16A16_USCALED = 93,\n /** 16-bit red, green, blue, and alpha, signed scaled. */\n R16G16B16A16_SSCALED = 94,\n /** 16-bit red, green, blue, and alpha, unsigned integer. */\n R16G16B16A16_UINT = 95,\n /** 16-bit red, green, blue, and alpha, signed integer. */\n R16G16B16A16_SINT = 96,\n /** 16-bit red, green, blue, and alpha, signed floating-point. */\n R16G16B16A16_SFLOAT = 97,\n /** 32-bit red, unsigned integer. */\n R32_UINT = 98,\n /** 32-bit red, signed integer. */\n R32_SINT = 99,\n /** 32-bit red, signed floating-point. */\n R32_SFLOAT = 100,\n /** 32-bit red and green, unsigned integer. */\n R32G32_UINT = 101,\n /** 32-bit red and green, signed integer. */\n R32G32_SINT = 102,\n /** 32-bit red and green, signed floating-point. */\n R32G32_SFLOAT = 103,\n /** 32-bit red, green, and blue, unsigned integer. */\n R32G32B32_UINT = 104,\n /** 32-bit red, green, and blue, signed integer. */\n R32G32B32_SINT = 105,\n /** 32-bit red, green, and blue, signed floating-point. */\n R32G32B32_SFLOAT = 106,\n /** 32-bit red, green, blue, and alpha, unsigned integer. */\n R32G32B32A32_UINT = 107,\n /** 32-bit red, green, blue, and alpha, signed integer. */\n R32G32B32A32_SINT = 108,\n /** 32-bit red, green, blue, and alpha, signed floating-point. */\n R32G32B32A32_SFLOAT = 109,\n /** 64-bit red, unsigned integer. */\n R64_UINT = 110,\n /** 64-bit red, signed integer. */\n R64_SINT = 111,\n /** 64-bit red, signed floating-point. */\n R64_SFLOAT = 112,\n /** 64-bit red and green, unsigned integer. */\n R64G64_UINT = 113,\n /** 64-bit red and green, signed integer. */\n R64G64_SINT = 114,\n /** 64-bit red and green, signed floating-point. */\n R64G64_SFLOAT = 115,\n /** 64-bit red, green, and blue, unsigned integer. */\n R64G64B64_UINT = 116,\n /** 64-bit red, green, and blue, signed integer. */\n R64G64B64_SINT = 117,\n /** 64-bit red, green, and blue, signed floating-point. */\n R64G64B64_SFLOAT = 118,\n /** 64-bit red, green, blue, and alpha, unsigned integer. */\n R64G64B64A64_UINT = 119,\n /** 64-bit red, green, blue, and alpha, signed integer. */\n R64G64B64A64_SINT = 120,\n /** 64-bit red, green, blue, and alpha, signed floating-point. */\n R64G64B64A64_SFLOAT = 121,\n /** 10-bit blue, 11-bit green, and 11-bit red, unsigned floating-point, packed into a 32-bit word. */\n B10G11R11_UFLOAT_PACK32 = 122,\n /** 5-bit shared exponent, 9-bit blue, 9-bit green, and 9-bit red, unsigned floating-point, packed into a 32-bit word. */\n E5B9G9R9_UFLOAT_PACK32 = 123,\n /** 16-bit unsigned normalized depth. */\n D16_UNORM = 124,\n /** 24-bit unsigned normalized depth packed into a 32-bit word with 8 unused bits. */\n X8_D24_UNORM_PACK32 = 125,\n /** 32-bit signed floating-point depth. */\n D32_SFLOAT = 126,\n /** 8-bit unsigned integer stencil. */\n S8_UINT = 127,\n /** 16-bit unsigned normalized depth and 8-bit unsigned integer stencil. */\n D16_UNORM_S8_UINT = 128,\n /** 24-bit unsigned normalized depth and 8-bit unsigned integer stencil. */\n D24_UNORM_S8_UINT = 129,\n /** 32-bit signed floating-point depth and 8-bit unsigned integer stencil. */\n D32_SFLOAT_S8_UINT = 130,\n /** 4×4 BC1 RGB block compression, unsigned normalized (8 bytes per block). */\n BC1_RGB_UNORM_BLOCK = 131,\n /** 4×4 BC1 RGB block compression, sRGB (8 bytes per block). */\n BC1_RGB_SRGB_BLOCK = 132,\n /** 4×4 BC1 RGBA block compression with punch-through alpha, unsigned normalized (8 bytes per block). */\n BC1_RGBA_UNORM_BLOCK = 133,\n /** 4×4 BC1 RGBA block compression with punch-through alpha, sRGB (8 bytes per block). */\n BC1_RGBA_SRGB_BLOCK = 134,\n /** 4×4 BC2 RGBA block compression, unsigned normalized (16 bytes per block). */\n BC2_UNORM_BLOCK = 135,\n /** 4×4 BC2 RGBA block compression, sRGB (16 bytes per block). */\n BC2_SRGB_BLOCK = 136,\n /** 4×4 BC3 RGBA block compression, unsigned normalized (16 bytes per block). */\n BC3_UNORM_BLOCK = 137,\n /** 4×4 BC3 RGBA block compression, sRGB (16 bytes per block). */\n BC3_SRGB_BLOCK = 138,\n /** 4×4 BC4 single-channel block compression, unsigned normalized (8 bytes per block). */\n BC4_UNORM_BLOCK = 139,\n /** 4×4 BC4 single-channel block compression, signed normalized (8 bytes per block). */\n BC4_SNORM_BLOCK = 140,\n /** 4×4 BC5 two-channel block compression, unsigned normalized (16 bytes per block). */\n BC5_UNORM_BLOCK = 141,\n /** 4×4 BC5 two-channel block compression, signed normalized (16 bytes per block). */\n BC5_SNORM_BLOCK = 142,\n /** 4×4 BC6H HDR block compression, unsigned floating-point (16 bytes per block). */\n BC6H_UFLOAT_BLOCK = 143,\n /** 4×4 BC6H HDR block compression, signed floating-point (16 bytes per block). */\n BC6H_SFLOAT_BLOCK = 144,\n /** 4×4 BC7 RGBA block compression, unsigned normalized (16 bytes per block). */\n BC7_UNORM_BLOCK = 145,\n /** 4×4 BC7 RGBA block compression, sRGB (16 bytes per block). */\n BC7_SRGB_BLOCK = 146,\n /** 4×4 ETC2 RGB block compression, unsigned normalized (8 bytes per block). */\n ETC2_R8G8B8_UNORM_BLOCK = 147,\n /** 4×4 ETC2 RGB block compression, sRGB (8 bytes per block). */\n ETC2_R8G8B8_SRGB_BLOCK = 148,\n /** 4×4 ETC2 RGB block compression with 1-bit alpha, unsigned normalized (8 bytes per block). */\n ETC2_R8G8B8A1_UNORM_BLOCK = 149,\n /** 4×4 ETC2 RGB block compression with 1-bit alpha, sRGB (8 bytes per block). */\n ETC2_R8G8B8A1_SRGB_BLOCK = 150,\n /** 4×4 ETC2 RGBA block compression, unsigned normalized (16 bytes per block). */\n ETC2_R8G8B8A8_UNORM_BLOCK = 151,\n /** 4×4 ETC2 RGBA block compression, sRGB (16 bytes per block). */\n ETC2_R8G8B8A8_SRGB_BLOCK = 152,\n /** 4×4 EAC single-channel block compression, unsigned normalized (8 bytes per block). */\n EAC_R11_UNORM_BLOCK = 153,\n /** 4×4 EAC single-channel block compression, signed normalized (8 bytes per block). */\n EAC_R11_SNORM_BLOCK = 154,\n /** 4×4 EAC two-channel block compression, unsigned normalized (16 bytes per block). */\n EAC_R11G11_UNORM_BLOCK = 155,\n /** 4×4 EAC two-channel block compression, signed normalized (16 bytes per block). */\n EAC_R11G11_SNORM_BLOCK = 156,\n /** ASTC 4×4 block compression, unsigned normalized (16 bytes per block). */\n ASTC_4X4_UNORM_BLOCK = 157,\n /** ASTC 4×4 block compression, sRGB (16 bytes per block). */\n ASTC_4X4_SRGB_BLOCK = 158,\n /** ASTC 5×4 block compression, unsigned normalized (16 bytes per block). */\n ASTC_5X4_UNORM_BLOCK = 159,\n /** ASTC 5×4 block compression, sRGB (16 bytes per block). */\n ASTC_5X4_SRGB_BLOCK = 160,\n /** ASTC 5×5 block compression, unsigned normalized (16 bytes per block). */\n ASTC_5X5_UNORM_BLOCK = 161,\n /** ASTC 5×5 block compression, sRGB (16 bytes per block). */\n ASTC_5X5_SRGB_BLOCK = 162,\n /** ASTC 6×5 block compression, unsigned normalized (16 bytes per block). */\n ASTC_6X5_UNORM_BLOCK = 163,\n /** ASTC 6×5 block compression, sRGB (16 bytes per block). */\n ASTC_6X5_SRGB_BLOCK = 164,\n /** ASTC 6×6 block compression, unsigned normalized (16 bytes per block). */\n ASTC_6X6_UNORM_BLOCK = 165,\n /** ASTC 6×6 block compression, sRGB (16 bytes per block). */\n ASTC_6X6_SRGB_BLOCK = 166,\n /** ASTC 8×5 block compression, unsigned normalized (16 bytes per block). */\n ASTC_8X5_UNORM_BLOCK = 167,\n /** ASTC 8×5 block compression, sRGB (16 bytes per block). */\n ASTC_8X5_SRGB_BLOCK = 168,\n /** ASTC 8×6 block compression, unsigned normalized (16 bytes per block). */\n ASTC_8X6_UNORM_BLOCK = 169,\n /** ASTC 8×6 block compression, sRGB (16 bytes per block). */\n ASTC_8X6_SRGB_BLOCK = 170,\n /** ASTC 8×8 block compression, unsigned normalized (16 bytes per block). */\n ASTC_8X8_UNORM_BLOCK = 171,\n /** ASTC 8×8 block compression, sRGB (16 bytes per block). */\n ASTC_8X8_SRGB_BLOCK = 172,\n /** ASTC 10×5 block compression, unsigned normalized (16 bytes per block). */\n ASTC_10X5_UNORM_BLOCK = 173,\n /** ASTC 10×5 block compression, sRGB (16 bytes per block). */\n ASTC_10X5_SRGB_BLOCK = 174,\n /** ASTC 10×6 block compression, unsigned normalized (16 bytes per block). */\n ASTC_10X6_UNORM_BLOCK = 175,\n /** ASTC 10×6 block compression, sRGB (16 bytes per block). */\n ASTC_10X6_SRGB_BLOCK = 176,\n /** ASTC 10×8 block compression, unsigned normalized (16 bytes per block). */\n ASTC_10X8_UNORM_BLOCK = 177,\n /** ASTC 10×8 block compression, sRGB (16 bytes per block). */\n ASTC_10X8_SRGB_BLOCK = 178,\n /** ASTC 10×10 block compression, unsigned normalized (16 bytes per block). */\n ASTC_10X10_UNORM_BLOCK = 179,\n /** ASTC 10×10 block compression, sRGB (16 bytes per block). */\n ASTC_10X10_SRGB_BLOCK = 180,\n /** ASTC 12×10 block compression, unsigned normalized (16 bytes per block). */\n ASTC_12X10_UNORM_BLOCK = 181,\n /** ASTC 12×10 block compression, sRGB (16 bytes per block). */\n ASTC_12X10_SRGB_BLOCK = 182,\n /** ASTC 12×12 block compression, unsigned normalized (16 bytes per block). */\n ASTC_12X12_UNORM_BLOCK = 183,\n /** ASTC 12×12 block compression, sRGB (16 bytes per block). */\n ASTC_12X12_SRGB_BLOCK = 184,\n /** Packed 4:2:2 format with 8-bit unsigned normalized components in order G, B, G, R. */\n G8B8G8R8_422_UNORM = 1000156000,\n /** Packed 4:2:2 format with 8-bit unsigned normalized components in order B, G, R, G. */\n B8G8R8G8_422_UNORM = 1000156001,\n /** 4:2:0 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */\n G8_B8_R8_3PLANE_420_UNORM = 1000156002,\n /** 4:2:0 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */\n G8_B8R8_2PLANE_420_UNORM = 1000156003,\n /** 4:2:2 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */\n G8_B8_R8_3PLANE_422_UNORM = 1000156004,\n /** 4:2:2 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */\n G8_B8R8_2PLANE_422_UNORM = 1000156005,\n /** 4:4:4 format stored as three planes (G, B, and R), 8-bit unsigned normalized samples. */\n G8_B8_R8_3PLANE_444_UNORM = 1000156006,\n /** red with 10 significant bits and 6 unused bits, unsigned normalized, packed into a 16-bit word. */\n R10X6_UNORM_PACK16 = 1000156007,\n /** red and green, each with 10 significant bits and 6 unused bits, unsigned normalized, packed into two 16-bit words. */\n R10X6G10X6_UNORM_2PACK16 = 1000156008,\n /** red, green, blue, and alpha, each with 10 significant bits and 6 unused bits, unsigned normalized, packed into four 16-bit words. */\n R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,\n /** Packed 4:2:2 format, unsigned normalized, each component with 10 significant bits and 6 unused bits, component order G, B, G, R. */\n G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,\n /** Packed 4:2:2 format, unsigned normalized, each component with 10 significant bits and 6 unused bits, component order B, G, R, G. */\n B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,\n /** 4:2:0 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */\n G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,\n /** 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. */\n G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,\n /** 4:2:2 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */\n G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,\n /** 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. */\n G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,\n /** 4:4:4 format stored as three planes (G, B, and R), unsigned normalized samples with 10 significant bits and 6 unused bits. */\n G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,\n /** red with 12 significant bits and 4 unused bits, unsigned normalized, packed into a 16-bit word. */\n R12X4_UNORM_PACK16 = 1000156017,\n /** red and green, each with 12 significant bits and 4 unused bits, unsigned normalized, packed into two 16-bit words. */\n R12X4G12X4_UNORM_2PACK16 = 1000156018,\n /** red, green, blue, and alpha, each with 12 significant bits and 4 unused bits, unsigned normalized, packed into four 16-bit words. */\n R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,\n /** Packed 4:2:2 format, unsigned normalized, each component with 12 significant bits and 4 unused bits, component order G, B, G, R. */\n G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,\n /** Packed 4:2:2 format, unsigned normalized, each component with 12 significant bits and 4 unused bits, component order B, G, R, G. */\n B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,\n /** 4:2:0 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */\n G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,\n /** 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. */\n G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,\n /** 4:2:2 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */\n G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,\n /** 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. */\n G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,\n /** 4:4:4 format stored as three planes (G, B, and R), unsigned normalized samples with 12 significant bits and 4 unused bits. */\n G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,\n /** Packed 4:2:2 format with 16-bit unsigned normalized components in order G, B, G, R. */\n G16B16G16R16_422_UNORM = 1000156027,\n /** Packed 4:2:2 format with 16-bit unsigned normalized components in order B, G, R, G. */\n B16G16R16G16_422_UNORM = 1000156028,\n /** 4:2:0 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */\n G16_B16_R16_3PLANE_420_UNORM = 1000156029,\n /** 4:2:0 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */\n G16_B16R16_2PLANE_420_UNORM = 1000156030,\n /** 4:2:2 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */\n G16_B16_R16_3PLANE_422_UNORM = 1000156031,\n /** 4:2:2 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */\n G16_B16R16_2PLANE_422_UNORM = 1000156032,\n /** 4:4:4 format stored as three planes (G, B, and R), 16-bit unsigned normalized samples. */\n G16_B16_R16_3PLANE_444_UNORM = 1000156033,\n /** 4:4:4 format stored as two planes (G, and interleaved B and R), 8-bit unsigned normalized samples. */\n G8_B8R8_2PLANE_444_UNORM = 1000330000,\n /** 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. */\n G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001,\n /** 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. */\n G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002,\n /** 4:4:4 format stored as two planes (G, and interleaved B and R), 16-bit unsigned normalized samples. */\n G16_B16R16_2PLANE_444_UNORM = 1000330003,\n /** 4-bit alpha, red, green, and blue, unsigned normalized, packed into a 16-bit word. */\n A4R4G4B4_UNORM_PACK16 = 1000340000,\n /** 4-bit alpha, blue, green, and red, unsigned normalized, packed into a 16-bit word. */\n A4B4G4R4_UNORM_PACK16 = 1000340001,\n /** ASTC 4×4 block compression, signed floating-point (16 bytes per block). */\n ASTC_4X4_SFLOAT_BLOCK = 1000066000,\n /** ASTC 5×4 block compression, signed floating-point (16 bytes per block). */\n ASTC_5X4_SFLOAT_BLOCK = 1000066001,\n /** ASTC 5×5 block compression, signed floating-point (16 bytes per block). */\n ASTC_5X5_SFLOAT_BLOCK = 1000066002,\n /** ASTC 6×5 block compression, signed floating-point (16 bytes per block). */\n ASTC_6X5_SFLOAT_BLOCK = 1000066003,\n /** ASTC 6×6 block compression, signed floating-point (16 bytes per block). */\n ASTC_6X6_SFLOAT_BLOCK = 1000066004,\n /** ASTC 8×5 block compression, signed floating-point (16 bytes per block). */\n ASTC_8X5_SFLOAT_BLOCK = 1000066005,\n /** ASTC 8×6 block compression, signed floating-point (16 bytes per block). */\n ASTC_8X6_SFLOAT_BLOCK = 1000066006,\n /** ASTC 8×8 block compression, signed floating-point (16 bytes per block). */\n ASTC_8X8_SFLOAT_BLOCK = 1000066007,\n /** ASTC 10×5 block compression, signed floating-point (16 bytes per block). */\n ASTC_10X5_SFLOAT_BLOCK = 1000066008,\n /** ASTC 10×6 block compression, signed floating-point (16 bytes per block). */\n ASTC_10X6_SFLOAT_BLOCK = 1000066009,\n /** ASTC 10×8 block compression, signed floating-point (16 bytes per block). */\n ASTC_10X8_SFLOAT_BLOCK = 1000066010,\n /** ASTC 10×10 block compression, signed floating-point (16 bytes per block). */\n ASTC_10X10_SFLOAT_BLOCK = 1000066011,\n /** ASTC 12×10 block compression, signed floating-point (16 bytes per block). */\n ASTC_12X10_SFLOAT_BLOCK = 1000066012,\n /** ASTC 12×12 block compression, signed floating-point (16 bytes per block). */\n ASTC_12X12_SFLOAT_BLOCK = 1000066013,\n /** 1-bit alpha, 5-bit blue, 5-bit green, and 5-bit red, unsigned normalized, packed into a 16-bit word. */\n A1B5G5R5_UNORM_PACK16 = 1000470000,\n /** 8-bit alpha, unsigned normalized. */\n A8_UNORM = 1000470001,\n /** PVRTC1 2 bits per pixel, unsigned normalized. */\n PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,\n /** PVRTC1 4 bits per pixel, unsigned normalized. */\n PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,\n /** PVRTC2 2 bits per pixel, unsigned normalized. */\n PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,\n /** PVRTC2 4 bits per pixel, unsigned normalized. */\n PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,\n /** PVRTC1 2 bits per pixel, sRGB. */\n PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,\n /** PVRTC1 4 bits per pixel, sRGB. */\n PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,\n /** PVRTC2 2 bits per pixel, sRGB. */\n PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,\n /** PVRTC2 4 bits per pixel, sRGB. */\n PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,\n /** Two 16-bit signed fixed-point components (red and green). Each component has 10 integer bits and 5 fractional bits (NVIDIA). */\n R16G16_SFIXED5_NV = 1000464000,\n /** Alias of {@link VkFormat.ASTC_4X4_SFLOAT_BLOCK}. */\n ASTC_4X4_SFLOAT_BLOCK_EXT = 1000066000,\n /** Alias of {@link VkFormat.ASTC_5X4_SFLOAT_BLOCK}. */\n ASTC_5X4_SFLOAT_BLOCK_EXT = 1000066001,\n /** Alias of {@link VkFormat.ASTC_5X5_SFLOAT_BLOCK}. */\n ASTC_5X5_SFLOAT_BLOCK_EXT = 1000066002,\n /** Alias of {@link VkFormat.ASTC_6X5_SFLOAT_BLOCK}. */\n ASTC_6X5_SFLOAT_BLOCK_EXT = 1000066003,\n /** Alias of {@link VkFormat.ASTC_6X6_SFLOAT_BLOCK}. */\n ASTC_6X6_SFLOAT_BLOCK_EXT = 1000066004,\n /** Alias of {@link VkFormat.ASTC_8X5_SFLOAT_BLOCK}. */\n ASTC_8X5_SFLOAT_BLOCK_EXT = 1000066005,\n /** Alias of {@link VkFormat.ASTC_8X6_SFLOAT_BLOCK}. */\n ASTC_8X6_SFLOAT_BLOCK_EXT = 1000066006,\n /** Alias of {@link VkFormat.ASTC_8X8_SFLOAT_BLOCK}. */\n ASTC_8X8_SFLOAT_BLOCK_EXT = 1000066007,\n /** Alias of {@link VkFormat.ASTC_10X5_SFLOAT_BLOCK}. */\n ASTC_10X5_SFLOAT_BLOCK_EXT = 1000066008,\n /** Alias of {@link VkFormat.ASTC_10X6_SFLOAT_BLOCK}. */\n ASTC_10X6_SFLOAT_BLOCK_EXT = 1000066009,\n /** Alias of {@link VkFormat.ASTC_10X8_SFLOAT_BLOCK}. */\n ASTC_10X8_SFLOAT_BLOCK_EXT = 1000066010,\n /** Alias of {@link VkFormat.ASTC_10X10_SFLOAT_BLOCK}. */\n ASTC_10X10_SFLOAT_BLOCK_EXT = 1000066011,\n /** Alias of {@link VkFormat.ASTC_12X10_SFLOAT_BLOCK}. */\n ASTC_12X10_SFLOAT_BLOCK_EXT = 1000066012,\n /** Alias of {@link VkFormat.ASTC_12X12_SFLOAT_BLOCK}. */\n ASTC_12X12_SFLOAT_BLOCK_EXT = 1000066013,\n /** Alias of {@link VkFormat.G8B8G8R8_422_UNORM}. */\n G8B8G8R8_422_UNORM_KHR = 1000156000,\n /** Alias of {@link VkFormat.B8G8R8G8_422_UNORM}. */\n B8G8R8G8_422_UNORM_KHR = 1000156001,\n /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_420_UNORM}. */\n G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002,\n /** Alias of {@link VkFormat.G8_B8R8_2PLANE_420_UNORM}. */\n G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003,\n /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_422_UNORM}. */\n G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004,\n /** Alias of {@link VkFormat.G8_B8R8_2PLANE_422_UNORM}. */\n G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005,\n /** Alias of {@link VkFormat.G8_B8_R8_3PLANE_444_UNORM}. */\n G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006,\n /** Alias of {@link VkFormat.R10X6_UNORM_PACK16}. */\n R10X6_UNORM_PACK16_KHR = 1000156007,\n /** Alias of {@link VkFormat.R10X6G10X6_UNORM_2PACK16}. */\n R10X6G10X6_UNORM_2PACK16_KHR = 1000156008,\n /** Alias of {@link VkFormat.R10X6G10X6B10X6A10X6_UNORM_4PACK16}. */\n R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009,\n /** Alias of {@link VkFormat.G10X6B10X6G10X6R10X6_422_UNORM_4PACK16}. */\n G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010,\n /** Alias of {@link VkFormat.B10X6G10X6R10X6G10X6_422_UNORM_4PACK16}. */\n B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011,\n /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16}. */\n G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012,\n /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16}. */\n G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013,\n /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16}. */\n G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014,\n /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16}. */\n G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015,\n /** Alias of {@link VkFormat.G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16}. */\n G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016,\n /** Alias of {@link VkFormat.R12X4_UNORM_PACK16}. */\n R12X4_UNORM_PACK16_KHR = 1000156017,\n /** Alias of {@link VkFormat.R12X4G12X4_UNORM_2PACK16}. */\n R12X4G12X4_UNORM_2PACK16_KHR = 1000156018,\n /** Alias of {@link VkFormat.R12X4G12X4B12X4A12X4_UNORM_4PACK16}. */\n R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019,\n /** Alias of {@link VkFormat.G12X4B12X4G12X4R12X4_422_UNORM_4PACK16}. */\n G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020,\n /** Alias of {@link VkFormat.B12X4G12X4R12X4G12X4_422_UNORM_4PACK16}. */\n B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021,\n /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16}. */\n G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022,\n /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16}. */\n G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023,\n /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16}. */\n G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024,\n /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16}. */\n G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025,\n /** Alias of {@link VkFormat.G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16}. */\n G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026,\n /** Alias of {@link VkFormat.G16B16G16R16_422_UNORM}. */\n G16B16G16R16_422_UNORM_KHR = 1000156027,\n /** Alias of {@link VkFormat.B16G16R16G16_422_UNORM}. */\n B16G16R16G16_422_UNORM_KHR = 1000156028,\n /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_420_UNORM}. */\n G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029,\n /** Alias of {@link VkFormat.G16_B16R16_2PLANE_420_UNORM}. */\n G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030,\n /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_422_UNORM}. */\n G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031,\n /** Alias of {@link VkFormat.G16_B16R16_2PLANE_422_UNORM}. */\n G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032,\n /** Alias of {@link VkFormat.G16_B16_R16_3PLANE_444_UNORM}. */\n G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033,\n /** Alias of {@link VkFormat.G8_B8R8_2PLANE_444_UNORM}. */\n G8_B8R8_2PLANE_444_UNORM_EXT = 1000330000,\n /** Alias of {@link VkFormat.G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16}. */\n G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = 1000330001,\n /** Alias of {@link VkFormat.G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16}. */\n G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = 1000330002,\n /** Alias of {@link VkFormat.G16_B16R16_2PLANE_444_UNORM}. */\n G16_B16R16_2PLANE_444_UNORM_EXT = 1000330003,\n /** Alias of {@link VkFormat.A4R4G4B4_UNORM_PACK16}. */\n A4R4G4B4_UNORM_PACK16_EXT = 1000340000,\n /** Alias of {@link VkFormat.A4B4G4R4_UNORM_PACK16}. */\n A4B4G4R4_UNORM_PACK16_EXT = 1000340001,\n /** Alias of {@link VkFormat.R16G16_SFIXED5_NV}. */\n R16G16_S10_5_NV = 1000464000,\n /** Alias of {@link VkFormat.A1B5G5R5_UNORM_PACK16}. */\n A1B5G5R5_UNORM_PACK16_KHR = 1000470000,\n /** Alias of {@link VkFormat.A8_UNORM}. */\n A8_UNORM_KHR = 1000470001,\n /** Largest enumerator value. Not a texture format. */\n MAX_ENUM = 2147483647,\n}\n","import {VkFormat} from \"./VkFormat.ts\";\n\n/**\n * Describes how a texture format is laid out in memory, in blocks.\n *\n * For uncompressed formats a block is one pixel:\n * `blockWidth` and `blockHeight` are `1`, and `bytesPerBlock` is the bytes per pixel.\n *\n * For compressed formats such as BC7, a block is a group of pixels\n * (typically 4×4) stored in a fixed number of bytes.\n */\nexport class TextureFormatInfo {\n /** Width of one block, in pixels. */\n public readonly blockWidth: number;\n\n /** Height of one block, in pixels. */\n public readonly blockHeight: number;\n\n /** Depth of one block, in pixels. */\n public readonly blockDepth: number;\n\n /** Size of one block, in bytes. */\n public readonly bytesPerBlock: number;\n\n /**\n * Average number of bytes used per pixel.\n *\n * For uncompressed formats this is the bytes per pixel.\n * For compressed formats this is the average storage cost per pixel.\n */\n public get pixelSize(): number {\n return this.bytesPerBlock /\n (this.blockWidth * this.blockHeight * this.blockDepth);\n }\n\n /**\n * Creates a block-layout description.\n *\n * @param blockWidth - Block width, in pixels.\n * @param blockHeight - Block height, in pixels.\n * @param blockDepth - Block depth, in pixels.\n * @param bytesPerBlock - Bytes stored in one block.\n */\n public constructor(\n blockWidth: number,\n blockHeight: number,\n blockDepth: number,\n bytesPerBlock: number\n ) {\n this.blockWidth = blockWidth;\n this.blockHeight = blockHeight;\n this.blockDepth = blockDepth;\n this.bytesPerBlock = bytesPerBlock;\n }\n\n /**\n * Number of blocks needed to cover `width` pixels.\n *\n * @param width - Texture width, in pixels.\n * @returns Block count, rounded up to a whole block.\n */\n public getBlocksPerRow(width: number): number {\n return Math.ceil(width / this.blockWidth);\n }\n\n /**\n * Number of block rows needed to cover `height` pixels.\n *\n * @param height - Texture height, in pixels.\n * @returns Block-row count, rounded up to a whole block.\n */\n public getBlocksPerColumn(height: number): number {\n return Math.ceil(height / this.blockHeight);\n }\n\n /**\n * Number of block slices needed to cover `depth` pixels.\n *\n * @param depth - Texture depth, in pixels.\n * @returns Block-slice count, rounded up to a whole block.\n */\n public getBlocksPerSlice(depth: number): number {\n return Math.ceil(depth / this.blockDepth);\n }\n\n /**\n * Unaligned number of bytes in one row of blocks.\n *\n * @param width - Texture width, in pixels.\n * @returns Bytes per row, without a 256-byte alignment.\n */\n public getBytesPerRow(width: number): number {\n return this.getBlocksPerRow(width) * this.bytesPerBlock;\n }\n\n /**\n * WebGPU `bytesPerRow` for `width`.\n *\n * WebGPU requires `bytesPerRow` to be a multiple of 256.\n *\n * @param width - Texture width, in pixels.\n * @returns `getBytesPerRow(width)` rounded up to a multiple of 256.\n */\n public getAlignedBytesPerRow(width: number): number {\n const bytesPerRow = this.getBytesPerRow(width);\n return Math.ceil(bytesPerRow / 256) * 256;\n }\n\n /**\n * Byte size of one 2D mip level.\n *\n * @param width - Level width, in pixels.\n * @param height - Level height, in pixels.\n * @returns Level size, in bytes.\n */\n public getDataSize(width: number, height: number): number {\n const blocksX = this.getBlocksPerRow(width);\n const blocksY = this.getBlocksPerColumn(height);\n\n return blocksX * blocksY * this.bytesPerBlock;\n }\n\n /**\n * Byte size of one 3D mip level.\n *\n * @param width - Level width, in pixels.\n * @param height - Level height, in pixels.\n * @param depth - Level depth, in pixels.\n * @returns Level size, in bytes.\n */\n public getDataSize3D(\n width: number,\n height: number,\n depth: number\n ): number {\n const blocksX = this.getBlocksPerRow(width);\n const blocksY = this.getBlocksPerColumn(height);\n const blocksZ = this.getBlocksPerSlice(depth);\n\n return blocksX * blocksY * blocksZ * this.bytesPerBlock;\n }\n\n /**\n * BC7 layout: 4×4 blocks, 16 bytes per block.\n *\n * @returns The BC7 {@link TextureFormatInfo}.\n */\n public static bc7(): TextureFormatInfo {\n return new TextureFormatInfo(4, 4, 1, 16);\n }\n\n /**\n * BC3 layout: 4×4 blocks, 16 bytes per block.\n *\n * @returns The BC3 {@link TextureFormatInfo}.\n */\n public static bc3(): TextureFormatInfo {\n return new TextureFormatInfo(4, 4, 1, 16);\n }\n\n /**\n * ETC2 RGBA layout: 4×4 blocks, 16 bytes per block.\n *\n * @returns The ETC2 RGBA {@link TextureFormatInfo}.\n */\n public static etc2rgba(): TextureFormatInfo {\n return new TextureFormatInfo(4, 4, 1, 16);\n }\n\n /**\n * ASTC 4×4 RGBA layout: 4×4 blocks, 16 bytes per block.\n *\n * @returns The ASTC 4×4 RGBA {@link TextureFormatInfo}.\n */\n public static astc4x4rgba(): TextureFormatInfo {\n return new TextureFormatInfo(4, 4, 1, 16);\n }\n\n /**\n * Uncompressed 8-bit 4-channel layout: 1×1 blocks, 4 bytes per pixel.\n *\n * Channel order does not change the size. `B8G8R8A8_*` and\n * `A8B8G8R8_*_PACK32` use this same layout.\n *\n * @returns The 4-byte {@link TextureFormatInfo}.\n */\n public static rgba32(): TextureFormatInfo {\n return new TextureFormatInfo(1, 1, 1, 4);\n }\n\n /**\n * `D24_UNORM_S8_UINT` layout: 4 bytes per pixel.\n *\n * @returns The depth/stencil {@link TextureFormatInfo}.\n */\n public static depth24Stencil8(): TextureFormatInfo {\n return new TextureFormatInfo(1, 1, 1, 4);\n }\n\n /**\n * `D32_SFLOAT` layout: 4 bytes per pixel.\n *\n * @returns The 32-bit float depth {@link TextureFormatInfo}.\n */\n public static depth32float(): TextureFormatInfo {\n return new TextureFormatInfo(1, 1, 1, 4);\n }\n\n /**\n * Block layout for a Vulkan format this package knows how to size.\n *\n * sRGB, signed, integer, and scaled variants share the block size of the\n * matching unsigned normalized format. Channel order does not change the\n * byte size.\n *\n * - `R8G8B8A8_*`, `B8G8R8A8_*`, and `A8B8G8R8_*_PACK32` use {@link TextureFormatInfo.rgba32}.\n * - `D24_UNORM_S8_UINT` uses {@link TextureFormatInfo.depth24Stencil8}.\n * - `D32_SFLOAT` uses {@link TextureFormatInfo.depth32float}.\n * - `BC3_UNORM_BLOCK` and `BC3_SRGB_BLOCK` use {@link TextureFormatInfo.bc3}.\n * - `BC7_UNORM_BLOCK` and `BC7_SRGB_BLOCK` use {@link TextureFormatInfo.bc7}.\n * - `ETC2_R8G8B8A8_UNORM_BLOCK` and `ETC2_R8G8B8A8_SRGB_BLOCK` use {@link TextureFormatInfo.etc2rgba}.\n * - `ASTC_4X4_UNORM_BLOCK`, `ASTC_4X4_SRGB_BLOCK`, and `ASTC_4X4_SFLOAT_BLOCK`\n * use {@link TextureFormatInfo.astc4x4rgba}. `ASTC_4X4_SFLOAT_BLOCK_EXT`\n * is the same value as `ASTC_4X4_SFLOAT_BLOCK`.\n *\n * @param vkFormat - Vulkan format.\n * @returns The matching layout.\n * @throws {Error} When `vkFormat` has no layout in this package.\n */\n public static fromVkFormat(vkFormat: VkFormat): TextureFormatInfo {\n switch (vkFormat) {\n case VkFormat.R8G8B8A8_UNORM:\n case VkFormat.R8G8B8A8_SNORM:\n case VkFormat.R8G8B8A8_USCALED:\n case VkFormat.R8G8B8A8_SSCALED:\n case VkFormat.R8G8B8A8_UINT:\n case VkFormat.R8G8B8A8_SINT:\n case VkFormat.R8G8B8A8_SRGB:\n case VkFormat.B8G8R8A8_UNORM:\n case VkFormat.B8G8R8A8_SNORM:\n case VkFormat.B8G8R8A8_USCALED:\n case VkFormat.B8G8R8A8_SSCALED:\n case VkFormat.B8G8R8A8_UINT:\n case VkFormat.B8G8R8A8_SINT:\n case VkFormat.B8G8R8A8_SRGB:\n case VkFormat.A8B8G8R8_UNORM_PACK32:\n case VkFormat.A8B8G8R8_SNORM_PACK32:\n case VkFormat.A8B8G8R8_USCALED_PACK32:\n case VkFormat.A8B8G8R8_SSCALED_PACK32:\n case VkFormat.A8B8G8R8_UINT_PACK32:\n case VkFormat.A8B8G8R8_SINT_PACK32:\n case VkFormat.A8B8G8R8_SRGB_PACK32:\n return this.rgba32();\n case VkFormat.D24_UNORM_S8_UINT:\n return this.depth24Stencil8();\n case VkFormat.D32_SFLOAT:\n return this.depth32float();\n case VkFormat.ASTC_4X4_UNORM_BLOCK:\n case VkFormat.ASTC_4X4_SRGB_BLOCK:\n case VkFormat.ASTC_4X4_SFLOAT_BLOCK:\n return this.astc4x4rgba();\n case VkFormat.BC7_UNORM_BLOCK:\n case VkFormat.BC7_SRGB_BLOCK:\n return this.bc7();\n case VkFormat.BC3_UNORM_BLOCK:\n case VkFormat.BC3_SRGB_BLOCK:\n return this.bc3();\n case VkFormat.ETC2_R8G8B8A8_UNORM_BLOCK:\n case VkFormat.ETC2_R8G8B8A8_SRGB_BLOCK:\n return this.etc2rgba();\n default:\n throw new Error(`TextureFormatInfo.fromVkFormat has no layout for VkFormat ${vkFormat}.`);\n }\n }\n}\n","/**\n * Result codes returned by KTX2 texture operations.\n *\n * Names and numeric values match libktx `ktx_error_code_e`.\n * `KTX_ERROR_MAX_ENUM` is not a member: in libktx it aliases\n * {@link KtxErrorCode.DECOMPRESS_CHECKSUM_ERROR} and is not a distinct result.\n */\nexport enum KtxErrorCode {\n /** The operation succeeded. */\n SUCCESS = 0,\n\n /** The file data does not match the KTX specification. */\n FILE_DATA_ERROR = 1,\n\n /** The file is a pipe or a named pipe. */\n FILE_ISPIPE = 2,\n\n /** The target file could not be opened. */\n FILE_OPEN_FAILED = 3,\n\n /** The operation would exceed the maximum file size. */\n FILE_OVERFLOW = 4,\n\n /** Reading the file failed. */\n FILE_READ_ERROR = 5,\n\n /** Seeking in the file failed. */\n FILE_SEEK_ERROR = 6,\n\n /** The file ended before the requested data was read. */\n FILE_UNEXPECTED_EOF = 7,\n\n /** Writing the file failed. */\n FILE_WRITE_ERROR = 8,\n\n /** An OpenGL call failed. */\n GL_ERROR = 9,\n\n /** The operation is not allowed in the current state. */\n INVALID_OPERATION = 10,\n\n /** A parameter value was not valid. */\n INVALID_VALUE = 11,\n\n /** A metadata key was missing, or a required GPU entry point was not found. */\n NOT_FOUND = 12,\n\n /** Not enough memory to complete the operation. */\n OUT_OF_MEMORY = 13,\n\n /** Transcoding a block-compressed texture failed. */\n TRANSCODE_FAILED = 14,\n\n /** The file is not a KTX file. */\n UNKNOWN_FILE_FORMAT = 15,\n\n /** The file requests a texture type this library does not support. */\n UNSUPPORTED_TEXTURE_TYPE = 16,\n\n /** The feature is not built into this library, or it is not implemented yet. */\n UNSUPPORTED_FEATURE = 17,\n\n /** An OpenGL or Vulkan dependency is not linked into the application. */\n LIBRARY_NOT_LINKED = 18,\n\n /** The decompressed byte count does not match the expected size. */\n DECOMPRESS_LENGTH_ERROR = 19,\n\n /** A checksum did not match while decompressing. */\n DECOMPRESS_CHECKSUM_ERROR = 20,\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAY,gBAAL,yBAAA,eAAA;;;;CAIH,cAAA,cAAA,mBAAA,KAAA;;;;CAKA,cAAA,cAAA,kBAAA,KAAA;;;;CAKA,cAAA,cAAA,mBAAA,KAAA;;;;CAKA,cAAA,cAAA,kBAAA,KAAA;;;;CAKA,cAAA,cAAA,qBAAA,KAAA;;;;CAKA,cAAA,cAAA,gBAAA,MAAA;;;;CAKA,cAAA,cAAA,uBAAA,KAAA;;;;CAKA,cAAA,cAAA,qBAAA,MAAA;;;;CAKA,cAAA,cAAA,uBAAA,MAAA;;;;CAKA,cAAA,cAAA,wBAAA,OAAA;;;;CAKA,cAAA,cAAA,sCAAA,OAAA;;AACJ,EAAA,CAAA,CAAA;;;;;;;;;;AC1DA,IAAY,mBAAL,yBAAA,kBAAA;;CAEH,iBAAA,iBAAA,gBAAA,KAAA;;CAGA,iBAAA,iBAAA,mBAAA,KAAA;;AACJ,EAAA,CAAA,CAAA;;;;;;;;;ACPA,IAAY,oBAAL,yBAAA,mBAAA;;CAEH,kBAAA,kBAAA,UAAA,KAAA;;;;;;;;CASA,kBAAA,kBAAA,+BAAA,KAAA;;;;;;CAOA,kBAAA,kBAAA,4CAAA,KAAA;;;;;CAMA,kBAAA,kBAAA,kBAAA,MAAA;;AACJ,EAAA,CAAA,CAAA;;;;;;;;;;ACxBA,IAAY,qBAAL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AA,KAAA;;CAGA,aAAA,aAAA,qBAAA,KAAA;;CAGA,aAAA,aAAA,qBAAA,KAAA;;CAGA,aAAA,aAAA,yBAAA,KAAA;;CAGA,aAAA,aAAA,sBAAA,KAAA;;CAGA,aAAA,aAAA,cAAA,KAAA;;CAGA,aAAA,aAAA,uBAAA,MAAA;;CAGA,aAAA,aAAA,mBAAA,MAAA;;CAGA,aAAA,aAAA,eAAA,MAAA;;CAGA,aAAA,aAAA,mBAAA,MAAA;;CAGA,aAAA,aAAA,sBAAA,MAAA;;CAGA,aAAA,aAAA,yBAAA,MAAA;;CAGA,aAAA,aAAA,8BAAA,MAAA;;CAGA,aAAA,aAAA,yBAAA,MAAA;;CAGA,aAAA,aAAA,wBAAA,MAAA;;CAGA,aAAA,aAAA,6BAAA,MAAA;;CAGA,aAAA,aAAA,+BAAA,MAAA;;AACJ,EAAA,CAAA,CAAA"}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "ris-ktx2-api",
3
+ "version": "0.1.0-dev.2.4",
4
+ "description": "TypeScript interfaces, enumerations, and texture-format helpers for the ris-ktx2 package.",
5
+ "type": "module",
6
+ "author": "Luka Erkapic <erkapic.luka.dev@gmail.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/luka712/ris-ktx2-api-ts#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/luka712/ris-ktx2-api-ts.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/luka712/ris-ktx2-api-ts/issues"
15
+ },
16
+ "keywords": [
17
+ "ktx",
18
+ "ktx2",
19
+ "texture",
20
+ "vulkan",
21
+ "basis-universal",
22
+ "typescript",
23
+ "types"
24
+ ],
25
+ "sideEffects": false,
26
+ "main": "./dist/index.js",
27
+ "module": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js",
33
+ "default": "./dist/index.js"
34
+ }
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "src",
39
+ "LICENSE",
40
+ "LICENSES",
41
+ "THIRD_PARTY_NOTICES.md",
42
+ "README.md",
43
+ "CHANGELOG.md"
44
+ ],
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "scripts": {
49
+ "build": "tsc && vite build",
50
+ "clean": "rm -rf dist",
51
+ "test": "tsc -p tsconfig.test.json --noEmit && vitest run",
52
+ "prepublishOnly": "npm run build"
53
+ },
54
+ "devDependencies": {
55
+ "@microsoft/api-extractor": "^7.57.0",
56
+ "@typescript/typescript6": "^6.0.2",
57
+ "vite": "^8.1.5",
58
+ "vite-plugin-dts": "^5.0.3",
59
+ "vitest": "^1.6.0"
60
+ }
61
+ }
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Public entry point for `ris-ktx2-api`.
3
+ *
4
+ * Re-exports the KTX2 interfaces, enumerations, and {@link TextureFormatInfo}.
5
+ */
6
+ export * from './ris-ktx2/_export.ts';
@@ -0,0 +1,43 @@
1
+ import {KtxCreateStorage} from "./KtxCreateStorage.ts";
2
+ import type {IKtx2Texture} from "./IKtx2Texture.ts";
3
+ import type {IKtxTextureCreateInfo} from "./IKtxTextureCreateInfo.ts";
4
+
5
+ /**
6
+ * Creates and loads KTX2 textures.
7
+ *
8
+ * `ris-ktx2` provides the implementation. Call {@link IKtx2Factory.initializeAsync}
9
+ * before {@link IKtx2Factory.loadAsync}, {@link IKtx2Factory.create}, or
10
+ * {@link IKtx2Factory.createFromBuffer}.
11
+ */
12
+ export interface IKtx2Factory {
13
+
14
+ /**
15
+ * Initializes the factory and loads the native KTX library.
16
+ */
17
+ initializeAsync(): Promise<void>;
18
+
19
+ /**
20
+ * Loads a KTX or KTX2 texture.
21
+ *
22
+ * @param blob - A `File` to read, or a URL string to fetch.
23
+ * @returns The loaded texture.
24
+ */
25
+ loadAsync(blob: string | File): Promise<IKtx2Texture>;
26
+
27
+ /**
28
+ * Creates a KTX2 texture from {@link IKtxTextureCreateInfo}.
29
+ *
30
+ * @param createInfo - Width, height, format, and mip count.
31
+ * @param storage - Whether to allocate image storage. Optional.
32
+ * @returns The new texture.
33
+ */
34
+ create(createInfo: IKtxTextureCreateInfo, storage?: KtxCreateStorage): IKtx2Texture;
35
+
36
+ /**
37
+ * Creates a texture from an in-memory KTX or KTX2 file.
38
+ *
39
+ * @param buffer - File bytes.
40
+ * @returns The loaded texture.
41
+ */
42
+ createFromBuffer(buffer: ArrayBufferView<ArrayBufferLike>): IKtx2Texture;
43
+ }
@@ -0,0 +1,178 @@
1
+ import {type IKtxBasisParams} from "./IKtxBasisParams.ts";
2
+ import {KtxTranscodeFlags} from "./KtxTranscodeFlags.ts";
3
+ import {KtxTranscodeFormat} from "./KtxTranscodeFormat.ts";
4
+ import {VkFormat} from "./VkFormat.ts";
5
+ import type {TextureFormatInfo} from "./TextureFormatInfo.ts";
6
+ import type {KtxErrorCode} from "./KtxErrorCode.ts";
7
+
8
+ /**
9
+ * A texture loaded from or created as a KTX or KTX2 container.
10
+ *
11
+ * `ris-ktx2` implements this interface on top of libktx. Implementations own
12
+ * the native texture and release it from {@link IKtx2Texture.delete}.
13
+ * Operations that can fail return a {@link KtxErrorCode}.
14
+ */
15
+ export interface IKtx2Texture {
16
+
17
+ /**
18
+ * File path of the `.ktx` or `.ktx2` texture when it was loaded from a file.
19
+ *
20
+ * Absent for textures created in memory.
21
+ */
22
+ readonly filePath?: string;
23
+
24
+ /** Width of the base level, in pixels. */
25
+ readonly width: number;
26
+
27
+ /** Height of the base level, in pixels. */
28
+ readonly height: number;
29
+
30
+ /** Size of the texture's image data, in bytes. */
31
+ readonly dataSize: number;
32
+
33
+ /**
34
+ * Whether the texture must be transcoded before GPU upload.
35
+ *
36
+ * `true` for Basis Universal (ETC1S or UASTC) data that has not yet been
37
+ * transcoded to a GPU block format.
38
+ */
39
+ readonly needsTranscoding: boolean;
40
+
41
+ /** Number of mipmap levels. */
42
+ readonly numLevels: number;
43
+
44
+ /** Vulkan format of the texture's current image data. */
45
+ readonly vkFormat: VkFormat;
46
+
47
+ /**
48
+ * Transcodes Basis Universal data to a GPU format.
49
+ *
50
+ * @param transcodeFormat - Target format.
51
+ * @param transcodeFlags - Transcode options. Pass {@link KtxTranscodeFlags.NONE} for the default.
52
+ * @returns The error code.
53
+ */
54
+ transcodeBasis(transcodeFormat: KtxTranscodeFormat, transcodeFlags: KtxTranscodeFlags): KtxErrorCode;
55
+
56
+ /**
57
+ * Supercompresses the texture with Basis Universal using explicit parameters.
58
+ *
59
+ * @param basisParams - ETC1S or UASTC encoder settings.
60
+ * @returns The error code.
61
+ */
62
+ compressBasis(basisParams: IKtxBasisParams): KtxErrorCode;
63
+
64
+ /**
65
+ * Supercompresses the texture with Basis Universal at a single quality value.
66
+ *
67
+ * Encodes the source images (typically to ETC1S) and stores them
68
+ * supercompressed inside the KTX2 container. This replaces the original
69
+ * image data and updates the texture metadata, including the DFD.
70
+ *
71
+ * After compression the texture cannot be uploaded directly. Transcode it
72
+ * to a GPU block format such as ASTC, BC7, or ETC2 first.
73
+ *
74
+ * Based on the KTX-Software libktx writer API:
75
+ * https://github.khronos.org/KTX-Software/libktx/group__writer.html#ga405c44d6daf8ddf83dc805810bf4f989
76
+ *
77
+ * @param quality - Compression quality from 1 to 255.
78
+ * `0` selects the underlying default of 128.
79
+ * Lower values are faster and smaller, with lower quality.
80
+ * Higher values are slower and larger, with higher quality.
81
+ * @returns The error code.
82
+ */
83
+ compressBasis(quality: number): KtxErrorCode;
84
+
85
+ /**
86
+ * Encodes uncompressed 2D images to ASTC and replaces the original data.
87
+ *
88
+ * On success the texture fields, including the DFD, describe the ASTC
89
+ * encoding. The result can be uploaded to a GPU without a further transcode.
90
+ *
91
+ * libktx `ktxTexture2_CompressAstc` returns
92
+ * {@link KtxErrorCode.INVALID_OPERATION} when the images are already
93
+ * supercompressed, already block-compressed, use a packed format such as
94
+ * RGB565, have a component size other than 8 bits, or are 1D.
95
+ * It returns {@link KtxErrorCode.OUT_OF_MEMORY} when encoding cannot
96
+ * allocate its working buffers.
97
+ *
98
+ * @param quality - Compression quality. `0` through `100` is the normal
99
+ * range: higher is slower and higher quality, lower is faster and lower
100
+ * quality. The libktx parameter is an unsigned integer, and a negative
101
+ * value is treated as greater than `100`.
102
+ * @returns The error code.
103
+ */
104
+ compressAstc(quality: number): KtxErrorCode;
105
+
106
+ /**
107
+ * Reads one image from the texture.
108
+ *
109
+ * @param level - Mipmap level. Defaults to `0` in the `ris-ktx2` implementation.
110
+ * @param layer - Array layer. Defaults to `0` in the `ris-ktx2` implementation.
111
+ * @param faceSlice - Face or slice index. Defaults to `0` in the `ris-ktx2` implementation.
112
+ * @returns The image bytes.
113
+ */
114
+ getImage(level?: number, layer?: number, faceSlice?: number): Uint8Array;
115
+
116
+ /**
117
+ * Returns the block layout for a transcode target or Vulkan format.
118
+ *
119
+ * {@link KtxTranscodeFormat} and {@link VkFormat} overlap numerically
120
+ * (for example both use `13`). Implementations must tell them apart by
121
+ * which enumeration the caller passed, not by the number alone.
122
+ *
123
+ * @param format - Transcode target or Vulkan format.
124
+ * @returns Block width, height, depth, and byte size for `format`.
125
+ */
126
+ getTextureFormatInfo(format: KtxTranscodeFormat | VkFormat): TextureFormatInfo;
127
+
128
+ /**
129
+ * Creates a copy of the texture.
130
+ *
131
+ * @returns The copied texture.
132
+ */
133
+ createCopy(): IKtx2Texture;
134
+
135
+ /**
136
+ * Replaces one image with bytes from memory.
137
+ *
138
+ * @param level - Mipmap level.
139
+ * @param layer - Array layer.
140
+ * @param faceSlice - Face or slice index.
141
+ * @param imageData - Image bytes.
142
+ * @returns The error code.
143
+ */
144
+ setImageFromMemory(level: number, layer: number, faceSlice: number, imageData: ArrayBufferView): KtxErrorCode;
145
+
146
+ /**
147
+ * Writes the texture container to memory.
148
+ *
149
+ * @returns The KTX or KTX2 file bytes.
150
+ */
151
+ writeToMemory(): ArrayBufferView;
152
+
153
+ /**
154
+ * Deflates the KTX2 data with ZLIB.
155
+ *
156
+ * On success, the level index, data size, DFD, data pointer, and
157
+ * supercompression scheme are updated.
158
+ *
159
+ * @param compressionLevel - Compression level from 1 to 9. Lower is faster.
160
+ * @returns The error code.
161
+ */
162
+ deflateZlib(compressionLevel: number): KtxErrorCode;
163
+
164
+ /**
165
+ * Deflates the KTX2 data with Zstandard.
166
+ *
167
+ * On success, the level index, data size, DFD, data pointer, and
168
+ * supercompression scheme are updated.
169
+ *
170
+ * @param compressionLevel - Compression level from 1 to 22. Lower is faster.
171
+ * Values above 20 use more memory.
172
+ * @returns The error code.
173
+ */
174
+ deflateZstd(compressionLevel: number): KtxErrorCode;
175
+
176
+ /** Deletes the texture and releases its native resources. */
177
+ delete(): void;
178
+ }
@@ -0,0 +1,98 @@
1
+ import {KtxUastcFlags} from "./KtxUastcFlags.ts";
2
+
3
+ /**
4
+ * Parameters for Basis Universal supercompression.
5
+ *
6
+ * Field meanings follow libktx `ktxBasisParams`. Every field is optional on
7
+ * this interface; callers that need a non-default ETC1S compression level
8
+ * must set {@link IKtxBasisParams.compressionLevel} explicitly, because `0`
9
+ * is a valid level.
10
+ */
11
+ export interface IKtxBasisParams {
12
+
13
+ /**
14
+ * ETC1S encoding speed versus quality.
15
+ *
16
+ * libktx 4.3 documents the range as `[0, 5]`. libktx 4.4 documents
17
+ * `[0, 6]`, with the higher levels intended for video. Higher values are
18
+ * slower and produce higher quality. There is no implicit default: `0`
19
+ * is a valid level, so callers set this themselves. The usual KTX default
20
+ * level is `2`.
21
+ */
22
+ compressionLevel?: number;
23
+
24
+ /**
25
+ * ETC1S visual quality target.
26
+ *
27
+ * Range is `[1, 255]`. Lower values compress more, run faster, and keep
28
+ * less quality. Higher values compress less, run slower, and keep more
29
+ * quality. This selects the endpoint and selector counts and the RDO
30
+ * thresholds. Setting those lower-level parameters yourself overrides the
31
+ * values chosen from this level. libktx uses the quality level to choose
32
+ * the RDO thresholds only when the level is above `128`; otherwise those
33
+ * thresholds stay at their own defaults. When neither this nor both
34
+ * endpoint and selector counts are set, libktx uses `128`.
35
+ */
36
+ qualityLevel?: number;
37
+
38
+ /**
39
+ * `true` to encode UASTC. `false` to encode ETC1S.
40
+ */
41
+ uastc?: boolean;
42
+
43
+ /**
44
+ * UASTC encoding options.
45
+ *
46
+ * A combination of {@link KtxUastcFlags}. Level values in bits 0–3 are
47
+ * mutually exclusive. Hints at bit 4 and above can be combined with a
48
+ * level. {@link KtxUastcFlags.FAVOR_UASTC_ERROR} is inside the level mask.
49
+ */
50
+ uastcFlags?: KtxUastcFlags;
51
+
52
+ /**
53
+ * Tune codec parameters for normal maps and set the texture DFD accordingly.
54
+ *
55
+ * Disables selector and endpoint RDO. Only valid for linear textures.
56
+ */
57
+ normalMap?: boolean;
58
+
59
+ /**
60
+ * Number of threads used for compression.
61
+ *
62
+ * @defaultValue 1
63
+ */
64
+ threadCount?: number;
65
+
66
+ /**
67
+ * Swizzle applied before encoding.
68
+ *
69
+ * Four entries, each one of `"r"`, `"g"`, `"b"`, `"a"`, `"0"`, or `"1"`.
70
+ * The KTX C API types the same value as a 4-character string matching
71
+ * `/^[rgba01]{4}$/`. Usable with both ETC1S and UASTC.
72
+ *
73
+ * If both this swizzle and a pre-swizzle are specified,
74
+ * `ktxTexture_CompressBasisEx` raises `KTX_INVALID_OPERATION`.
75
+ */
76
+ inputSwizzle?: string[];
77
+
78
+ /**
79
+ * Enable Rate Distortion Optimization post-processing for UASTC.
80
+ */
81
+ uastcRDO?: boolean;
82
+
83
+ /**
84
+ * UASTC RDO quality scalar (lambda).
85
+ *
86
+ * Lower values yield higher quality and larger LZ-compressed files.
87
+ * Higher values yield lower quality and smaller LZ-compressed files.
88
+ * A useful range to try is `[0.2, 4]`. The full range is `[0.001, 50]`.
89
+ *
90
+ * @defaultValue 1
91
+ */
92
+ uastcRDOQualityScalar?: number;
93
+
94
+ /**
95
+ * When `true`, the encoder may print operation details.
96
+ */
97
+ verbose?: boolean;
98
+ }
@@ -0,0 +1,27 @@
1
+ import type {VkFormat} from "./VkFormat.ts";
2
+
3
+ /**
4
+ * Parameters for creating an empty 2D KTX2 texture.
5
+ */
6
+ export interface IKtxTextureCreateInfo {
7
+
8
+ /** Base width of the texture, in pixels. */
9
+ baseWidth: number;
10
+
11
+ /** Base height of the texture, in pixels. */
12
+ baseHeight: number;
13
+
14
+ /**
15
+ * Vulkan format of the image data.
16
+ *
17
+ * When omitted, the `ris-ktx2` implementation uses {@link VkFormat.R8G8B8A8_SRGB}.
18
+ */
19
+ vkFormat?: VkFormat;
20
+
21
+ /**
22
+ * Number of mipmap levels.
23
+ *
24
+ * @defaultValue 1
25
+ */
26
+ numLevels?: number;
27
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How image storage is allocated when a KTX2 texture is created.
3
+ *
4
+ * Values match libktx `ktxTextureCreateStorageEnum`:
5
+ * `KTX_TEXTURE_CREATE_NO_STORAGE` is `0` and
6
+ * `KTX_TEXTURE_CREATE_ALLOC_STORAGE` is `1`.
7
+ */
8
+ export enum KtxCreateStorage {
9
+ /** Do not allocate image storage. */
10
+ NO_STORAGE = 0,
11
+
12
+ /** Allocate image storage for the texture. */
13
+ ALLOC_STORAGE = 1,
14
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Result codes returned by KTX2 texture operations.
3
+ *
4
+ * Names and numeric values match libktx `ktx_error_code_e`.
5
+ * `KTX_ERROR_MAX_ENUM` is not a member: in libktx it aliases
6
+ * {@link KtxErrorCode.DECOMPRESS_CHECKSUM_ERROR} and is not a distinct result.
7
+ */
8
+ export enum KtxErrorCode {
9
+ /** The operation succeeded. */
10
+ SUCCESS = 0,
11
+
12
+ /** The file data does not match the KTX specification. */
13
+ FILE_DATA_ERROR = 1,
14
+
15
+ /** The file is a pipe or a named pipe. */
16
+ FILE_ISPIPE = 2,
17
+
18
+ /** The target file could not be opened. */
19
+ FILE_OPEN_FAILED = 3,
20
+
21
+ /** The operation would exceed the maximum file size. */
22
+ FILE_OVERFLOW = 4,
23
+
24
+ /** Reading the file failed. */
25
+ FILE_READ_ERROR = 5,
26
+
27
+ /** Seeking in the file failed. */
28
+ FILE_SEEK_ERROR = 6,
29
+
30
+ /** The file ended before the requested data was read. */
31
+ FILE_UNEXPECTED_EOF = 7,
32
+
33
+ /** Writing the file failed. */
34
+ FILE_WRITE_ERROR = 8,
35
+
36
+ /** An OpenGL call failed. */
37
+ GL_ERROR = 9,
38
+
39
+ /** The operation is not allowed in the current state. */
40
+ INVALID_OPERATION = 10,
41
+
42
+ /** A parameter value was not valid. */
43
+ INVALID_VALUE = 11,
44
+
45
+ /** A metadata key was missing, or a required GPU entry point was not found. */
46
+ NOT_FOUND = 12,
47
+
48
+ /** Not enough memory to complete the operation. */
49
+ OUT_OF_MEMORY = 13,
50
+
51
+ /** Transcoding a block-compressed texture failed. */
52
+ TRANSCODE_FAILED = 14,
53
+
54
+ /** The file is not a KTX file. */
55
+ UNKNOWN_FILE_FORMAT = 15,
56
+
57
+ /** The file requests a texture type this library does not support. */
58
+ UNSUPPORTED_TEXTURE_TYPE = 16,
59
+
60
+ /** The feature is not built into this library, or it is not implemented yet. */
61
+ UNSUPPORTED_FEATURE = 17,
62
+
63
+ /** An OpenGL or Vulkan dependency is not linked into the application. */
64
+ LIBRARY_NOT_LINKED = 18,
65
+
66
+ /** The decompressed byte count does not match the expected size. */
67
+ DECOMPRESS_LENGTH_ERROR = 19,
68
+
69
+ /** A checksum did not match while decompressing. */
70
+ DECOMPRESS_CHECKSUM_ERROR = 20,
71
+ }