Function Prototype
vkGetDeviceMemoryCommitment
Query the current commitment for a VkDeviceMemory
To determine the amount of lazily-allocated memory that is currently committed for a memory object, call:
void vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize* pCommittedMemoryInBytes);
deviceis the logical device that owns the memory.memoryis the memory object being queried.pCommittedMemoryInBytesis a pointer to a VkDeviceSize value in which the number of bytes currently committed is returned, on success.
The implementation may update the commitment at any time, and the value returned by this query may be out of date.
The implementation guarantees to allocate any committed memory from the
heapIndex indicated by the memory type that the memory object was
created with.
Valid Usage
VUID-vkGetDeviceMemoryCommitment-memory-00690
memory must have been created with a memory type that reports
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
Valid Usage (Implicit)
VUID-vkGetDeviceMemoryCommitment-device-parameter
device must be a valid VkDevice handle
VUID-vkGetDeviceMemoryCommitment-memory-parameter
memory must be a valid VkDeviceMemory handle
VUID-vkGetDeviceMemoryCommitment-pCommittedMemoryInBytes-parameter
pCommittedMemoryInBytes must be a valid pointer to a VkDeviceSize value
VUID-vkGetDeviceMemoryCommitment-memory-parent
memory must have been created, allocated, or retrieved from device