mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-17 00:58:13 +02:00
vulkan/wsi: add cpu tracepoints to swapchain functions
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18262>
This commit is contained in:
parent
f640661e54
commit
7d5227341c
2 changed files with 9 additions and 0 deletions
|
|
@ -70,6 +70,8 @@ wsi_device_init(struct wsi_device *wsi,
|
|||
|
||||
WSI_DEBUG = parse_debug_string(getenv("MESA_VK_WSI_DEBUG"), debug_control);
|
||||
|
||||
util_perfetto_init();
|
||||
|
||||
memset(wsi, 0, sizeof(*wsi));
|
||||
|
||||
wsi->instance_alloc = *alloc;
|
||||
|
|
@ -761,6 +763,7 @@ wsi_CreateSwapchainKHR(VkDevice _device,
|
|||
const VkAllocationCallbacks *pAllocator,
|
||||
VkSwapchainKHR *pSwapchain)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VK_FROM_HANDLE(vk_device, device, _device);
|
||||
ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pCreateInfo->surface);
|
||||
struct wsi_device *wsi_device = device->physical->wsi_device;
|
||||
|
|
@ -809,6 +812,7 @@ wsi_DestroySwapchainKHR(VkDevice _device,
|
|||
VkSwapchainKHR _swapchain,
|
||||
const VkAllocationCallbacks *pAllocator)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VK_FROM_HANDLE(vk_device, device, _device);
|
||||
VK_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain);
|
||||
const VkAllocationCallbacks *alloc;
|
||||
|
|
@ -855,6 +859,7 @@ wsi_GetSwapchainImagesKHR(VkDevice device,
|
|||
uint32_t *pSwapchainImageCount,
|
||||
VkImage *pSwapchainImages)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
return wsi_common_get_images(swapchain,
|
||||
pSwapchainImageCount,
|
||||
pSwapchainImages);
|
||||
|
|
@ -868,6 +873,7 @@ wsi_AcquireNextImageKHR(VkDevice _device,
|
|||
VkFence fence,
|
||||
uint32_t *pImageIndex)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VK_FROM_HANDLE(vk_device, device, _device);
|
||||
|
||||
const VkAcquireNextImageInfoKHR acquire_info = {
|
||||
|
|
@ -990,6 +996,7 @@ wsi_AcquireNextImage2KHR(VkDevice _device,
|
|||
const VkAcquireNextImageInfoKHR *pAcquireInfo,
|
||||
uint32_t *pImageIndex)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VK_FROM_HANDLE(vk_device, device, _device);
|
||||
|
||||
return wsi_common_acquire_next_image2(device->physical->wsi_device,
|
||||
|
|
@ -1184,6 +1191,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
|||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
wsi_QueuePresentKHR(VkQueue _queue, const VkPresentInfoKHR *pPresentInfo)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VK_FROM_HANDLE(vk_queue, queue, _queue);
|
||||
|
||||
return wsi_common_queue_present(queue->base.device->physical->wsi_device,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#define WSI_COMMON_PRIVATE_H
|
||||
|
||||
#include "wsi_common.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
#include "vulkan/runtime/vk_object.h"
|
||||
#include "vulkan/runtime/vk_sync.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue