C Specification

To get memory usage information for a command pool object, call:

// Provided by VKSC_VERSION_1_0
void vkGetCommandPoolMemoryConsumption(
    VkDevice                                    device,
    VkCommandPool                               commandPool,
    VkCommandBuffer                             commandBuffer,
    VkCommandPoolMemoryConsumption*             pConsumption);

Parameters

  • device is the logical device that owns the command pool.

  • commandPool is the command pool from which to query the memory usage.

  • commandBuffer is an optional command buffer from which to query the memory usage.

  • pConsumption is a pointer to a VkCommandPoolMemoryConsumption structure where the memory usage is written.

Description

Valid Usage (Implicit)
  • VUID-vkGetCommandPoolMemoryConsumption-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetCommandPoolMemoryConsumption-commandPool-parameter
    commandPool must be a valid VkCommandPool handle

  • VUID-vkGetCommandPoolMemoryConsumption-commandBuffer-parameter
    If commandBuffer is not NULL, commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkGetCommandPoolMemoryConsumption-pConsumption-parameter
    pConsumption must be a valid pointer to a VkCommandPoolMemoryConsumption structure

  • VUID-vkGetCommandPoolMemoryConsumption-commandPool-parent
    commandPool must have been created, allocated, or retrieved from device

  • VUID-vkGetCommandPoolMemoryConsumption-commandBuffer-parent
    If commandBuffer is a valid handle, it must have been created, allocated, or retrieved from commandPool

Host Synchronization
  • Host access to commandPool must be externally synchronized

  • Host access to commandBuffer must be externally synchronized

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0