[FFmpeg-cvslog] hwcontext_vulkan: ask for storage images by default
Lynne
git at videolan.org
Mon Sep 9 08:10:01 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sun Sep 1 00:33:47 2024 +0000| [0ffa967170352c4a5ba73c21f2ef096efef0ee59] | committer: Lynne
hwcontext_vulkan: ask for storage images by default
The issue is that we ask for storage images by default if
available, but because that is gated by the format supporting
storage images, and the check for the format supporting storage
images is gated by the usage, this resulted in a catch-22.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ffa967170352c4a5ba73c21f2ef096efef0ee59
---
libavutil/hwcontext_vulkan.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 383e75397e..c4c6638369 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2617,7 +2617,8 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
err = vkfmt_from_pixfmt2(hwfc->device_ctx, hwfc->sw_format,
hwctx->tiling, NULL,
NULL, NULL, &supported_usage, 0,
- hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT);
+ !hwctx->usage ||
+ (hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT));
if (err < 0) {
av_log(hwfc, AV_LOG_ERROR, "Unsupported sw format: %s!\n",
av_get_pix_fmt_name(hwfc->sw_format));
@@ -2628,7 +2629,8 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
hwctx->tiling, hwctx->format, NULL,
NULL, &supported_usage,
disable_multiplane,
- hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT);
+ !hwctx->usage ||
+ (hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT));
if (err < 0)
return err;
}
More information about the ffmpeg-cvslog
mailing list