Fix loader logging of VUIDs
authorMark Young <marky@lunarg.com>
Sat, 5 Feb 2022 00:02:52 +0000 (17:02 -0700)
committerMark Young <marky@lunarg.com>
Wed, 9 Feb 2022 20:19:48 +0000 (13:19 -0700)
The loader was logging some VUID failures and it was sending them to the general
message output.  Send the information also to the validation stream to make sure
that if anyone enables validation filtering they will still see those errors

loader/log.c

index d424436a49fc858da6e2a3a2275ebdf03d099ade..f022666b216220cbe5ef776a41c0bbc9a4bd0c56 100644 (file)
@@ -121,7 +121,9 @@ void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t ms
         if ((msg_type & VULKAN_LOADER_PERF_BIT) != 0) {
             type = VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT;
         } else if ((msg_type & VULKAN_LOADER_VALIDATION_BIT) != 0) {
-            type = VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT;
+            // For loader logging, if it's a validation message, we still want to also keep the general flag as well
+            // so messages of type validation can still be triggered for general message callbacks.
+            type = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT;
         } else {
             type = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT;
         }