C Specification

To get memory requirements for a video session, call:

// Provided by VK_KHR_video_queue
VkResult vkGetVideoSessionMemoryRequirementsKHR(
    VkDevice                                    device,
    VkVideoSessionKHR                           videoSession,
    uint32_t*                                   pVideoSessionMemoryRequirementsCount,
    VkVideoGetMemoryPropertiesKHR*              pVideoSessionMemoryRequirements);


  • device is the logical device that owns the video session.

  • videoSession is the video session to query.

  • pVideoSessionMemoryRequirementsCount is the number of the memory requirements structures of type VkVideoGetMemoryPropertiesKHR that pVideoSessionMemoryRequirements points to.

  • pVideoSessionMemoryRequirements is the pointer to an instance of the VkVideoGetMemoryPropertiesKHR in which the memory heap requirements of the video session are returned - one entry for each memory heap type required by the implementation.


If pVideoSessionMemoryRequirements is NULL, then the number of memory heap types required for the video session is returned in pVideoSessionMemoryRequirementsCount. Otherwise, pVideoSessionMemoryRequirementsCount must point to a variable set by the user with the number of elements in the pVideoSessionMemoryRequirements array, and on return the variable is overwritten with the number of formats actually written to pVideoSessionMemoryRequirements. If pVideoSessionMemoryRequirementsCount is less than the number of memory heap types required for the video session then at most pVideoSessionMemoryRequirementsCount elements will be written to pVideoSessionMemoryRequirements, and VK_INCOMPLETE will be returned, instead of VK_SUCCESS, to indicate that not all required memory heap types were returned.

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

  • VUID-vkGetVideoSessionMemoryRequirementsKHR-videoSession-parameter
    videoSession must be a valid VkVideoSessionKHR handle

  • VUID-vkGetVideoSessionMemoryRequirementsKHR-pVideoSessionMemoryRequirementsCount-parameter
    pVideoSessionMemoryRequirementsCount must be a valid pointer to a uint32_t value

  • VUID-vkGetVideoSessionMemoryRequirementsKHR-pVideoSessionMemoryRequirements-parameter
    If pVideoSessionMemoryRequirements is not NULL, pVideoSessionMemoryRequirements must be a valid pointer to an array of pVideoSessionMemoryRequirementsCount VkVideoGetMemoryPropertiesKHR structures

  • VUID-vkGetVideoSessionMemoryRequirementsKHR-pVideoSessionMemoryRequirementsCount-arraylength
    If pVideoSessionMemoryRequirements is not NULL, the value referenced by pVideoSessionMemoryRequirementsCount must be greater than 0

  • VUID-vkGetVideoSessionMemoryRequirementsKHR-videoSession-parent
    videoSession must have been created, allocated, or retrieved from device

Return Codes
On success, this command returns


On failure, this command returns

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

SPDX-License-Identifier: CC-BY-4.0