RGBA8-UNORM is a Value that stores the four UNORM8 components R, G, B, and A packed in a fixed Payload of 2 WORD.
Layout
- Code: Value
VALUE-ISSUER-2WORD(0x09DL), Issuer0x0000000EKHRONOS, codec number0x00000000. Family NUMERIC.
TAG WORD 0x09D6 (0000 1001 1101 0110) 7 WORD in total
Issuer 2 WORD 0x0000000E (KHRONOS)
Codec number 2 WORD 0x00000000
Payload WORD 1st: [R: upper 8bit][G: lower 8bit]
Payload WORD 2nd: [B: upper 8bit][A: lower 8bit]
Interpretation rules
- The serialized byte order is
R, G, B, A, and the value of each component bytebisb / 255. - This corresponds to the byte 0–3 component order and the UNORM numeric mapping of Vulkan
VK_FORMAT_R8G8B8A8_UNORM. - It is not an
_SRGBformat, so it does not imply sRGB or any other color space or transfer function. Alpha is also a UNORM value, but whether it is straight or premultiplied and its compositing semantics are external context. There is no ABI padding.
Validity
- Every 8-bit pattern is valid. The Payload must be exactly 2 WORD.
Standards basis and formal status
- The component memory order and the UNORM meaning follow
VK_FORMAT_R8G8B8A8_UNORMof the Khronos Vulkan Formats specification and the Vulkan registry. - The GEUL TAG/Length and the two 16-bit big-endian WORD framing are GEUL-specific rules and do not define the serialization of a Vulkan image itself.
Length
- The total is exactly 7 WORD: TAG 1 WORD, Issuer 2 WORD, codec number 2 WORD, and Payload 2 WORD, and it uses the direct length
LLLL=0110. There is no Length extension TAG, no descriptor, and no padding. - If the Payload is not exactly 2 WORD, it is rejected.
Example
- The Payload
FF00 0080is the bytesR=FF, G=00, B=00, A=80.