vulkan/util: Make multialloc succeed with 0 allocations.
authorEmma Anholt <emma@anholt.net>
Thu, 6 Oct 2022 15:59:29 +0000 (08:59 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 16 Aug 2023 16:02:51 +0000 (16:02 +0000)
commitfce10ddf0f9ae30c62c871ae43d9aa690374b5e9
tree2be14065b2498c9a4c35b4811aacf797df56204f
parentd142c845d05732f7858839493e0dba6a1fa5d6c0
vulkan/util: Make multialloc succeed with 0 allocations.

I wanted to use it for the attachments and clear values of a
vkCmdBeginRenderPass(), but both can be 0 count.  In that case, we would
end up with vk_default_alloc(0,0) because nothing had set the alignment,
and assertion fail instead of allocating 0 bytes.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>
src/vulkan/util/vk_alloc.h