---
libavutil/hwcontext_vulkan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 51be0c0d3b..f05b75110d 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2828,6 +2828,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 |
--
2.49.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".