layers: Enable destroy_msg_callback dbg msgs
These DEBUG_REPORT_DEBUG messages would never get printed as the
active_flags were zeroed out before the log_msg call. Temporarily
used the current callback's flags.
Change-Id: If1cc8ac2edb7dad9964049a7b755b4666f562104
diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h
index 1dd2c6d..f05d97d 100644
--- a/layers/vk_layer_logging.h
+++ b/layers/vk_layer_logging.h
@@ -64,8 +64,8 @@
VkLayerDbgFunctionNode *cur_callback = *list_head;
VkLayerDbgFunctionNode *prev_callback = cur_callback;
bool matched = false;
+ VkFlags local_flags = 0;
- debug_data->active_flags = 0;
while (cur_callback) {
if (cur_callback->msgCallback == callback) {
matched = true;
@@ -75,10 +75,10 @@
}
debug_report_log_msg(debug_data, VK_DEBUG_REPORT_DEBUG_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT,
reinterpret_cast<uint64_t &>(cur_callback->msgCallback), 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT,
- "DebugReport", "Destroyed callback");
+ "DebugReport", "Destroyed callback\n");
} else {
matched = false;
- debug_data->active_flags |= cur_callback->msgFlags;
+ local_flags |= cur_callback->msgFlags;
}
prev_callback = cur_callback;
cur_callback = cur_callback->pNext;
@@ -86,6 +86,7 @@
free(prev_callback);
}
}
+ debug_data->active_flags = local_flags;
}
// Removes all debug callback function nodes from the specified callback linked lists and frees their resources