Mesa (main): vulkan/util: simplify multialloc init
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 4 10:52:24 UTC 2022
Module: Mesa
Branch: main
Commit: 3abe9ccbd4c397f6be75ab772b35f8452d9dca73
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3abe9ccbd4c397f6be75ab772b35f8452d9dca73
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Jul 5 15:02:34 2021 +0200
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 at collabora.com>
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14850>
---
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,
More information about the mesa-commit
mailing list