vulkan: needs to check usage for formats used
gst_vulkan_format_from_video_info_2
does not currently check any VkImageUsageFlags
against the device advertised values. This means that a format may succeed in being supported and used (e.g. VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
) but the usage bits do not allow that format to be used where it needs to be.
Example. On my android phone with Vulkan 1.1, uploading NV12 chooses VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
which is only supported for usage flags transfer-src|transfer-dst|sampled
. gstvulkanimagebufferpool's default usage flags are however transfer-src|transfer-dst|color-attachment|sampled|input-attachment
which will fail image creation.
cc @vjaquez