C Specification

Each pipeline cache stage validation index entry consists of a VkPipelineCacheStageValidationIndexEntry structure:

// Provided by VKSC_VERSION_1_0
typedef struct VkPipelineCacheStageValidationIndexEntry {
    uint64_t    codeSize;
    uint64_t    codeOffset;
} VkPipelineCacheStageValidationIndexEntry;

Members

  • codeSize is the size in bytes of the SPIR-V module for this pipeline stage.

  • codeOffset is the offset in bytes from the beginning of the pipeline cache header to the SPIR-V module for this pipeline stage.

Description

The data at codeOffset consists of codeSize bytes of SPIR-V module as described in Appendix A that was used by the offline pipeline compiler for this shader stage when creating this pipeline cache entry.

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 16 bytes. If a compiler produces code that diverges from that pattern, applications must employ another method to set values at the correct offsets.

Valid Usage
  • VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05085
    codeSize must be greater than 0

  • VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05086
    codeSize must be a multiple of 4

  • VUID-VkPipelineCacheStageValidationIndexEntry-codeOffset-05087
    codeOffset + codeSize must not exceed the size of the pipeline cache

See Also

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.

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0