PR #25099 opened by jackboykin URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25099 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25099.patch
Title: vulkan_decode: keep DRM modifiers off the DPB pool when DISTINCT is set When the driver supports `DPB_AND_OUTPUT_DISTINCT`, create DPB images with optimal tiling instead of the output's DRM modifiers. These DPB images never leave the decoder, so they don't need modifiers. They also can't have them unless the driver lists modifier tiling for DPB-only usage (VUID-VkImageCreateInfo-pNext-06811). radv doesn't, so when an application such as Firefox passes a modifier list, every DPB image fails validation. Without DISTINCT, nothing changes. This touches the same condition as #24951. cc @t-boiko >From 3a017742f4d7053636da7f65347ad15f0329eaa7 Mon Sep 17 00:00:00 2001 From: Jack Boykin <[email protected]> Date: Sun, 11 Oct 2026 09:49:15 -0500 Subject: [PATCH] vulkan_decode: keep DRM modifiers off the DPB pool when DISTINCT is set With DPB_AND_OUTPUT_DISTINCT, DPB images never leave the decoder, but the pool still copied the output's DRM modifier list and tiling. Drivers needn't support modifier tiling for DPB-only usage, and radv doesn't, so the pool broke VUID-VkImageCreateInfo-pNext-06811. Regression since: 25e187f849 Assisted-by: Claude Opus 5.5 --- libavcodec/vulkan_decode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index 34ca4dc565..5cf338b0d3 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -1343,12 +1343,12 @@ int ff_vk_decode_init(AVCodecContext *avctx) VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL; void *create_pnext = (void *)ff_vk_find_struct(ctx->s.hwfc->create_pnext, VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR); - /* Reference (DPB) images use the same tiling and pNext chain as output. - * If VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR is 0, the - * driver does not support separate output and DPB with different layouts/tiling. */ + /* With DPB_AND_OUTPUT_DISTINCT, DPB images never leave the decoder, + * so they don't need the output's DRM modifiers. */ void *drm_create_pnext = (void *)ff_vk_find_struct(ctx->s.hwfc->create_pnext, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT); - if (drm_create_pnext) { + if (drm_create_pnext && + !(ctx->dec_caps.flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR)) { create_pnext = drm_create_pnext; tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT; av_assert2(ff_vk_find_struct(drm_create_pnext, VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR)); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
