C Specification
Data can be retrieved from a pipeline binary object using the command:
// Provided by VK_KHR_pipeline_binary
VkResult vkGetPipelineBinaryDataKHR(
VkDevice device,
const VkPipelineBinaryDataInfoKHR* pInfo,
VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
size_t* pPipelineBinaryDataSize,
void* pPipelineBinaryData);
Parameters
-
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 asize_t
value related to the amount of data in the pipeline binary, as described below. -
pPipelineBinaryData
is eitherNULL
or a pointer to a buffer.
Description
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 the call returns one of the success return codes, the pipeline binary key
is written to pPipelineBinaryKey
, regardless of whether
pPipelineBinaryData
is NULL
or not.
If pipelineBinaryCompressedData is
VK_FALSE
, implementations should not return compressed pipeline
binary data to the application.
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.