vkGetPipelineExecutableStatisticsKHR
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:
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.pStatisticsis eitherNULLor a pointer to an array of VkPipelineExecutableStatisticKHR structures.
If pStatistics is NULL, then the number of statistics associated
with the pipeline executable is returned in pStatisticCount.
Otherwise, pStatisticCount must point to a variable set by the
application to the number of elements in the pStatistics array, and on
return the variable is overwritten with the number of structures actually
written to pStatistics.
If pStatisticCount is less than the number of statistics associated
with the pipeline executable, at most pStatisticCount structures will
be written, and VK_INCOMPLETE will be returned instead of
VK_SUCCESS, to indicate that not all the available statistics were
returned.
Valid Usage
VUID-vkGetPipelineExecutableStatisticsKHR-pipelineExecutableInfo-03272
The pipelineExecutableInfo
feature must be enabled
VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03273
The pipeline member of pExecutableInfo must have been
created with device
VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274
The pipeline member of pExecutableInfo must have been
created with VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR
Valid Usage (Implicit)
VUID-vkGetPipelineExecutableStatisticsKHR-device-parameter
device must be a valid VkDevice handle
VUID-vkGetPipelineExecutableStatisticsKHR-pExecutableInfo-parameter
pExecutableInfo must be a valid pointer to a valid VkPipelineExecutableInfoKHR structure
VUID-vkGetPipelineExecutableStatisticsKHR-pStatisticCount-parameter
pStatisticCount must be a valid pointer to a uint32_t value
VUID-vkGetPipelineExecutableStatisticsKHR-pStatistics-parameter
If the value referenced by pStatisticCount is not 0, and pStatistics is not NULL, pStatistics must be a valid pointer to an array of pStatisticCount VkPipelineExecutableStatisticKHR structures