Skip to content

Commit

Permalink
layers: Fix debug_report with no objects
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyBarbour committed Aug 16, 2023
1 parent 3f8ae94 commit b4f9e38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layers/error_message/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ static bool debug_log_msg(const debug_report_data *debug_data, VkFlags msg_flags
}
} else if (!current_callback.IsUtils() && (current_callback.debug_report_msg_flags & msg_flags)) {
// VK_EXT_debug_report callback (deprecated)
if (object_name_infos.empty()) {
VkDebugUtilsObjectNameInfoEXT null_object_name = {VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, nullptr,
VK_OBJECT_TYPE_UNKNOWN, 0, nullptr};
// need to have at least one object
object_name_infos.emplace_back(null_object_name);
}
if (current_callback.debug_report_callback_function_ptr(
msg_flags, convertCoreObjectToDebugReportObject(object_name_infos[0].objectType),
object_name_infos[0].objectHandle, message_id_number, 0, layer_prefix, composite.c_str(),
Expand Down

0 comments on commit b4f9e38

Please sign in to comment.