diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-03-15 14:21:59 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-03-16 16:37:37 -0600 |
| commit | 0cce4785d303c763e2293dca9b522064bbe5e4c7 (patch) | |
| tree | 4c8a03d9c9079a400a21d21b0778ce6b3fd2f5bf /layers/device_limits.cpp | |
| parent | cc838f0850abf58243bca037288303c05899bc88 (diff) | |
| download | usermoji-0cce4785d303c763e2293dca9b522064bbe5e4c7.tar.xz | |
layers: Move layer debug action initialization into layer_utils
Also removed dead code from the layer generation script.
Change-Id: I64fdcaaf1aed8152de62079568c8e247333d8c61
Diffstat (limited to 'layers/device_limits.cpp')
| -rw-r--r-- | layers/device_limits.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index 75422bc5..cda1ae70 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -84,38 +84,8 @@ static loader_platform_thread_mutex globalLock; template layer_data *get_my_data_ptr<layer_data>(void *data_key, std::unordered_map<void *, layer_data *> &data_map); static void init_device_limits(layer_data *my_data, const VkAllocationCallbacks *pAllocator) { - uint32_t report_flags = 0; - uint32_t debug_action = 0; - FILE *log_output = NULL; - const char *option_str; - VkDebugReportCallbackEXT callback; - // initialize device_limits options - report_flags = getLayerOptionFlags("lunarg_device_limits.report_flags", 0); - getLayerOptionEnum("lunarg_device_limits.debug_action", (uint32_t *)&debug_action); - - if (debug_action & VK_DBG_LAYER_ACTION_LOG_MSG) { - option_str = getLayerOption("lunarg_device_limits.log_filename"); - log_output = getLayerLogOutput(option_str, "lunarg_device_limits"); - VkDebugReportCallbackCreateInfoEXT dbgCreateInfo; - memset(&dbgCreateInfo, 0, sizeof(dbgCreateInfo)); - dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT; - dbgCreateInfo.flags = report_flags; - dbgCreateInfo.pfnCallback = log_callback; - dbgCreateInfo.pUserData = (void *)log_output; - layer_create_msg_callback(my_data->report_data, &dbgCreateInfo, pAllocator, &callback); - my_data->logging_callback.push_back(callback); - } - if (debug_action & VK_DBG_LAYER_ACTION_DEBUG_OUTPUT) { - VkDebugReportCallbackCreateInfoEXT dbgCreateInfo; - memset(&dbgCreateInfo, 0, sizeof(dbgCreateInfo)); - dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT; - dbgCreateInfo.flags = report_flags; - dbgCreateInfo.pfnCallback = win32_debug_output_msg; - dbgCreateInfo.pUserData = NULL; - layer_create_msg_callback(my_data->report_data, &dbgCreateInfo, pAllocator, &callback); - my_data->logging_callback.push_back(callback); - } + layer_debug_actions(my_data->report_data, my_data->logging_callback, pAllocator, "lunarg_device_limits"); if (!globalLockInitialized) { // TODO/TBD: Need to delete this mutex sometime. How??? One |
