Function Prototype

vkGetImageMemoryRequirements

Returns the memory requirements for specified Vulkan object

To determine the memory requirements for an image resource which is not created with the VK_IMAGE_CREATE_DISJOINT_BIT flag set, call:

void vkGetImageMemoryRequirements(
    VkDevice device,
    VkImage image,
    VkMemoryRequirements* pMemoryRequirements);
  • device is the logical device that owns the image.
  • image is the image to query.
  • pMemoryRequirements is a pointer to a VkMemoryRequirements structure in which the memory requirements of the image object are returned.

Valid Usage

VUID-vkGetImageMemoryRequirements-image-01588

image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT flag set

VUID-vkGetImageMemoryRequirements-image-04004

If image was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID external memory handle type, then image must be bound to memory

VUID-vkGetImageMemoryRequirements-image-08960

If image was created with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX external memory handle type, then image must be bound to memory

Valid Usage (Implicit)

VUID-vkGetImageMemoryRequirements-pMemoryRequirements-parameter

pMemoryRequirements must be a valid pointer to a VkMemoryRequirements structure

VUID-vkGetImageMemoryRequirements-image-parent

image must have been created, allocated, or retrieved from device