Each pipeline executable may have a set of statistics associated with it that are generated by the pipeline compilation process. These statistics may include things such as instruction counts, amount of spilling (if any), maximum number of simultaneous threads, or anything else which may aid developers in evaluating the expected performance of a shader. To query the compile-time statistics associated with a pipeline executable, call:
// Provided by VK_KHR_pipeline_executable_properties VkResult vkGetPipelineExecutableStatisticsKHR( VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics);
deviceis the device that created the pipeline.
pExecutableInfodescribes the pipeline executable being queried.
pStatisticCountis a pointer to an integer related to the number of statistics available or queried, as described below.
NULLor a pointer to an array of VkPipelineExecutableStatisticKHR structures.
NULL, then the number of statistics associated
with the pipeline executable is returned in
pStatisticCount must point to a variable set by the user
to the number of elements in the
pStatistics array, and on return the
variable is overwritten with the number of structures actually written to
pStatisticCount is less than the number of statistics associated
with the pipeline executable, at most
pStatisticCount structures will
be written and
vkGetPipelineExecutableStatisticsKHR will return
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.