aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext_vulkan.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2025-02-22 19:55:34 +0000
committerLynne <dev@lynne.ee>2025-02-27 19:06:41 +0100
commit85d81dcfd6f9548ce89a9cdcc5e3e7547a1b2736 (patch)
tree1f7e32f2c6e3a3dc90f7a79283379142e09e6a08 /libavutil/hwcontext_vulkan.c
parent651bfd0dad07b9eb6de6bc810f665f32c4d01865 (diff)
downloadffmpeg-85d81dcfd6f9548ce89a9cdcc5e3e7547a1b2736.tar.gz
hwcontext_vulkan: enable read/write without storage
BGR formats in Vulkan cannot be used in storage images, as the pixel labels on storage images are always ordered as RGB, and swizzling is not an option due to old hardware limitations. This means that you must always use an RGB format and manually swizzle when reading or writing to BGR images, or simply not use a format in the shader itself. This adds support for the latter.
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r--libavutil/hwcontext_vulkan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index ec6459712b..11d9e987b0 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -244,6 +244,8 @@ static void device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF
COPY_VAL(device.features.shaderInt64);
COPY_VAL(device.features.shaderInt16);
COPY_VAL(device.features.shaderFloat64);
+ COPY_VAL(device.features.shaderStorageImageReadWithoutFormat);
+ COPY_VAL(device.features.shaderStorageImageWriteWithoutFormat);
COPY_VAL(vulkan_1_1.samplerYcbcrConversion);
COPY_VAL(vulkan_1_1.storagePushConstant16);