VkImageCreateFlags and vulkan encode

Hi, I’m working on a screensharing application that encodes buffers using vulkan encode. I’d like to raise what I think is an oversight in the drivers.

At a high level, what I’m doing is:

  • Acquiring the RGBA buffer from the application (this happens with dmabuf)
  • Converting those to YUV using a compute shader
  • Feeding the resulting YUV buffer into a vulkan encode pipeline to generate a compressed bitstream

This is working, and working well on Nvidia. (I’m still working out a few kinks on Mesa/RADV). I’m currently developing on driver version 550.54.14.0.

My question concerns the supported VkImageCreateFlags returned by VkGetPhysicalDeviceVideoFormatProperties. On my RTX 4070, the returned list of flags is empty, meaning none are supported.

However, I am (successfully) creating the encoder input images with VkImageCreateFlagBits::VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT. The reason I’m doing that is so that I can create an additional view for each of the planes (actually only two, since the format is semiplanar), and bind those in the compute shader that converts from RGBA to YUV. This may seem obscure, but I believe it to be the most portable to do that conversion, which is always a necessary step in any sort of screensharing or streaming application - an often-cited use case for Vulkan Video.

Were I following the spec exactly, I would be forced to create an intermediate copy image with those flags, and blit into the encoder source image. That’s obviously a bit wasteful, and it adds complexity to a pipeline that already has lots of moving parts. As it stands, the only downside is that I’m getting a spurious validation error (VUID-VkImageCreateInfo-pNext-06811, complaining that the format is not supported).

Is this use case supported, and if so, could the driver be changed to return those flags as supported in the format props? Or is the driver right, and I should be doing an intermediate copy?

Thanks in advance for engaging with this admittedly very specific issue :)