Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 1 | /************************************************************************** |
| 2 | * |
Jon Ashburn | e922f71 | 2015-11-03 13:41:23 -0700 | [diff] [blame] | 3 | * Copyright 2014 Valve Software |
Michael Lentine | 695f2c2 | 2015-09-09 12:39:13 -0700 | [diff] [blame] | 4 | * Copyright 2015 Google Inc. |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 5 | * All Rights Reserved. |
| 6 | * |
| 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | * of this software and associated documentation files (the "Software"), to deal |
| 9 | * in the Software without restriction, including without limitation the rights |
| 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | * copies of the Software, and to permit persons to whom the Software is |
| 12 | * furnished to do so, subject to the following conditions: |
| 13 | * |
| 14 | * The above copyright notice and this permission notice shall be included in |
| 15 | * all copies or substantial portions of the Software. |
| 16 | * |
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 23 | * THE SOFTWARE. |
| 24 | * |
Jon Ashburn | e922f71 | 2015-11-03 13:41:23 -0700 | [diff] [blame] | 25 | * Author: Jon Ashburn <jon@lunarg.com> |
| 26 | * Author: Courtney Goeltzenleuchter <courtney@LunarG.com> |
| 27 | * Author: Tobin Ehlis <tobin@lunarg.com> |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 28 | **************************************************************************/ |
| 29 | #include <fstream> |
| 30 | #include <string> |
| 31 | #include <map> |
| 32 | #include <string.h> |
David Pinedo | 9316d3b | 2015-11-06 12:54:48 -0700 | [diff] [blame] | 33 | #include <vulkan/vk_layer.h> |
Tobin Ehlis | b1df55e | 2015-09-15 09:55:54 -0600 | [diff] [blame] | 34 | #include <iostream> |
Tobin Ehlis | a0cb02e | 2015-07-03 10:15:26 -0600 | [diff] [blame] | 35 | #include "vk_layer_config.h" |
David Pinedo | 9316d3b | 2015-11-06 12:54:48 -0700 | [diff] [blame] | 36 | #include "vulkan/vk_sdk_platform.h" |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 37 | |
| 38 | #define MAX_CHARS_PER_LINE 4096 |
| 39 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 40 | class ConfigFile { |
| 41 | public: |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 42 | ConfigFile(); |
| 43 | ~ConfigFile(); |
| 44 | |
| 45 | const char *getOption(const std::string &_option); |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 46 | void setOption(const std::string &_option, const std::string &_val); |
| 47 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 48 | private: |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 49 | bool m_fileIsParsed; |
| 50 | std::map<std::string, std::string> m_valueMap; |
| 51 | |
| 52 | void parseFile(const char *filename); |
| 53 | }; |
| 54 | |
| 55 | static ConfigFile g_configFileObj; |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 56 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 57 | static VkLayerDbgAction stringToDbgAction(const char *_enum) { |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 58 | // only handles single enum values |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 59 | if (!strcmp(_enum, "VK_DBG_LAYER_ACTION_IGNORE")) |
| 60 | return VK_DBG_LAYER_ACTION_IGNORE; |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 61 | else if (!strcmp(_enum, "VK_DBG_LAYER_ACTION_LOG_MSG")) |
| 62 | return VK_DBG_LAYER_ACTION_LOG_MSG; |
Courtney Goeltzenleuchter | 5907ac4 | 2015-10-05 14:41:34 -0600 | [diff] [blame] | 63 | #ifdef WIN32 |
| 64 | else if (!strcmp(_enum, "VK_DBG_LAYER_ACTION_DEBUG_OUTPUT")) |
| 65 | return VK_DBG_LAYER_ACTION_DEBUG_OUTPUT; |
| 66 | #endif |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 67 | else if (!strcmp(_enum, "VK_DBG_LAYER_ACTION_BREAK")) |
| 68 | return VK_DBG_LAYER_ACTION_BREAK; |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 69 | return (VkLayerDbgAction)0; |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 70 | } |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 71 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 72 | static VkFlags stringToDbgReportFlags(const char *_enum) { |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 73 | // only handles single enum values |
Courtney Goeltzenleuchter | fd4830c | 2015-11-25 10:30:56 -0700 | [diff] [blame] | 74 | if (!strcmp(_enum, "VK_DEBUG_REPORT_INFO")) |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 75 | return VK_DEBUG_REPORT_INFO_BIT_EXT; |
Courtney Goeltzenleuchter | fd4830c | 2015-11-25 10:30:56 -0700 | [diff] [blame] | 76 | else if (!strcmp(_enum, "VK_DEBUG_REPORT_WARN")) |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 77 | return VK_DEBUG_REPORT_WARN_BIT_EXT; |
Courtney Goeltzenleuchter | fd4830c | 2015-11-25 10:30:56 -0700 | [diff] [blame] | 78 | else if (!strcmp(_enum, "VK_DEBUG_REPORT_PERF_WARN")) |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 79 | return VK_DEBUG_REPORT_PERF_WARN_BIT_EXT; |
Courtney Goeltzenleuchter | fd4830c | 2015-11-25 10:30:56 -0700 | [diff] [blame] | 80 | else if (!strcmp(_enum, "VK_DEBUG_REPORT_ERROR")) |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 81 | return VK_DEBUG_REPORT_ERROR_BIT_EXT; |
Courtney Goeltzenleuchter | fd4830c | 2015-11-25 10:30:56 -0700 | [diff] [blame] | 82 | else if (!strcmp(_enum, "VK_DEBUG_REPORT_DEBUG")) |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 83 | return VK_DEBUG_REPORT_DEBUG_BIT_EXT; |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 84 | return (VkFlags)0; |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 85 | } |
| 86 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 87 | static unsigned int convertStringEnumVal(const char *_enum) { |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 88 | unsigned int ret; |
| 89 | |
| 90 | ret = stringToDbgAction(_enum); |
| 91 | if (ret) |
| 92 | return ret; |
| 93 | |
| 94 | return stringToDbgReportFlags(_enum); |
| 95 | } |
| 96 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 97 | const char *getLayerOption(const char *_option) { |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 98 | return g_configFileObj.getOption(_option); |
| 99 | } |
| 100 | |
Tobin Ehlis | b1df55e | 2015-09-15 09:55:54 -0600 | [diff] [blame] | 101 | // If option is NULL or stdout, return stdout, otherwise try to open option |
| 102 | // as a filename. If successful, return file handle, otherwise stdout |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 103 | FILE *getLayerLogOutput(const char *_option, const char *layerName) { |
| 104 | FILE *log_output = NULL; |
Tobin Ehlis | b1df55e | 2015-09-15 09:55:54 -0600 | [diff] [blame] | 105 | if (!_option || !strcmp("stdout", _option)) |
| 106 | log_output = stdout; |
| 107 | else { |
| 108 | log_output = fopen(_option, "w"); |
| 109 | if (log_output == NULL) { |
| 110 | if (_option) |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 111 | std::cout << std::endl << layerName |
| 112 | << " ERROR: Bad output filename specified: " |
| 113 | << _option << ". Writing to STDOUT instead" |
| 114 | << std::endl << std::endl; |
Tobin Ehlis | b1df55e | 2015-09-15 09:55:54 -0600 | [diff] [blame] | 115 | log_output = stdout; |
| 116 | } |
| 117 | } |
Cody Northrop | e3e39ef | 2015-09-16 08:35:29 -0600 | [diff] [blame] | 118 | return log_output; |
Tobin Ehlis | b1df55e | 2015-09-15 09:55:54 -0600 | [diff] [blame] | 119 | } |
| 120 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 121 | VkDebugReportFlagsEXT getLayerOptionFlags(const char *_option, |
| 122 | uint32_t optionDefault) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 123 | VkDebugReportFlagsEXT flags = optionDefault; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 124 | const char *option = (g_configFileObj.getOption(_option)); |
| 125 | |
| 126 | /* parse comma-separated options */ |
| 127 | while (option) { |
| 128 | const char *p = strchr(option, ','); |
| 129 | size_t len; |
| 130 | |
| 131 | if (p) |
| 132 | len = p - option; |
| 133 | else |
| 134 | len = strlen(option); |
| 135 | |
| 136 | if (len > 0) { |
| 137 | if (strncmp(option, "warn", len) == 0) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 138 | flags |= VK_DEBUG_REPORT_WARN_BIT_EXT; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 139 | } else if (strncmp(option, "info", len) == 0) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 140 | flags |= VK_DEBUG_REPORT_INFO_BIT_EXT; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 141 | } else if (strncmp(option, "perf", len) == 0) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 142 | flags |= VK_DEBUG_REPORT_PERF_WARN_BIT_EXT; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 143 | } else if (strncmp(option, "error", len) == 0) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 144 | flags |= VK_DEBUG_REPORT_ERROR_BIT_EXT; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 145 | } else if (strncmp(option, "debug", len) == 0) { |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 146 | flags |= VK_DEBUG_REPORT_DEBUG_BIT_EXT; |
Courtney Goeltzenleuchter | b874b8c | 2015-06-14 11:34:49 -0600 | [diff] [blame] | 147 | } |
| 148 | } |
| 149 | |
| 150 | if (!p) |
| 151 | break; |
| 152 | |
| 153 | option = p + 1; |
| 154 | } |
| 155 | return flags; |
| 156 | } |
| 157 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 158 | bool getLayerOptionEnum(const char *_option, uint32_t *optionDefault) { |
Jon Ashburn | a8aa837 | 2015-03-03 15:07:15 -0700 | [diff] [blame] | 159 | bool res; |
Mark Lobodzinski | 8a2b75b | 2015-02-25 12:23:20 -0600 | [diff] [blame] | 160 | const char *option = (g_configFileObj.getOption(_option)); |
| 161 | if (option != NULL) { |
Jon Ashburn | a8aa837 | 2015-03-03 15:07:15 -0700 | [diff] [blame] | 162 | *optionDefault = convertStringEnumVal(option); |
| 163 | res = false; |
Mark Lobodzinski | 0d6e66d | 2015-02-25 15:14:06 -0600 | [diff] [blame] | 164 | } else { |
Jon Ashburn | a8aa837 | 2015-03-03 15:07:15 -0700 | [diff] [blame] | 165 | res = true; |
Mark Lobodzinski | 8a2b75b | 2015-02-25 12:23:20 -0600 | [diff] [blame] | 166 | } |
Jon Ashburn | a8aa837 | 2015-03-03 15:07:15 -0700 | [diff] [blame] | 167 | return res; |
Mark Lobodzinski | 8a2b75b | 2015-02-25 12:23:20 -0600 | [diff] [blame] | 168 | } |
| 169 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 170 | void setLayerOptionEnum(const char *_option, const char *_valEnum) { |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 171 | unsigned int val = convertStringEnumVal(_valEnum); |
| 172 | char strVal[24]; |
| 173 | snprintf(strVal, 24, "%u", val); |
| 174 | g_configFileObj.setOption(_option, strVal); |
| 175 | } |
| 176 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 177 | void setLayerOption(const char *_option, const char *_val) { |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 178 | g_configFileObj.setOption(_option, _val); |
| 179 | } |
| 180 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 181 | ConfigFile::ConfigFile() : m_fileIsParsed(false) {} |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 182 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 183 | ConfigFile::~ConfigFile() {} |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 184 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 185 | const char *ConfigFile::getOption(const std::string &_option) { |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 186 | std::map<std::string, std::string>::const_iterator it; |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 187 | if (!m_fileIsParsed) { |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 188 | parseFile("vk_layer_settings.txt"); |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | if ((it = m_valueMap.find(_option)) == m_valueMap.end()) |
| 192 | return NULL; |
| 193 | else |
| 194 | return it->second.c_str(); |
| 195 | } |
| 196 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 197 | void ConfigFile::setOption(const std::string &_option, |
| 198 | const std::string &_val) { |
| 199 | if (!m_fileIsParsed) { |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 200 | parseFile("vk_layer_settings.txt"); |
Jon Ashburn | dec6051 | 2015-01-13 17:24:01 -0700 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | m_valueMap[_option] = _val; |
| 204 | } |
| 205 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 206 | void ConfigFile::parseFile(const char *filename) { |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 207 | std::ifstream file; |
| 208 | char buf[MAX_CHARS_PER_LINE]; |
| 209 | |
| 210 | m_fileIsParsed = true; |
| 211 | m_valueMap.clear(); |
| 212 | |
| 213 | file.open(filename); |
| 214 | if (!file.good()) |
| 215 | return; |
| 216 | |
| 217 | // read tokens from the file and form option, value pairs |
| 218 | file.getline(buf, MAX_CHARS_PER_LINE); |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 219 | while (!file.eof()) { |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 220 | char option[512]; |
| 221 | char value[512]; |
| 222 | |
| 223 | char *pComment; |
| 224 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 225 | // discard any comments delimited by '#' in the line |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 226 | pComment = strchr(buf, '#'); |
| 227 | if (pComment) |
| 228 | *pComment = '\0'; |
| 229 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 230 | if (sscanf(buf, " %511[^\n\t =] = %511[^\n \t]", option, value) == 2) { |
Jon Ashburn | be58264 | 2014-12-22 12:04:40 -0700 | [diff] [blame] | 231 | std::string optStr(option); |
| 232 | std::string valStr(value); |
| 233 | m_valueMap[optStr] = valStr; |
| 234 | } |
| 235 | file.getline(buf, MAX_CHARS_PER_LINE); |
| 236 | } |
| 237 | } |
| 238 | |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 239 | void print_msg_flags(VkFlags msgFlags, char *msg_flags) { |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 240 | bool separator = false; |
| 241 | |
| 242 | msg_flags[0] = 0; |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 243 | if (msgFlags & VK_DEBUG_REPORT_DEBUG_BIT_EXT) { |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 244 | strcat(msg_flags, "DEBUG"); |
| 245 | separator = true; |
| 246 | } |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 247 | if (msgFlags & VK_DEBUG_REPORT_INFO_BIT_EXT) { |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 248 | if (separator) |
| 249 | strcat(msg_flags, ","); |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 250 | strcat(msg_flags, "INFO"); |
| 251 | separator = true; |
| 252 | } |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 253 | if (msgFlags & VK_DEBUG_REPORT_WARN_BIT_EXT) { |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 254 | if (separator) |
| 255 | strcat(msg_flags, ","); |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 256 | strcat(msg_flags, "WARN"); |
| 257 | separator = true; |
| 258 | } |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 259 | if (msgFlags & VK_DEBUG_REPORT_PERF_WARN_BIT_EXT) { |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 260 | if (separator) |
| 261 | strcat(msg_flags, ","); |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 262 | strcat(msg_flags, "PERF"); |
| 263 | separator = true; |
| 264 | } |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 265 | if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) { |
Mark Lobodzinski | b39d9e6 | 2016-02-02 17:06:29 -0700 | [diff] [blame] | 266 | if (separator) |
| 267 | strcat(msg_flags, ","); |
Courtney Goeltzenleuchter | f85e361 | 2015-06-14 11:33:06 -0600 | [diff] [blame] | 268 | strcat(msg_flags, "ERROR"); |
| 269 | } |
| 270 | } |