nvk: implement GetDeviceMemoryCommitment
authorYusuf Khan <yusisamerican@gmail.com>
Tue, 23 Aug 2022 14:28:39 +0000 (09:28 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:58 +0000 (21:31 +0000)
commit82712282891fae6fba3c0fc8e41750e1d77d997e
tree2ad1a34df5375f66a7a2b31801a2e3476fd5254e
parentf3d43c2a86afdd230690dbba2bec895d8c9a545c
nvk: implement GetDeviceMemoryCommitment

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>
src/nouveau/vulkan/nvk_device_memory.c