vulkan: Add CPU tracing for vkWaitForFences.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22505>
This commit is contained in:
Bas Nieuwenhuizen 2023-04-14 14:25:59 +02:00
parent d980f311b7
commit 4eb57ab97a
2 changed files with 6 additions and 0 deletions

View file

@ -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))

View file

@ -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