[FFmpeg-devel] [PATCH 4/6] vulkan: only apply shortcut for next context selection if selection has a submission

Lynne dev at lynne.ee
Sat Nov 23 21:58:36 EET 2024


---
 libavutil/vulkan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 790f2e5aa4..591f85bbf1 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -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;
-- 
2.45.2.753.g447d99e1c3b


More information about the ffmpeg-devel mailing list