vulkan/util: make header available from c++
[mesa.git] / src / vulkan / util / vk_util.h
index e7404b0880890a5cf896ec8748feb0aa9afc529d..89b90a60d207d1c551b5837837b6771b4ce33824 100644 (file)
 #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 */