[PR] avutil/hwcontext_vulkan: Query export support with the real image flags (PR #24045)

softworkz via ffmpeg-devel <[email protected]>
Newsgroups gmane.comp.video.ffmpeg.devel
Message-ID <178612568268.59.16482124908052017994@29965ddac10e>
PR #24045 opened by softworkz
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24045
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24045.patch

Query with the flags the images are actually created with. 

The DRM-modifier path is unchanged, I'm not sure whether that's needed - the only remainng difference would be that when  hwctx->img_flag is zero, it would actually use zero.





>From 63d0237033cca9782932b809f960378d34ee4869 Mon Sep 17 00:00:00 2001
From: softworkz <[email protected]>
Date: Thu, 6 Aug 2026 02:38:45 +0200
Subject: [PATCH] avutil/hwcontext_vulkan: Query export support with the real
 image flags

Query with the flags the images are actually created with. The
DRM-modifier path is unchanged.

Signed-off-by: softworkz <[email protected]>
---
 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index ed27c78371..046f2f62ad 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2824,7 +2824,7 @@ static void try_export_flags(AVHWFramesContext *hwfc,
         .tiling = hwctx->tiling,
         .usage  = hwctx->usage,
         .flags  = (hwctx->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT && has_mods) ?
-                  (hwctx->img_flags) : (VkImageCreateFlags)(VK_IMAGE_CREATE_ALIAS_BIT),
+                  (hwctx->img_flags) : hwctx->img_flags ? hwctx->img_flags : (VkImageCreateFlags)(VK_IMAGE_CREATE_ALIAS_BIT),
     };
 
     nb_mods = has_mods ? drm_mod_info->drmFormatModifierCount : 1;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.