It needs to first get the query before the context can be used again.
Fixes getting incorrect values from encode query with async_depth > 1.
---
libavutil/vulkan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 2c71312d78..8485c54db1 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -489,7 +489,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->query_data &&
+ vk->GetFenceStatus(s->hwctx->act_dev, e->fence) == VK_SUCCESS)
return e;
pool->idx = (pool->idx + 1) % pool->pool_size;
--
2.47.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".