vulkan spec says:
If the memory object is allocated from a heap with the
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, that object’s
backing memory may be provided by the implementation lazily. The
actual committed size of the memory may initially be as small as
zero (or as large as the requested size), and monotonically
increases as additional memory is needed.
As far as I can tell we ignore the bit meaning that we allocate the
requested size so return that as the size.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
{
return VK_SUCCESS;
}
+
+VKAPI_ATTR void VKAPI_CALL nvk_GetDeviceMemoryCommitment(
+ VkDevice device,
+ VkDeviceMemory _mem,
+ VkDeviceSize* pCommittedMemoryInBytes)
+{
+ VK_FROM_HANDLE(nvk_device_memory, mem, _mem);
+
+ *pCommittedMemoryInBytes = mem->bo->size;
+}