[FFmpeg-cvslog] hwcontext_vulkan: fix DMABUF import format check call

Lynne git at videolan.org
Sat Nov 13 12:13:00 EET 2021


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sat Nov 13 11:11:47 2021 +0100| [c96d1ee401189188de881f6cd005f9ab45b65834] | committer: Lynne

hwcontext_vulkan: fix DMABUF import format check call

VkExternalImageFormatProperties is required to be present in the .pNext
chain of VkImageFormatProperties2, or some drivers crash (RADV).

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c96d1ee401189188de881f6cd005f9ab45b65834
---

 libavutil/hwcontext_vulkan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index c054d84a29..fd9d4d481f 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2329,8 +2329,12 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
         };
 
         /* Image format verification */
+        VkExternalImageFormatProperties ext_props = {
+            .sType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR,
+        };
         VkImageFormatProperties2 props_ret = {
             .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
+            .pNext = &ext_props,
         };
         VkPhysicalDeviceImageDrmFormatModifierInfoEXT props_drm_mod = {
             .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT,



More information about the ffmpeg-cvslog mailing list