C Specification
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);
Parameters
-
device
is the device that created the pipeline. -
pExecutableInfo
describes the pipeline executable being queried. -
pStatisticCount
is a pointer to an integer related to the number of statistics available or queried, as described below. -
pStatistics
is eitherNULL
or a pointer to an array of VkPipelineExecutableStatisticKHR structures.
Description
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 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
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.
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.