Mesa (main): vulkan/log: Allow but warn for client-invisible objects
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 26 16:58:11 UTC 2022
Module: Mesa
Branch: main
Commit: 37d4b72ff3b594f15b794f6e2f0f25774b0c7d88
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37d4b72ff3b594f15b794f6e2f0f25774b0c7d88
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Fri Apr 22 12:48:22 2022 -0500
vulkan/log: Allow but warn for client-invisible objects
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16107>
---
src/vulkan/runtime/vk_log.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/vulkan/runtime/vk_log.c b/src/vulkan/runtime/vk_log.c
index 9fb15f59420..66eb565716e 100644
--- a/src/vulkan/runtime/vk_log.c
+++ b/src/vulkan/runtime/vk_log.c
@@ -96,6 +96,12 @@ __vk_log_impl(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
continue;
}
+ if (unlikely(!objects[i]->client_visible)) {
+ mesa_logw("vk_log*() called with client-invisible object %p "
+ "of type %s", objects[i],
+ vk_ObjectType_to_str(objects[i]->type));
+ }
+
if (!instance) {
instance = vk_object_to_instance(objects[i]);
assert(instance->base.client_visible);
@@ -175,11 +181,9 @@ __vk_log_impl(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
ASSERTED int cmdbuf_n = 0, queue_n = 0, obj_n = 0;
for (int i = 0; i < object_count; i++) {
struct vk_object_base *base = objects[i];
- if (base == NULL)
+ if (base == NULL || !base->client_visible)
continue;
- assert(base->client_visible);
-
switch (base->type) {
case VK_OBJECT_TYPE_COMMAND_BUFFER: {
/* We allow at most one command buffer to be submitted at a time */
More information about the mesa-commit
mailing list