diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2023-04-14 14:25:59 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2023-08-19 23:10:37 +0200 |
commit | 4eb57ab97ada474f6d7acaff6805cf1e5e6e30aa (patch) | |
tree | 9d35a1dc4124b624ab7209f6f6debdf2319bed16 /src/vulkan | |
parent | d980f311b7b8ef9a5e1b2b986977c2e862634f4d (diff) | |
download | mesa-4eb57ab97ada474f6d7acaff6805cf1e5e6e30aa.tar.gz mesa-4eb57ab97ada474f6d7acaff6805cf1e5e6e30aa.tar.bz2 mesa-4eb57ab97ada474f6d7acaff6805cf1e5e6e30aa.zip |
vulkan: Add CPU tracing for vkWaitForFences.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22505>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/runtime/vk_fence.c | 3 | ||||
-rw-r--r-- | src/vulkan/runtime/vk_instance.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vulkan/runtime/vk_fence.c b/src/vulkan/runtime/vk_fence.c index bf2bb76cb36..77cb5a3a47f 100644 --- a/src/vulkan/runtime/vk_fence.c +++ b/src/vulkan/runtime/vk_fence.c @@ -24,6 +24,7 @@ #include "vk_fence.h" #include "util/os_time.h" +#include "util/perf/cpu_trace.h" #ifndef _WIN32 #include <unistd.h> @@ -252,6 +253,8 @@ vk_common_WaitForFences(VkDevice _device, VkBool32 waitAll, uint64_t timeout) { + MESA_TRACE_FUNC(); + VK_FROM_HANDLE(vk_device, device, _device); if (vk_device_is_lost(device)) diff --git a/src/vulkan/runtime/vk_instance.c b/src/vulkan/runtime/vk_instance.c index bc5763e7659..d14b196b27b 100644 --- a/src/vulkan/runtime/vk_instance.c +++ b/src/vulkan/runtime/vk_instance.c @@ -24,6 +24,7 @@ #include "vk_instance.h" #include "util/libdrm.h" +#include "util/perf/cpu_trace.h" #include "vk_alloc.h" #include "vk_common_entrypoints.h" @@ -54,6 +55,8 @@ vk_instance_init(struct vk_instance *instance, vk_object_base_init(NULL, &instance->base, VK_OBJECT_TYPE_INSTANCE); instance->alloc = *alloc; + util_cpu_trace_init(); + /* VK_EXT_debug_utils */ /* These messengers will only be used during vkCreateInstance or * vkDestroyInstance calls. We do this first so that it's safe to use |