1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

vulkan: only apply shortcut for next context selection if selection has a submission

This commit is contained in:
Lynne 2024-11-23 19:03:29 +01:00
parent 8ac49ae9e0
commit f582de8f34
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -494,7 +494,8 @@ FFVkExecContext *ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
/* Check if last submission has already finished.
* If so, don't waste resources and reuse the same buffer. */
if (vk->GetFenceStatus(s->hwctx->act_dev, e->fence) == VK_SUCCESS)
if (e->had_submission &&
vk->GetFenceStatus(s->hwctx->act_dev, e->fence) == VK_SUCCESS)
return e;
pool->idx = (pool->idx + 1) % pool->pool_size;