6. Descriptor block

Each Descriptor Block has the same prefix:

Table 6. Descriptor Block layout

uint32_t

vendorId | (descriptorType << 16)

uint32_t

versionNumber | (descriptorBlockSize << 16)

Format-specific data


The vendorId 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 descriptorType is a unique identifier defined by the vendor to distinguish between potential data representations.

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

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

Having an explicit descriptorBlockSize 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 7. Data format descriptor header and descriptor block headers

totalSize

vendorId | (descriptorType << 16)

versionNumber | (descriptorBlockSize << 16)

:

vendorId | (descriptorType << 16)

versionNumber | (descriptorBlockSize << 16)

: