mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
vulkan/log: Log to instance messages during instance construction
If the instance isn't client-visible yet (i.e. foo_instance_to_handle hasn't been called), then the instance is still under construction and we should log using vk_debug_message_instance. This makes the vk_log* macros work regardless of whether the instance is fully constructed or not. Tested-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045>
This commit is contained in:
parent
e884e35077
commit
9067c12d2a
1 changed files with 9 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ __vk_log_impl(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
|
|||
} else {
|
||||
objects = (struct vk_object_base **) objects_or_instance;
|
||||
instance = objects[0]->device->physical->instance;
|
||||
assert(instance->base.client_visible);
|
||||
}
|
||||
|
||||
#ifndef DEBUG
|
||||
|
|
@ -98,6 +99,14 @@ __vk_log_impl(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!instance->base.client_visible) {
|
||||
vk_debug_message_instance(instance, severity, types,
|
||||
message_idname, 0, message);
|
||||
ralloc_free(message);
|
||||
ralloc_free(message_idname);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If VK_EXT_debug_utils messengers have been set up, form the
|
||||
* message */
|
||||
if (!list_is_empty(&instance->debug_utils.callbacks)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue