Function Prototype

vkGetPipelineBinaryDataKHR

Get the data store from a pipeline binary

Data can be retrieved from a pipeline binary object using the command:

VkResult vkGetPipelineBinaryDataKHR(
    VkDevice device,
    const VkPipelineBinaryDataInfoKHR* pInfo,
    VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
    size_t* pPipelineBinaryDataSize,
    void* pPipelineBinaryData);
  • device is the logical device that created the pipeline binary.
  • pInfo is a pointer to a VkPipelineBinaryDataInfoKHR structure which describes the pipeline binary to get data from.
  • pPipelineBinaryKey is a pointer to a VkPipelineBinaryKeyKHR structure where the key for this binary will be written.
  • pPipelineBinaryDataSize is a pointer to a size_t value related to the amount of data in the pipeline binary, as described below.
  • pPipelineBinaryData is either NULL or a pointer to a buffer.

If pPipelineBinaryData is NULL, then the size of the data, in bytes, that is required to store the binary is returned in pPipelineBinaryDataSize. Otherwise, pPipelineBinaryDataSize must contain the size of the buffer, in bytes, pointed to by pPipelineBinaryData, and on return pPipelineBinaryDataSize is overwritten with the size of the data, in bytes, that is required to store the binary. If pPipelineBinaryDataSize is less than the size that is required to store the binary, nothing is written to pPipelineBinaryData and VK_ERROR_NOT_ENOUGH_SPACE_KHR will be returned, instead of VK_SUCCESS.

If pipelineBinaryCompressedData is VK_FALSE, implementations should not return compressed pipeline binary data to the application.

Valid Usage (Implicit)

VUID-vkGetPipelineBinaryDataKHR-pInfo-parameter

pInfo must be a valid pointer to a valid VkPipelineBinaryDataInfoKHR structure

VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryKey-parameter

pPipelineBinaryKey must be a valid pointer to a VkPipelineBinaryKeyKHR structure

VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryDataSize-parameter

pPipelineBinaryDataSize must be a valid pointer to a size_t value

VUID-vkGetPipelineBinaryDataKHR-pPipelineBinaryData-parameter

If the value referenced by pPipelineBinaryDataSize is not 0, and pPipelineBinaryData is not NULL, pPipelineBinaryData must be a valid pointer to an array of pPipelineBinaryDataSize bytes