vulkan: do not depend on alignof(void)

alignof(void) is a non-standard GCC extension, and it doesn't compile on
MSVC. But since the Windows CI has been disabled due to stability
issues, a breakage snuk in nevertheless.

Since alignof(char) works the same as alignof(void), let's pass char
instead of void here. That hides the GCC weirdness without doing any
functional changes.

Fixes: 591da98779 ("vulkan: Add a common VkPipelineCache implementation")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16134>
This commit is contained in:
Erik Faye-Lund 2022-04-25 10:36:51 +02:00 committed by Marge Bot
parent d0b594a4d3
commit d217fb9b0a
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ raw_data_object_create(struct vk_device *device,
{
VK_MULTIALLOC(ma);
VK_MULTIALLOC_DECL(&ma, struct raw_data_object, data_obj, 1);
VK_MULTIALLOC_DECL_SIZE(&ma, void, obj_key_data, key_size);
VK_MULTIALLOC_DECL_SIZE(&ma, void, obj_data, data_size);
VK_MULTIALLOC_DECL_SIZE(&ma, char, obj_key_data, key_size);
VK_MULTIALLOC_DECL_SIZE(&ma, char, obj_data, data_size);
if (!vk_multialloc_alloc(&ma, &device->alloc,
VK_SYSTEM_ALLOCATION_SCOPE_DEVICE))