mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
venus: Add vn_queue_wait_idle_before_present()
Trivial refactor. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
This commit is contained in:
parent
cc1407df44
commit
7daedd2a30
1 changed files with 16 additions and 10 deletions
|
|
@ -441,6 +441,21 @@ vn_queue_submit(struct vn_instance *instance,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
vn_queue_wait_idle_before_present(struct vn_queue *queue)
|
||||
{
|
||||
struct vn_instance *instance = queue->device->instance;
|
||||
VkQueue queue_h = vn_queue_to_handle(queue);
|
||||
|
||||
if (VN_DEBUG(WSI)) {
|
||||
static uint32_t ratelimit = 0;
|
||||
if (ratelimit++ < 10)
|
||||
vn_log(instance, "forcing vkQueueWaitIdle before presenting");
|
||||
}
|
||||
|
||||
vn_QueueWaitIdle(queue_h);
|
||||
}
|
||||
|
||||
VkResult
|
||||
vn_QueueSubmit(VkQueue queue_h,
|
||||
uint32_t submitCount,
|
||||
|
|
@ -501,16 +516,7 @@ vn_QueueSubmit(VkQueue queue_h,
|
|||
.bo_count = 1,
|
||||
});
|
||||
} else {
|
||||
if (VN_DEBUG(WSI)) {
|
||||
static uint32_t ratelimit;
|
||||
if (ratelimit < 10) {
|
||||
vn_log(dev->instance,
|
||||
"forcing vkQueueWaitIdle before presenting");
|
||||
ratelimit++;
|
||||
}
|
||||
}
|
||||
|
||||
vn_QueueWaitIdle(submit.queue);
|
||||
vn_queue_wait_idle_before_present(queue);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue