vkGetPipelineExecutableStatisticsKHR(3)

# vkGetPipelineExecutableStatisticsKHR(3) Manual Page

## Name

vkGetPipelineExecutableStatisticsKHR - Get compile time statistics associated with a pipeline executable

Loading… please wait.

## 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 either `NULL` 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 `vkGetPipelineExecutableStatisticsKHR` will return `VK_INCOMPLETE`.

Valid Usage

- VUID-vkGetPipelineExecutableStatisticsKHR-pipelineExecutableInfo-03272
  `pipelineExecutableInfo` must be enabled

- VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03273
  `pipeline` member of `pExecutableInfo` must have been created with `device`

- VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274
  `pipeline` member of `pExecutableInfo` must have been created with `VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR` set in the `flags` field of VkGraphicsPipelineCreateInfo or VkComputePipelineCreateInfo

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

Return Codes

On success, this command returns

  - `VK_SUCCESS`

  - `VK_INCOMPLETE`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

## See Also

VkDevice, VkPipelineExecutableInfoKHR, VkPipelineExecutableStatisticKHR

## 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.

## Copyright

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0