vulkan/util: Add extern "C" to allow inclusion from c++
We're about to need including this header from a C++ source, so let's wrap the whole thing in extern "C". 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:
parent
fded7a95c5
commit
676c65d8d5
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include "vk_instance.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* __VK_ARG_N(...) returns the number of arguments provided to it */
|
||||
#define __VK_ARG_SEQ(_1,_2,_3,_4,_5,_6,_7,_8,N,...) N
|
||||
#define __VK_ARG_N(...) __VK_ARG_SEQ(__VA_ARGS__,8,7,6,5,4,3,2,1,0)
|
||||
|
@ -87,3 +91,7 @@ VkResult PRINTFLIKE(5, 6)
|
|||
__vk_errorf(const void *_obj, VkResult error,
|
||||
const char *file, int line,
|
||||
const char *format, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -33,6 +33,10 @@
|
|||
#include "util/macros.h"
|
||||
#include "util/u_printf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const VkAllocationCallbacks *
|
||||
vk_default_allocator(void);
|
||||
|
||||
|
@ -293,4 +297,8 @@ vk_multialloc_zalloc2(struct vk_multialloc *ma,
|
|||
return vk_multialloc_zalloc(ma, alloc ? alloc : parent_alloc, scope);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#include <vulkan/vulkan.h>
|
||||
#include <vulkan/vk_icd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WSI_ENTRYPOINTS_H
|
||||
extern const struct vk_instance_entrypoint_table wsi_instance_entrypoints;
|
||||
extern const struct vk_physical_device_entrypoint_table wsi_physical_device_entrypoints;
|
||||
|
@ -285,4 +289,8 @@ wsi_common_bind_swapchain_image(const struct wsi_device *wsi,
|
|||
VkSwapchainKHR _swapchain,
|
||||
uint32_t image_idx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue