diff options
author | Lynne <dev@lynne.ee> | 2020-05-10 15:17:27 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2020-05-10 23:20:48 +0100 |
commit | 030a565baf3b565f65b93c366b789a9e72740536 (patch) | |
tree | 3e6d5a166e6a63c057f9c21a4a52a8722f2f0c0f /libavutil | |
parent | dccd07f66dfc236206bd37633a4666dbe666c0d5 (diff) |
hwcontext_vulkan: remove unused internal REQUIRED extension flag
This is a leftover from an old version which used the 1.0 Vulkan API
with the maintenance extensions being required.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index aca34a35a8..db71e39003 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -181,8 +181,7 @@ enum VulkanExtensions { EXT_EXTERNAL_FD_MEMORY = 1ULL << 2, /* VK_KHR_external_memory_fd */ EXT_EXTERNAL_FD_SEM = 1ULL << 3, /* VK_KHR_external_semaphore_fd */ - EXT_OPTIONAL = 1ULL << 62, - EXT_REQUIRED = 1ULL << 63, + EXT_NO_FLAG = 1ULL << 63, }; typedef struct VulkanOptExtension { @@ -191,7 +190,7 @@ typedef struct VulkanOptExtension { } VulkanOptExtension; static const VulkanOptExtension optional_instance_exts[] = { - { VK_KHR_SURFACE_EXTENSION_NAME, EXT_OPTIONAL }, + { VK_KHR_SURFACE_EXTENSION_NAME, EXT_NO_FLAG }, }; static const VulkanOptExtension optional_device_exts[] = { @@ -321,9 +320,7 @@ static int check_extensions(AVHWDeviceContext *ctx, int dev, AVDictionary *opts, } for (int i = 0; i < optional_exts_num; i++) { - int req = optional_exts[i].flag & EXT_REQUIRED; tstr = optional_exts[i].name; - found = 0; for (int j = 0; j < sup_ext_count; j++) { if (!strcmp(tstr, sup_ext[j].extensionName)) { @@ -331,20 +328,11 @@ static int check_extensions(AVHWDeviceContext *ctx, int dev, AVDictionary *opts, break; } } - if (!found) { - int lvl = req ? AV_LOG_ERROR : AV_LOG_VERBOSE; - av_log(ctx, lvl, "Extension \"%s\" not found!\n", tstr); - if (req) { - err = AVERROR(EINVAL); - goto end; - } + if (!found) continue; - } - if (!req) - p->extensions |= optional_exts[i].flag; av_log(ctx, AV_LOG_VERBOSE, "Using %s extension \"%s\"\n", mod, tstr); - + p->extensions |= optional_exts[i].flag; ADD_VAL_TO_LIST(extension_names, extensions_found, tstr); } |