From cccdce19011d78fcf3898e8f7385b3619f4a8a0a Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Mon, 30 Nov 2015 15:22:41 -0700 Subject: [PATCH] debug_report: make destroy have void return value --- include/vulkan/vk_lunarg_debug_report.h | 2 +- loader/debug_report.c | 9 +++------ loader/debug_report.h | 2 +- vulkan.py | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/vulkan/vk_lunarg_debug_report.h b/include/vulkan/vk_lunarg_debug_report.h index 936625fe..316476e9 100644 --- a/include/vulkan/vk_lunarg_debug_report.h +++ b/include/vulkan/vk_lunarg_debug_report.h @@ -137,7 +137,7 @@ typedef struct VkDebugReportCallbackCreateInfoLUNARG { // API functions typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackLUNARG)(VkInstance instance, VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackLUNARG* pCallback); -typedef VkResult (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackLUNARG)(VkInstance instance, VkDebugReportCallbackLUNARG callback, const VkAllocationCallbacks *pAllocator); +typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackLUNARG)(VkInstance instance, VkDebugReportCallbackLUNARG callback, const VkAllocationCallbacks *pAllocator); #ifdef VK_PROTOTYPES diff --git a/loader/debug_report.c b/loader/debug_report.c index f6b3a31a..5ef00ebf 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -92,7 +92,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL debug_report_CreateDebugReportCallback( return result; } -static VKAPI_ATTR VkResult VKAPI_CALL debug_report_DestroyDebugReportCallback( +static VKAPI_ATTR void VKAPI_CALL debug_report_DestroyDebugReportCallback( VkInstance instance, VkDebugReportCallbackLUNARG callback, VkAllocationCallbacks *pAllocator) @@ -102,7 +102,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL debug_report_DestroyDebugReportCallback( VkLayerDbgFunctionNode *pTrav = inst->DbgFunctionHead; VkLayerDbgFunctionNode *pPrev = pTrav; - VkResult result = inst->disp->DestroyDebugReportCallbackLUNARG(instance, callback, pAllocator); + inst->disp->DestroyDebugReportCallbackLUNARG(instance, callback, pAllocator); while (pTrav) { if (pTrav->msgCallback == callback) { @@ -117,7 +117,6 @@ static VKAPI_ATTR VkResult VKAPI_CALL debug_report_DestroyDebugReportCallback( } loader_platform_thread_unlock_mutex(&loader_lock); - return result; } @@ -191,13 +190,12 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( * This is the instance chain terminator function * for DestroyDebugReportCallback */ -VKAPI_ATTR VkResult VKAPI_CALL loader_DestroyDebugReportCallback(VkInstance instance, +VKAPI_ATTR void loader_DestroyDebugReportCallback(VkInstance instance, VkDebugReportCallbackLUNARG callback, const VkAllocationCallbacks *pAllocator) { uint32_t storage_idx; VkDebugReportCallbackLUNARG *icd_info; const struct loader_icd *icd; - VkResult res = VK_SUCCESS; struct loader_instance *inst; for (inst = loader.instances; inst; inst = inst->next) { @@ -216,7 +214,6 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_DestroyDebugReportCallback(VkInstance inst } storage_idx++; } - return res; } bool debug_report_instance_gpa( diff --git a/loader/debug_report.h b/loader/debug_report.h index 82100214..481cbd46 100644 --- a/loader/debug_report.h +++ b/loader/debug_report.h @@ -108,7 +108,7 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackLUNARG *pCallback); -VKAPI_ATTR VkResult VKAPI_CALL loader_DestroyDebugReportCallback( +VKAPI_ATTR void VKAPI_CALL loader_DestroyDebugReportCallback( VkInstance instance, VkDebugReportCallbackLUNARG callback, const VkAllocationCallbacks *pAllocator); diff --git a/vulkan.py b/vulkan.py index 897688f8..b41e5064 100755 --- a/vulkan.py +++ b/vulkan.py @@ -1130,7 +1130,7 @@ lunarg_debug_report = Extension( Param("const VkAllocationCallbacks*", "pAllocator"), Param("VkDebugReportCallbackLUNARG*", "pCallback")]), - Proto("VkResult", "DestroyDebugReportCallbackLUNARG", + Proto("void", "DestroyDebugReportCallbackLUNARG", [Param("VkInstance", "instance"), Param("VkDebugReportCallbackLUNARG", "callback"), Param("const VkAllocationCallbacks*", "pAllocator")]), -- 2.34.1