History

vulkan: only wait for fences on uninit if the context had a submission

This fixes a potential deadlock on exit.

Lynne committed 1 year ago

Commit ce8a0701 parent 86e55251 file · +2 −1Browse files

Unified · Split

libavutil/vulkan.c+2−1
@@ -247,7 +247,8 @@ void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool) · 246 unmodified lines
247247 FFVkExecContext *e = &pool->contexts[i];
248248
249249 if (e->fence) {
250− vk->WaitForFences(s->hwctx->act_dev, 1, &e->fence, VK_TRUE, UINT64_MAX);
250+ if (e->had_submission)
251+ vk->WaitForFences(s->hwctx->act_dev, 1, &e->fence, VK_TRUE, UINT64_MAX);
251252 vk->DestroyFence(s->hwctx->act_dev, e->fence, s->hwctx->alloc);
252253 }
253254 pthread_mutex_destroy(&e->lock);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t