summaryrefslogtreecommitdiffstats
path: root/src/vulkan/util
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-02-25 23:01:02 +0000
committerLionel Landwerlin <[email protected]>2019-03-06 22:46:37 +0000
commitee491a4987d0b1698971343dce9f5460b1521e9a (patch)
tree4321906fb943bd031fdfe628a05805129fee4b88 /src/vulkan/util
parentffa9082c406d17680c0ceeeac921ace5e793e5af (diff)
vulkan/util: make header available from c++
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/vulkan/util')
-rw-r--r--src/vulkan/util/vk_util.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vulkan/util/vk_util.h b/src/vulkan/util/vk_util.h
index e7404b08808..89b90a60d20 100644
--- a/src/vulkan/util/vk_util.h
+++ b/src/vulkan/util/vk_util.h
@@ -23,6 +23,10 @@
#ifndef VK_UTIL_H
#define VK_UTIL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* common inlines and macros for vulkan drivers */
#include <vulkan/vulkan.h>
@@ -122,7 +126,7 @@ __vk_outarray_next(struct __vk_outarray *a, size_t elem_size)
return NULL;
if (a->data != NULL)
- p = a->data + (*a->filled_len) * elem_size;
+ p = (uint8_t *)a->data + (*a->filled_len) * elem_size;
*a->filled_len += 1;
@@ -202,4 +206,8 @@ uint32_t vk_get_version_override(void);
#define VK_ENUM_OFFSET(__enum) \
((__enum) >= VK_EXT_OFFSET ? ((__enum) % 1000) : (__enum))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* VK_UTIL_H */