vulkan/util: simplify multialloc init

The syntax we're using doesn't work when included into C++ sources. So
let's make it C++ compabible.

It turns out, nobody needs this extra definition which is what's causing
issues. Let's just make the initializer trivial without casting the
struct.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14850>
This commit is contained in:
Erik Faye-Lund
2021-07-05 15:02:34 +02:00
committed by Marge Bot
parent 0d0ecbd987
commit 3abe9ccbd4

View File

@@ -184,11 +184,8 @@ struct vk_multialloc {
void **ptrs[8];
};
#define VK_MULTIALLOC_INIT \
((struct vk_multialloc) { 0, })
#define VK_MULTIALLOC(_name) \
struct vk_multialloc _name = VK_MULTIALLOC_INIT
struct vk_multialloc _name = { 0, }
static ALWAYS_INLINE void
vk_multialloc_add_size_align(struct vk_multialloc *ma,