forked from FFmpeg/FFmpeg
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue