1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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).
This commit is contained in:
Lynne 2021-11-13 11:11:47 +01:00
parent f74ceb358c
commit c96d1ee401
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -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,