From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:KTX and KTX2 (Khronos texture)" |
|---|
| claim | "The KTX 2 header is 80 bytes: identifier, vkFormat, size/count fields, supercompressionScheme, and index entries for the data format descriptor, key/value data (32-bit) and supercompression global data (64-bit)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "KTX 2 files" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "KTX_header2" |
|---|
| size | "0x50" |
|---|
| variant | "KTX2" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 12 |
|---|
| type | "uint8_t[12]" |
|---|
| name | "identifier" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "vkFormat" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "typeSize" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "pixelWidth" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "pixelHeight" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "pixelDepth" |
|---|
|
| offset | "0x20" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "layerCount" |
|---|
|
| offset | "0x24" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "faceCount" |
|---|
|
| offset | "0x28" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "levelCount" |
|---|
|
| offset | "0x2C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "supercompressionScheme" |
|---|
|
| offset | "0x30" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "dfdByteOffset" |
|---|
|
| offset | "0x34" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "dfdByteLength" |
|---|
|
| offset | "0x38" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "kvdByteOffset" |
|---|
|
| offset | "0x3C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "kvdByteLength" |
|---|
|
| offset | "0x40" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "sgdByteOffset" |
|---|
|
| offset | "0x48" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "sgdByteLength" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct KTX_header2 (dataFormatDescriptor and keyValueData as ktxIndexEntry32, supercompressionGlobalData as ktxIndexEntry64, declared earlier in the same file) with the size assertion against KTX2_HEADER_SIZE 80; offsets computed from declaration order" |
|---|
| repo | "https://github.com/KhronosGroup/KTX-Software" |
|---|
| commit | "2f7a0b07024dd4b35f2bc2f4c3a25fe159a91c28" |
|---|
| path | "lib/src/ktxint.h" |
|---|
| lines | "110-127" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "KTX 2 header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:04:28.698Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:16:54.819Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read KTX_header2, ktxIndexEntry32/64 in ktxint.h at the cited commit: 12+9*4+2*8 (two 32-bit entries)+16 = 80." |
|---|
|
|
|---|