diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-14 11:33:06 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-18 10:22:56 -0600 |
| commit | ccddfe96f5c6f30879bf05e4cef0ab49b4bd39de (patch) | |
| tree | dd73474181916a3c985c16916043fe4e31a0d3a9 /layers/layers_config.cpp | |
| parent | e11ee846bbf144a303e68460690f51c8991943c1 (diff) | |
| download | usermoji-ccddfe96f5c6f30879bf05e4cef0ab49b4bd39de.tar.xz | |
layers: Move dbg flag print to config header
The print function seems to go better here with the
config file parsing as they use similar values.
Diffstat (limited to 'layers/layers_config.cpp')
| -rw-r--r-- | layers/layers_config.cpp | 30 |
1 files changed, 30 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"); + } +} + |
