diff mbox series

[FFmpeg-devel] hwcontext_vulkan: ask for storage images by default

Message ID 20240901003627.389044-1-dev@lynne.ee
State New
Headers show
Series [FFmpeg-devel] hwcontext_vulkan: ask for storage images by default | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Lynne Sept. 1, 2024, 12:36 a.m. UTC
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.
---
 libavutil/hwcontext_vulkan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 383e75397e..763fb9d120 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2628,7 +2628,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;
     }