6. Descriptor block

Each Descriptor Block has the same prefix:

Table 9. Descriptor Block layout

uint32_t

vendor_id | descriptor_type << 16

uint32_t

version_number | descriptor_block_size << 16

Format-specific data


The vendor_id is a 16-bit value uniquely assigned to organisations, allocated by Khronos; ID 0 is used to identify Khronos itself. The ID 0xFFFF is reserved for internal use which is guaranteed not to clash with third-party implementations; this ID should not be shipped in libraries to avoid conflicts with development code.

The descriptor_type is a unique identifier defined by the vendor to distinguish between potential data representations.

The version_number is vendor-defined, and intended to allow for backwards-compatible updates to existing descriptor blocks.

The descriptor_block_size indicates the size in bytes of this Descriptor Block, remembering that there may be multiple Descriptor Blocks within one container. The descriptor_block_size therefore gives the offset between the start of the current Descriptor Block and the start of the next — so the size includes the vendor_id, descriptor_type, version_number and descriptor_block_size fields, which collectively contribute 8 bytes.

Having an explicit descriptor_block_size allows implementations to skip a descriptor block whose format is unknown, allowing known data to be interpreted and unknown information to be ignored. Some descriptor block types may not be of a uniform size, and may vary according to the content within.

This specification initially describes only one type of descriptor block. Future revisions may define additional descriptor block types for additional applications — for example, to describe data with a large number of channels or pixels described in an arbitrary color space. Vendors can also implement proprietary descriptor blocks to hold vendor-specific information within the standard Descriptor.

Table 10. Data format descriptor header and descriptor block headers

total_size

vendor_id | descriptor_type

version_number | descriptor_block_size

:

vendor_id | descriptor_type

version_number | descriptor_block_size

: