Vulkan Validation Error from FFMPEG creating an image: VUID-VkImageCreateInfo-pNext-06811

33 Views Asked by At

I have an AMD Radeon RX 7800 XT and am using the MESA video driver on Arch Linux.

I've been struggling to work out the code to decode an H265 video with FFMPEG (using Vulkan Video) and get the decoded image into a texture I can render using Vulkan.

At the point that I call avcodec_send_packet() the following debug information is output:

[hevc @ 0x5190001a1380] Decoding VPS
[hevc @ 0x5190001a1380] Main profile bitstream
[hevc @ 0x5190001a1380] Decoding SPS
[hevc @ 0x5190001a1380] Main profile bitstream
[hevc @ 0x5190001a1380] Decoding VUI
[hevc @ 0x5190001a1380] Decoding PPS
[hevc @ 0x5190001a1380] Format vulkan chosen by get_format().
[hevc @ 0x5190001a1380] Format vulkan requires hwaccel initialisation.
[hevc @ 0x5190001a1380] Decoder capabilities for hevc profile "Main":
[hevc @ 0x5190001a1380]     Maximum level: 51 (stream 183)
[hevc @ 0x5190001a1380]     Width: from 16 to 8192
[hevc @ 0x5190001a1380]     Height: from 16 to 4352
[hevc @ 0x5190001a1380]     Width alignment: 16
[hevc @ 0x5190001a1380]     Height alignment: 16
[hevc @ 0x5190001a1380]     Bitstream offset alignment: 128
[hevc @ 0x5190001a1380]     Bitstream size alignment: 128
[hevc @ 0x5190001a1380]     Maximum references: 17
[hevc @ 0x5190001a1380]     Maximum active references: 8
[hevc @ 0x5190001a1380]     Codec header name: 'VK_STD_vulkan_video_codec_h265_decode' (driver), 'VK_STD_vulkan_video_codec_h265_decode' (compiled)
[hevc @ 0x5190001a1380]     Codec header version: 1.0.0 (driver), 1.0.0 (compiled)
[hevc @ 0x5190001a1380]     Decode modes: dedicated_dpb
[hevc @ 0x5190001a1380]     Capability flags: separate_references
[hevc @ 0x5190001a1380] Choosing best pixel format for decoding from 1:
[hevc @ 0x5190001a1380]     nv12* (Vulkan ID: 1000156003)
[hevc @ 0x5190001a1380] Chosen frame pixfmt: nv12 (Vulkan ID: 1000156003)
[ERROR] Validation Error: [ VUID-VkImageCreateInfo-pNext-06811 ] | MessageID = 0x30f4ac70 | vkCreateImage(): pCreateInfo specifies flags (VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT|VK_IMAGE_CREATE_EXTENDED_USAGE_BIT|VK_IMAGE_CREATE_ALIAS_BIT), format (VK_FORMAT_G8_B8R8_2PLANE_420_UNORM), imageType (VK_IMAGE_TYPE_2D), and tiling (VK_IMAGE_TILING_OPTIMAL) which are not supported by any of the supported video format properties for the video profiles specified in the VkVideoProfileListInfoKHR structure included in the pCreateInfo->pNext chain, as reported by vkGetPhysicalDeviceVideoFormatPropertiesKHR for the same video profiles and the image usage flags specified in pCreateInfo->usage (VK_IMAGE_USAGE_TRANSFER_SRC_BIT|VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR). The Vulkan spec states: If the pNext chain includes a VkVideoProfileListInfoKHR structure with profileCount greater than 0, then supportedVideoFormat must be VK_TRUE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-06811)
[hevc @ 0x5190001a1380] Allocating 131072 bytes in bind index 0 for video session
[hevc @ 0x5190001a1380] Allocating 43614208 bytes in bind index 1 for video session
[hevc @ 0x5190001a1380] Vulkan decoder initialization sucessful

I'm concerned about the validation error regarding an image creation. If I allow the program to continue decoding frames, this validation error appears a total of 6 times, but then stops as subsequent frames are decoded without any more validation errors.

I'm unsure if this is a problem or not. FFMPEG reports "Vulkan decoder initialization sucessful" despite the validation error.

I am unsure exactly what to do after calling avcodec_receive_frame() to get the decoded frame but did not want to try and proceed if there is a problem already with the images FFMPEG is creating.

0

There are 0 best solutions below