From e6ae483aedfb9f0e64697d4df0ff53519dd19957 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Thu, 31 Mar 2016 10:48:19 -0600 Subject: loader: vk{Create|Destroy}Instance can have multiple tmp callbacks During code review of the Android version of the temporary debug_report callbacks code, it was decided to allow an array of VkDebugReportCallbackCreateInfoEXT structs to be passed to vkCreateInstance(). This code implements that, using some new utility functions in order to help keep the code clean. --- loader/debug_report.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'loader/debug_report.h') diff --git a/loader/debug_report.h b/loader/debug_report.h index baac021e..72a31e53 100644 --- a/loader/debug_report.h +++ b/loader/debug_report.h @@ -142,6 +142,27 @@ void util_DestroyDebugReportCallback(struct loader_instance *inst, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator); +VkResult +util_CopyDebugReportCreateInfos(const void *pChain, + const VkAllocationCallbacks *pAllocator, + uint32_t *num_callbacks, + VkDebugReportCallbackCreateInfoEXT **infos, + VkDebugReportCallbackEXT **callbacks); +void util_FreeDebugReportCreateInfos(const VkAllocationCallbacks *pAllocator, + VkDebugReportCallbackCreateInfoEXT *infos, + VkDebugReportCallbackEXT *callbacks); +VkResult +util_CreateDebugReportCallbacks(struct loader_instance *inst, + const VkAllocationCallbacks *pAllocator, + uint32_t num_callbacks, + VkDebugReportCallbackCreateInfoEXT *infos, + VkDebugReportCallbackEXT *callbacks); + +void util_DestroyDebugReportCallbacks(struct loader_instance *inst, + const VkAllocationCallbacks *pAllocator, + uint32_t num_callbacks, + VkDebugReportCallbackEXT *callbacks); + VkBool32 util_DebugReportMessage(const struct loader_instance *inst, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, -- cgit v1.2.3