From 3abe9ccbd4c397f6be75ab772b35f8452d9dca73 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 5 Jul 2021 15:02:34 +0200 Subject: [PATCH] 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 Reviewed-by: Emma Anholt Part-of: --- src/vulkan/util/vk_alloc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vulkan/util/vk_alloc.h b/src/vulkan/util/vk_alloc.h index 8553237e8c7..c01c7c5fb0a 100644 --- a/src/vulkan/util/vk_alloc.h +++ b/src/vulkan/util/vk_alloc.h @@ -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,