mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01: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:
@@ -247,7 +247,8 @@ void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
|
|||||||
FFVkExecContext *e = &pool->contexts[i];
|
FFVkExecContext *e = &pool->contexts[i];
|
||||||
|
|
||||||
if (e->fence) {
|
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);
|
vk->DestroyFence(s->hwctx->act_dev, e->fence, s->hwctx->alloc);
|
||||||
}
|
}
|
||||||
pthread_mutex_destroy(&e->lock);
|
pthread_mutex_destroy(&e->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user