To query sparse memory requirements for an image, call:
void vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
deviceis the logical device that owns the image.
imageis the VkImage object to get the memory requirements for.
pSparseMemoryRequirementCountis a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.
NULLor a pointer to an array of
NULL, then the number of sparse
memory requirements available is returned in
pSparseMemoryRequirementCount must point to a variable set
by the user to the number of elements in the
array, and on return the variable is overwritten with the number of
structures actually written to
pSparseMemoryRequirementCount is less than the number of sparse
memory requirements available, at most
structures will be written.
If the image was not created with
pSparseMemoryRequirementCount will be set to zero and
pSparseMemoryRequirements will not be written to.
It is legal for an implementation to report a larger value in
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 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.