Function Prototype

vkGetImageSparseMemoryRequirements2

Query the memory requirements for a sparse image

To query sparse memory requirements for an image, call:

void vkGetImageSparseMemoryRequirements2KHR(
    VkDevice device,
    const VkImageSparseMemoryRequirementsInfo2* pInfo,
    uint32_t* pSparseMemoryRequirementCount,
    VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
  • device is the logical device that owns the image.
  • pInfo is a pointer to a VkImageSparseMemoryRequirementsInfo2 structure containing parameters required for the memory requirements query.
  • pSparseMemoryRequirementCount is a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.
  • pSparseMemoryRequirements is either NULL or a pointer to an array of VkSparseImageMemoryRequirements2 structures.

Valid Usage (Implicit)

VUID-vkGetImageSparseMemoryRequirements2-pSparseMemoryRequirementCount-parameter

pSparseMemoryRequirementCount must be a valid pointer to a uint32_t value

VUID-vkGetImageSparseMemoryRequirements2-pSparseMemoryRequirements-parameter

If the value referenced by pSparseMemoryRequirementCount is not 0, and pSparseMemoryRequirements is not NULL, pSparseMemoryRequirements must be a valid pointer to an array of pSparseMemoryRequirementCount VkSparseImageMemoryRequirements2 structures