diff options
author | Lynne <dev@lynne.ee> | 2021-11-13 13:11:47 +0300 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-11-13 13:12:50 +0300 |
commit | c96d1ee401189188de881f6cd005f9ab45b65834 (patch) | |
tree | dde08d18aa072e9eac9df205b829087588e4c87b /libavutil | |
parent | f74ceb358c3042a7d3c6b61fc0149d0caafd4158 (diff) |
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).
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 4 |
1 files changed, 4 insertions, 0 deletions
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, |