[FFmpeg-cvslog] hwcontext_vulkan: only try exporting DMABUF memory on !WIN32 and only for DMABUF tiling
Lynne
git at videolan.org
Tue May 20 13:53:51 EEST 2025
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Mon May 12 19:14:30 2025 +0200| [eabb62813e74fd71781159ac7dc38042a8ef3352] | committer: Lynne
hwcontext_vulkan: only try exporting DMABUF memory on !WIN32 and only for DMABUF tiling
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eabb62813e74fd71781159ac7dc38042a8ef3352
---
libavutil/hwcontext_vulkan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 9f9df91e5d..4f205137eb 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2643,11 +2643,12 @@ static AVBufferRef *vulkan_pool_alloc(void *opaque, size_t size)
if (p->vkctx.extensions & FF_VK_EXT_EXTERNAL_FD_MEMORY)
try_export_flags(hwfc, &eiinfo.handleTypes, &e,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT);
-#endif
- if (p->vkctx.extensions & FF_VK_EXT_EXTERNAL_DMABUF_MEMORY)
+ if (p->vkctx.extensions & FF_VK_EXT_EXTERNAL_DMABUF_MEMORY &&
+ hwctx->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
try_export_flags(hwfc, &eiinfo.handleTypes, &e,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT);
+#endif
for (int i = 0; i < av_pix_fmt_count_planes(hwfc->sw_format); i++) {
eminfo[i].sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO;
More information about the ffmpeg-cvslog
mailing list