Relax Vulkan import plane check

Try to import multi-planar textures even if we don't have a
modifier. This is the case for e.g. DMA-BUFs coming from VA-API.
This commit is contained in:
Simon Ser 2021-02-26 16:33:06 +01:00
parent be735e9360
commit 0aa74266c4

View file

@ -450,8 +450,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, VkFormat format, cr
{
// TODO: multi-planar DISTINCT DMA-BUFs support (see vkBindImageMemory2
// and VkBindImagePlaneMemoryInfo)
assert( pDMA->n_planes == 1 ||
( tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT && allFileDescriptorsEqual( pDMA ) ) );
assert( pDMA->n_planes == 1 || allFileDescriptorsEqual( pDMA ) );
// Importing memory from a FD transfers ownership of the FD
int fd = dup( pDMA->fd[0] );