From 59707cc485c7fcc1c06b96648ce605ed558da4ac Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 23 Nov 2022 15:15:04 +0100 Subject: [PATCH] hwcontext_vulkan: initialize and require instance version 1.3 This just bumps the required loader library version (libvulkan). All device-related features, such as video decoding, atomics, etc. are still optional and the code deals with their loss on a local level (e.g. the decoder or filter checks for the features it needs, not the hwcontext). Bumping the required version essentially packs all maintenance extensions which correct the spec rather than requiring to enable them individually. --- configure | 4 ++-- libavutil/hwcontext_vulkan.c | 2 +- libavutil/hwcontext_vulkan.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 87f7afc2e1..201efd4f94 100755 --- a/configure +++ b/configure @@ -7040,8 +7040,8 @@ enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if. "in maintaining it." if enabled vulkan; then - check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" || - check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 189)" + check_pkg_config_header_only vulkan "vulkan >= 1.3.238" "vulkan/vulkan.h" "defined VK_VERSION_1_3" || + check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 238)" fi if enabled x86; then diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ffd4f5dec4..4185fb6110 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -673,7 +673,7 @@ static int create_instance(AVHWDeviceContext *ctx, AVDictionary *opts) VkApplicationInfo application_info = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pEngineName = "libavutil", - .apiVersion = VK_API_VERSION_1_2, + .apiVersion = VK_API_VERSION_1_3, .engineVersion = VK_MAKE_VERSION(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO), diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h index df86c85b3c..70c8379dc3 100644 --- a/libavutil/hwcontext_vulkan.h +++ b/libavutil/hwcontext_vulkan.h @@ -53,7 +53,7 @@ typedef struct AVVulkanDeviceContext { PFN_vkGetInstanceProcAddr get_proc_addr; /** - * Vulkan instance. Must be at least version 1.2. + * Vulkan instance. Must be at least version 1.3. */ VkInstance inst;