mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
vulkan/wsi: add cpu tracepoints for internal waits
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18262>
This commit is contained in:
parent
7d5227341c
commit
89d49bb9de
2 changed files with 9 additions and 2 deletions
|
|
@ -1050,6 +1050,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
|||
goto fail_present;
|
||||
}
|
||||
} else {
|
||||
MESA_TRACE_SCOPE("throttle");
|
||||
result =
|
||||
wsi->WaitForFences(device, 1, &swapchain->fences[image_index],
|
||||
true, ~0ull);
|
||||
|
|
|
|||
|
|
@ -1533,8 +1533,11 @@ x11_manage_fifo_queues(void *state)
|
|||
* acquirable by the consumer or wait there on such an event.
|
||||
*/
|
||||
uint32_t image_index = 0;
|
||||
result = wsi_queue_pull(&chain->present_queue, &image_index, INT64_MAX);
|
||||
assert(result != VK_TIMEOUT);
|
||||
{
|
||||
MESA_TRACE_SCOPE("pull present queue");
|
||||
result = wsi_queue_pull(&chain->present_queue, &image_index, INT64_MAX);
|
||||
assert(result != VK_TIMEOUT);
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
goto fail;
|
||||
|
|
@ -1550,6 +1553,7 @@ x11_manage_fifo_queues(void *state)
|
|||
*/
|
||||
if (x11_needs_wait_for_fences(chain->base.wsi, wsi_conn,
|
||||
chain->base.present_mode)) {
|
||||
MESA_TRACE_SCOPE("wait fence");
|
||||
result = chain->base.wsi->WaitForFences(chain->base.device, 1,
|
||||
&chain->base.fences[image_index],
|
||||
true, UINT64_MAX);
|
||||
|
|
@ -1568,6 +1572,8 @@ x11_manage_fifo_queues(void *state)
|
|||
goto fail;
|
||||
|
||||
if (chain->has_acquire_queue) {
|
||||
MESA_TRACE_SCOPE("wait present");
|
||||
|
||||
/* Assume this isn't a swapchain where we force 5 images, because those
|
||||
* don't end up with an acquire queue at the moment.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue