aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layers/layers_config.cpp30
-rw-r--r--layers/layers_config.h1
2 files changed, 31 insertions, 0 deletions
diff --git a/layers/layers_config.cpp b/layers/layers_config.cpp
index 5f726640..845389c8 100644
--- a/layers/layers_config.cpp
+++ b/layers/layers_config.cpp
@@ -191,3 +191,33 @@ void ConfigFile::parseFile(const char *filename)
}
}
+void print_msg_flags(VkFlags msgFlags, char *msg_flags)
+{
+ bool separator = false;
+
+ msg_flags[0] = 0;
+ if (msgFlags & VK_DBG_REPORT_DEBUG_BIT) {
+ strcat(msg_flags, "DEBUG");
+ separator = true;
+ }
+ if (msgFlags & VK_DBG_REPORT_INFO_BIT) {
+ if (separator) strcat(msg_flags, ",");
+ strcat(msg_flags, "INFO");
+ separator = true;
+ }
+ if (msgFlags & VK_DBG_REPORT_WARN_BIT) {
+ if (separator) strcat(msg_flags, ",");
+ strcat(msg_flags, "WARN");
+ separator = true;
+ }
+ if (msgFlags & VK_DBG_REPORT_PERF_WARN_BIT) {
+ if (separator) strcat(msg_flags, ",");
+ strcat(msg_flags, "PERF");
+ separator = true;
+ }
+ if (msgFlags & VK_DBG_REPORT_ERROR_BIT) {
+ if (separator) strcat(msg_flags, ",");
+ strcat(msg_flags, "ERROR");
+ }
+}
+
diff --git a/layers/layers_config.h b/layers/layers_config.h
index 7b608d78..3a232e27 100644
--- a/layers/layers_config.h
+++ b/layers/layers_config.h
@@ -34,6 +34,7 @@ bool getLayerOptionEnum(const char *_option, uint32_t *optionDefault);
void setLayerOption(const char *_option, const char *_val);
void setLayerOptionEnum(const char *_option, const char *_valEnum);
+void print_msg_flags(VkFlags msgFlags, char *msg_flags);
#ifdef __cplusplus
}
#endif