[FFmpeg-cvslog] hwcontext_vulkan: add workaround for broken Nvidia drivers
Lynne
git at videolan.org
Mon Jun 23 20:30:13 EEST 2025
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Mon Jun 16 19:11:20 2025 +0000| [11428896dba40814edd880272b3bcb9b778fd4a8] | committer: Lynne
hwcontext_vulkan: add workaround for broken Nvidia drivers
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11428896dba40814edd880272b3bcb9b778fd4a8
---
libavutil/hwcontext_vulkan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index f94ad280ff..c8c6eed0fd 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2854,6 +2854,12 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
return err;
}
+ /* Nvidia is violating the spec because they thought no one would use this. */
+ if (p->dev_is_nvidia &&
+ (((fmt->nb_images == 1) && (fmt->vk_planes > 1)) ||
+ (av_pix_fmt_desc_get(hwfc->sw_format)->nb_components == 1)))
+ supported_usage &= ~VK_IMAGE_USAGE_HOST_TRANSFER_BIT;
+
/* Image usage flags */
if (!hwctx->usage) {
hwctx->usage = supported_usage & (VK_IMAGE_USAGE_TRANSFER_DST_BIT |
More information about the ffmpeg-cvslog
mailing list