diff options
author | Lynne <dev@lynne.ee> | 2020-05-15 00:16:58 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2020-05-23 19:07:41 +0100 |
commit | 2c6366590e912714913680af8ea628262975755c (patch) | |
tree | 8e27653d7a58ebff9256055ecce02ba4842f0e21 /libavutil/hwcontext_vulkan.c | |
parent | 98405422be81f007bcfd04b29bde8b6a94ab36f7 (diff) | |
download | ffmpeg-2c6366590e912714913680af8ea628262975755c.tar.gz |
hwcontext_vulkan: do not OR the user-specified usage with our default flags
Some users may need special formats that aren't available when the STORAGE
flag bit is set, which would result in allocations failing.
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 47feff43dc..9374b86632 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1703,7 +1703,8 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc) hwctx->tiling = hwctx->tiling ? hwctx->tiling : p->use_linear_images ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL; - hwctx->usage |= DEFAULT_USAGE_FLAGS; + if (!hwctx->usage) + hwctx->usage = DEFAULT_USAGE_FLAGS; err = create_exec_ctx(hwfc->device_ctx, &fp->conv_ctx, dev_hwctx->queue_family_comp_index, |