aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-11-24 17:05:18 +0100
committerLynne <dev@lynne.ee>2024-11-26 14:14:13 +0100
commitcf0961a52707122749028e388bbde7723574d767 (patch)
tree10a5a1851636daaae31120ff1286eeb3cb8db4fd
parentf65e51293aedaffd51c54abc682bcea130d74e74 (diff)
downloadffmpeg-cf0961a52707122749028e388bbde7723574d767.tar.gz
hwcontext_vulkan: require storage properties to claim formats as supported
This function dates back a long time ago, before vkfmt_from_pixfmt2. When it was converted over, the thought was that this was far too restrictive to demand storage images for each format. With the new clever function, it makes sure to check that the compatible subformats a format can be used as support storage capabilities. This gets rid of fake support for RGB48/RGB96 which some implementations offer but don't support using as storage images.
-rw-r--r--libavutil/hwcontext_vulkan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 95455dfa39..ce4a7502ba 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2040,7 +2040,7 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
count += vkfmt_from_pixfmt2(ctx, vk_formats_list[i].pixfmt,
p->use_linear_images ? VK_IMAGE_TILING_LINEAR :
VK_IMAGE_TILING_OPTIMAL,
- NULL, NULL, NULL, NULL, 0, 0) >= 0;
+ NULL, NULL, NULL, NULL, 0, 1) >= 0;
}
constraints->valid_sw_formats = av_malloc_array(count + 1,
@@ -2053,7 +2053,7 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
if (vkfmt_from_pixfmt2(ctx, vk_formats_list[i].pixfmt,
p->use_linear_images ? VK_IMAGE_TILING_LINEAR :
VK_IMAGE_TILING_OPTIMAL,
- NULL, NULL, NULL, NULL, 0, 0) >= 0) {
+ NULL, NULL, NULL, NULL, 0, 1) >= 0) {
constraints->valid_sw_formats[count++] = vk_formats_list[i].pixfmt;
}
}