From 87349a96584ebbdc661b289b61021d461f7dc4cd Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Mon, 18 Jul 2016 17:06:52 -0600 Subject: layers: Fixup OT error messages Print object type explicitly; also fixup a couple of format specifiers. Change-Id: I6f5036f70cae05bd5f7ee9320e24b2e16bdc811b --- layers/object_tracker.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'layers/object_tracker.cpp') diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index 7f49f561..411ca5cb 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -152,10 +152,10 @@ static bool ValidateCommandBuffer(VkDevice device, VkCommandPool command_pool, V reinterpret_cast(command_pool)); } } else { - skip_call |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, __LINE__, - OBJTRACK_NONE, LayerName, - "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", object_handle); + skip_call |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, + __LINE__, OBJTRACK_NONE, LayerName, "Unable to remove command buffer obj 0x%" PRIxLEAST64 + ". Was it created? Has it already been destroyed?", + object_handle); } return skip_call; } @@ -197,10 +197,10 @@ static bool ValidateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_p reinterpret_cast(descriptor_pool)); } } else { - skip_call |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, __LINE__, - OBJTRACK_NONE, LayerName, - "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", object_handle); + skip_call |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, + __LINE__, OBJTRACK_NONE, LayerName, "Unable to remove descriptor set obj 0x%" PRIxLEAST64 + ". Was it created? Has it already been destroyed?", + object_handle); } return skip_call; } @@ -302,7 +302,8 @@ static void DestroyDispatchableObject(T1 dispatchable_object, T2 object, VkDebug } else { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, __LINE__, OBJTRACK_UNKNOWN_OBJECT, LayerName, - "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", object_handle); + "Unable to remove %s obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", + object_name[object_type], object_handle); } } @@ -332,7 +333,8 @@ static void DestroyNonDispatchableObject(T1 dispatchable_object, T2 object, VkDe } else { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, object_handle, __LINE__, OBJTRACK_UNKNOWN_OBJECT, LayerName, - "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", object_handle); + "Unable to remove %s obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?", + object_name[object_type], object_handle); } } @@ -347,7 +349,7 @@ static bool ValidateDispatchableObject(T1 dispatchable_object, T2 object, VkDebu if (instance_data->object_map[object_type].find(reinterpret_cast(object)) == instance_data->object_map[object_type].end()) { return log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, reinterpret_cast(object), - __LINE__, OBJTRACK_INVALID_OBJECT, LayerName, "Invalid %s Object 0x%" PRIx64, object_name[object_type], + __LINE__, OBJTRACK_INVALID_OBJECT, LayerName, "Invalid %s Object 0x%" PRIxLEAST64, object_name[object_type], reinterpret_cast(object)); } return false; @@ -367,7 +369,7 @@ static bool ValidateNonDispatchableObject(T1 dispatchable_object, T2 object, VkD (device_data->swapchainImageMap.find(reinterpret_cast(object)) == device_data->swapchainImageMap.end())) { return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, reinterpret_cast(object), __LINE__, OBJTRACK_INVALID_OBJECT, LayerName, - "Invalid %s Object 0x%" PRIx64, object_name[object_type], reinterpret_cast(object)); + "Invalid %s Object 0x%" PRIxLEAST64, object_name[object_type], reinterpret_cast(object)); } } return false; -- cgit v1.2.3