mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
vulkan: only wait for fences on uninit if the context had a submission
This fixes a potential deadlock on exit.
This commit is contained in:
parent
86e552506d
commit
ce8a070cf3
@ -247,7 +247,8 @@ void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
|
||||
FFVkExecContext *e = &pool->contexts[i];
|
||||
|
||||
if (e->fence) {
|
||||
vk->WaitForFences(s->hwctx->act_dev, 1, &e->fence, VK_TRUE, UINT64_MAX);
|
||||
if (e->had_submission)
|
||||
vk->WaitForFences(s->hwctx->act_dev, 1, &e->fence, VK_TRUE, UINT64_MAX);
|
||||
vk->DestroyFence(s->hwctx->act_dev, e->fence, s->hwctx->alloc);
|
||||
}
|
||||
pthread_mutex_destroy(&e->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user