Skip to main content

Module texture_ktx2

Module texture_ktx2 

Source
Expand description

Allocation-free KTX2 container metadata and level-range parser (native + WASM). Allocation-free KTX2 container metadata and level-range parser (native + WASM).

Structs§

Ktx2Document
A borrowed KTX2 container. Every exposed section has passed checked bounds and overlap tests.
Ktx2Level
One level-index record and its compressed/encoded byte range.

Enums§

HardwareCompressedUploadFormat
Hardware-native compressed GPU texture format for direct zero-inflation wgpu upload.
Ktx2ColorSpace
Transfer-function information that is safe to carry across a decode/transcode boundary.
Ktx2Error
Structural error found while inspecting a KTX2 byte stream.
Ktx2Supercompression
The KTX2 supercompression schemes understood by the container parser.
Ktx2TranscodeSource
A source encoding which requires a real transcoder before it can become RGBA8.

Constants§

KTX2_IDENTIFIER
The 12-byte identifier mandated by the KTX2 container format.

Functions§

select_hardware_compressed_format
Select a direct hardware-compressed upload format when the KTX2 document’s vk_format matches an enabled GPU compression feature (BC, ASTC, or ETC2), avoiding CPU RGBA8 inflation.