From b183c05f45b46e8bd059145aca6d1e014dd5cce8 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Sat, 7 Mar 2020 02:11:32 -0700 Subject: [PATCH] Updated to_string_message_type to handle more than one category --- src/VkBootstrap.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 0056ad3..e5db794 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -52,16 +52,14 @@ const char* to_string_message_severity (VkDebugUtilsMessageSeverityFlagBitsEXT s } } const char* to_string_message_type (VkDebugUtilsMessageTypeFlagsEXT s) { - switch (s) { - case VkDebugUtilsMessageTypeFlagBitsEXT::VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT: - return "General"; - case VkDebugUtilsMessageTypeFlagBitsEXT::VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT: - return "Validation"; - case VkDebugUtilsMessageTypeFlagBitsEXT::VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT: - return "Performance"; - default: - return "Unknown"; - } + if (s == 7) return "General | Validation | Performance"; + if (s == 6) return "Validation | Performance"; + if (s == 5) return "General | Performance"; + if (s == 4 /*VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT*/) return "Performance"; + if (s == 3) return "General | Validation"; + if (s == 2 /*VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT*/) return "Validation"; + if (s == 1 /*VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT*/) return "General"; + return "Unknown"; } VkResult create_debug_utils_messenger (VkInstance instance,