diff options
| author | Courtney Goeltzenleuchter <courtneygo@google.com> | 2015-11-30 12:13:14 -0700 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2015-12-17 11:20:06 -0700 |
| commit | 2dafae41b1f79bfb462eb37c1fdf3479879d9485 (patch) | |
| tree | 5a8f281e9deb7556ee05accd6231fa6a1ef792c7 /layers/mem_tracker.cpp | |
| parent | dd0e617a6c5865c5a0d8ef6b9f626535b5c0708d (diff) | |
| download | usermoji-2dafae41b1f79bfb462eb37c1fdf3479879d9485.tar.xz | |
debug_report: rename and update to use CreateInfo
Diffstat (limited to 'layers/mem_tracker.cpp')
| -rw-r--r-- | layers/mem_tracker.cpp | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index bd65bcbc..62a78ba8 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -1010,12 +1010,24 @@ init_mem_tracker( { option_str = getLayerOption("MemTrackerLogFilename"); log_output = getLayerLogOutput(option_str, "MemTracker"); - layer_create_msg_callback(my_data->report_data, report_flags, log_callback, (void *) log_output, &callback); + VkDebugReportCallbackCreateInfoLUNARG dbgInfo; + memset(&dbgInfo, 0, sizeof(dbgInfo)); + dbgInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_LUNARG; + dbgInfo.pfnCallback = log_callback; + dbgInfo.pUserData = log_output; + dbgInfo.flags = report_flags; + layer_create_msg_callback(my_data->report_data, &dbgInfo, pAllocator, &callback); my_data->logging_callback.push_back(callback); } if (debug_action & VK_DBG_LAYER_ACTION_DEBUG_OUTPUT) { - layer_create_msg_callback(my_data->report_data, report_flags, win32_debug_output_msg, NULL, &callback); + VkDebugReportCallbackCreateInfoLUNARG dbgInfo; + memset(&dbgInfo, 0, sizeof(dbgInfo)); + dbgInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_LUNARG; + dbgInfo.pfnCallback = win32_debug_output_msg; + dbgInfo.pUserData = log_output; + dbgInfo.flags = report_flags; + layer_create_msg_callback(my_data->report_data, &dbgInfo, pAllocator, &callback); my_data->logging_callback.push_back(callback); } @@ -1043,7 +1055,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyInstance( // Clean up logging callback, if any while (my_data->logging_callback.size() > 0) { VkDebugReportCallbackLUNARG callback = my_data->logging_callback.back(); - layer_destroy_msg_callback(my_data->report_data, callback); + layer_destroy_msg_callback(my_data->report_data, callback, pAllocator); my_data->logging_callback.pop_back(); } @@ -2561,32 +2573,30 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool( my_data->device_dispatch_table->CmdResetQueryPool(commandBuffer, queryPool, startQuery, queryCount); } -VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDbgCreateMsgCallback( - VkInstance instance, - VkFlags msgFlags, - const PFN_vkDbgMsgCallback pfnMsgCallback, - void *pUserData, - VkDebugReportCallbackLUNARG *pMsgCallback) +VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackLUNARG( + VkInstance instance, + VkDebugReportCallbackCreateInfoLUNARG* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackLUNARG* pMsgCallback) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; - VkResult res = pTable->DbgCreateMsgCallback(instance, msgFlags, pfnMsgCallback, pUserData, pMsgCallback); + VkResult res = pTable->CreateDebugReportCallbackLUNARG(instance, pCreateInfo, pAllocator, pMsgCallback); if (res == VK_SUCCESS) { - res = layer_create_msg_callback(my_data->report_data, msgFlags, pfnMsgCallback, pUserData, pMsgCallback); + res = layer_create_msg_callback(my_data->report_data, pCreateInfo, pAllocator, pMsgCallback); } return res; } -VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDbgDestroyMsgCallback( - VkInstance instance, - VkDebugReportCallbackLUNARG msgCallback) +VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackLUNARG( + VkInstance instance, + VkDebugReportCallbackLUNARG msgCallback, + const VkAllocationCallbacks* pAllocator) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map); VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; - VkResult res = pTable->DbgDestroyMsgCallback(instance, msgCallback); - layer_destroy_msg_callback(my_data->report_data, msgCallback); - - return res; + pTable->DestroyDebugReportCallbackLUNARG(instance, msgCallback, pAllocator); + layer_destroy_msg_callback(my_data->report_data, msgCallback, pAllocator); } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR( |
