A layer can use will_log_msg to determine if any output
at the designated notification level(s) will be sent
somewhere. This will allow a validation layer to avoid
high compute validation tests if the results are going
to be looked at.
return NULL;
}
+/*
+ * Checks if the message will get logged.
+ * Allows layer to defer collecting & formating data if the
+ * message will be discarded.
+ */
+static inline VkBool32 will_log_msg(
+ debug_report_data *debug_data,
+ VkFlags msgFlags)
+{
+ if (!debug_data || !(debug_data->active_flags & msgFlags)) {
+ /* message is not wanted */
+ return false;
+ }
+
+ return true;
+}
+
/*
* Output log message via DEBUG_REPORT
* Takes format and variable arg list so that output string