Data can be retrieved from a validation cache object using the command:
VkResult vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData);
deviceis the logical device that owns the validation cache.
validationCacheis the validation cache to retrieve data from.
pDataSizeis a pointer to a value related to the amount of data in the validation cache, as described below.
NULLor a pointer to a buffer.
NULL, then the maximum size of the data that can be
retrieved from the validation cache, in bytes, is returned in
pDataSize must point to a variable set by the user to the
size of the buffer, in bytes, pointed to by
pData, and on return the
variable is overwritten with the amount of data actually written to
pDataSize is less than the maximum size that can be retrieved by
the validation cache, at most
pDataSize bytes will be written to
vkGetValidationCacheDataEXT will return
Any data written to
pData is valid and can be provided as the
pInitialData member of the
structure passed to
Two calls to
vkGetValidationCacheDataEXT with the same parameters
must retrieve the same data unless a command that modifies the contents of
the cache is called between them.
Applications can store the data retrieved from the validation cache, and
use these data, possibly in a future run of the application, to populate new
validation cache objects.
The results of validation, however, may depend on the vendor ID, device ID,
driver version, and other details of the device.
To enable applications to detect when previously retrieved data is
incompatible with the device, the initial bytes written to
be a header consisting of the following members:
length in bytes of the entire validation cache header written as a stream of bytes, with the least significant byte first
a VkValidationCacheHeaderVersionEXT value written as a stream of bytes, with the least significant byte first
a layer commit ID expressed as a UUID, which uniquely identifies the version of the validation layers used to generate these validation results
The first four bytes encode the length of the entire validation cache header, in bytes. This value includes all fields in the header including the validation cache version field and the size of the length field.
The next four bytes encode the validation cache version, as described for VkValidationCacheHeaderVersionEXT. A consumer of the validation cache should use the cache version to interpret the remainder of the cache header.
pDataSize is less than what is necessary to store this header,
nothing will be written to
pData and zero will be written to
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 (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.