diff options
author | Lynne <dev@lynne.ee> | 2023-09-15 02:22:00 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2023-09-15 17:35:22 +0200 |
commit | 9310ffc809d02d7bbc767555c2ed16311623ffe2 (patch) | |
tree | 0d6cd2e5d4a7428ce5fa853ba95ed6764f3625c3 /libavcodec/vulkan_decode.h | |
parent | 552a5fa496933c2679cac6774e483bee3f5c2c53 (diff) | |
download | ffmpeg-9310ffc809d02d7bbc767555c2ed16311623ffe2.tar.gz |
vulkan_decode: don't call get_proc_addr on every frame's destruction
The issue is that we cannot rely on any context existing when we free
frames. The Vulkan functions are loaded in each context separately,
so until now, we've just been loading them on every frame's destruction.
Rather than do this, just save the function pointers we need in each
frame. The function pointers are guaranteed to not change and exist.
Diffstat (limited to 'libavcodec/vulkan_decode.h')
-rw-r--r-- | libavcodec/vulkan_decode.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h index 71ba3dbd84..c983b44029 100644 --- a/libavcodec/vulkan_decode.h +++ b/libavcodec/vulkan_decode.h @@ -97,6 +97,10 @@ typedef struct FFVulkanDecodePicture { /* Slice data */ AVBufferRef *slices_buf; size_t slices_size; + + /* Vulkan functions needed for destruction, as no other context is guaranteed to exist */ + PFN_vkWaitSemaphores wait_semaphores; + PFN_vkDestroyImageView destroy_image_view; } FFVulkanDecodePicture; /** |