C Specification

To query sparse memory requirements for an image, call:

// Provided by VK_VERSION_1_1
void vkGetImageSparseMemoryRequirements2(
    VkDevice                                    device,
    const VkImageSparseMemoryRequirementsInfo2* pInfo,
    uint32_t*                                   pSparseMemoryRequirementCount,
    VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

or the equivalent command

// Provided by VK_KHR_get_memory_requirements2
void vkGetImageSparseMemoryRequirements2KHR(
    VkDevice                                    device,
    const VkImageSparseMemoryRequirementsInfo2* pInfo,
    uint32_t*                                   pSparseMemoryRequirementCount,
    VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements);

Parameters

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

Description

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

  • VUID-vkGetImageSparseMemoryRequirements2-pInfo-parameter
    pInfo must be a valid pointer to a valid VkImageSparseMemoryRequirementsInfo2 structure

  • 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

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 (c) 2014-2020 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0