C Specification
Version one of the pipeline cache header for Vulkan SC is defined as:
// Provided by VKSC_VERSION_1_0
typedef struct VkPipelineCacheHeaderVersionSafetyCriticalOne {
VkPipelineCacheHeaderVersionOne headerVersionOne;
VkPipelineCacheValidationVersion validationVersion;
uint32_t implementationData;
uint32_t pipelineIndexCount;
uint32_t pipelineIndexStride;
uint64_t pipelineIndexOffset;
} VkPipelineCacheHeaderVersionSafetyCriticalOne;
Members
-
headerVersionOne
is a VkPipelineCacheHeaderVersionOne structure. -
validationVersion
is a VkPipelineCacheValidationVersion enum value specifying the version of any validation information that is included in this pipeline cache. -
implementationData
is 4 bytes of padding to ensure structure members are consistently aligned on all platforms. The contents of this field may be used for implementation-specific information. -
pipelineIndexCount
is the number of entries contained in the pipeline cache index. -
pipelineIndexStride
is the number of bytes between consecutive pipeline cache index entries. -
pipelineIndexOffset
is the offset in bytes from the beginning of the pipeline cache header to the pipeline cache index.
Description
The pipeline cache index consists of
pipelineIndexCount
VkPipelineCacheSafetyCriticalIndexEntry
structures containing an index of all the pipelines in this cache.
The pipeline cache index is located starting at pipelineIndexOffset
bytes into the cache and the location of pipeline i
is calculated as:
pipelineIndexOffset
+ i
× pipelineIndexStride
.
The VkPipelineCacheSafetyCriticalIndexEntry structures may not be
tightly packed, enabling additional implementation-specific data to be
stored with each entry, or for future extensibility.
Note
Because the pipeline cache index is keyed by pipeline identifier, applications and offline compilers must ensure that there are no pipelines with identical pipeline indentifiers in the same pipeline cache. |
Unlike most structures declared by the Vulkan API, all fields of this structure are written with the least significant byte first, regardless of host byte-order.
The C language specification does not define the packing of structure members. This layout assumes tight structure member packing, with members laid out in the order listed in the structure, and the intended size of the structure is 56 bytes. If a compiler produces code that diverges from that pattern, applications must employ another method to set values at the correct offsets.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.