mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
c/main: Refactor out wait idle to own function
This commit is contained in:
parent
616b7f6ae0
commit
48c2fe1f87
|
@ -143,6 +143,14 @@ renderer_create(struct comp_renderer *r, struct comp_compositor *c)
|
|||
r->rrs = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
renderer_wait_gpu_idle(struct comp_renderer *r)
|
||||
{
|
||||
os_mutex_lock(&r->c->vk.queue_mutex);
|
||||
r->c->vk.vkDeviceWaitIdle(r->c->vk.device);
|
||||
os_mutex_unlock(&r->c->vk.queue_mutex);
|
||||
}
|
||||
|
||||
static void
|
||||
renderer_submit_queue(struct comp_renderer *r)
|
||||
{
|
||||
|
@ -630,9 +638,7 @@ comp_renderer_draw(struct comp_renderer *r)
|
|||
*
|
||||
* This is done after a swap so isn't time critical.
|
||||
*/
|
||||
os_mutex_lock(&r->c->vk.queue_mutex);
|
||||
r->c->vk.vkDeviceWaitIdle(r->c->vk.device);
|
||||
os_mutex_unlock(&r->c->vk.queue_mutex);
|
||||
renderer_wait_gpu_idle(r);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue