mirror of https://github.com/mpv-player/mpv
meson: require Vulkan loader/headers >= 1.3.238
Even Debian stable has them, so no need to keep compatible with ancient versions. Note that this does not change runtime version requirement for Vulkan. Fixes: https://github.com/mpv-player/mpv-build/issues/234
This commit is contained in:
parent
2aab3fc381
commit
0e43eea5bb
17
meson.build
17
meson.build
|
@ -1280,14 +1280,16 @@ vulkan_opt = get_option('vulkan').require(
|
|||
libplacebo.get_variable('pl_has_vulkan', default_value: '0') == '1',
|
||||
error_message: 'libplacebo compiled without vulkan support!',
|
||||
)
|
||||
vulkan = dependency('vulkan', version: '>= 1.1.70', required: vulkan_opt)
|
||||
# libplacebo/ffmpeg public headers depend on Vulkan 1.3
|
||||
vulkan = dependency('vulkan', version: '>= 1.3.238', required: vulkan_opt)
|
||||
features += {'vulkan': vulkan.found() and (vulkan.type_name() == 'internal' or
|
||||
cc.has_header_symbol('vulkan/vulkan_core.h',
|
||||
'VK_VERSION_1_1',
|
||||
'VK_VERSION_1_3',
|
||||
dependencies: vulkan))}
|
||||
if features['vulkan']
|
||||
dependencies += vulkan
|
||||
sources += files('video/out/vulkan/context.c',
|
||||
sources += files('video/out/hwdec/hwdec_vulkan.c',
|
||||
'video/out/vulkan/context.c',
|
||||
'video/out/vulkan/utils.c',
|
||||
'video/filter/vf_gpu_vulkan.c')
|
||||
endif
|
||||
|
@ -1358,15 +1360,6 @@ if features['android-media-ndk']
|
|||
sources += files('video/out/hwdec/hwdec_aimagereader.c')
|
||||
endif
|
||||
|
||||
vulkan_interop = get_option('vulkan-interop').require(
|
||||
features['vulkan'] and vulkan.version().version_compare('>=1.3.238'),
|
||||
error_message: 'Vulkan Interop requires vulkan headers >= 1.3.238',
|
||||
)
|
||||
features += {'vulkan-interop': vulkan_interop.allowed()}
|
||||
if features['vulkan-interop']
|
||||
sources += files('video/out/hwdec/hwdec_vulkan.c')
|
||||
endif
|
||||
|
||||
d3d_hwaccel = get_option('d3d-hwaccel').require(
|
||||
win32,
|
||||
error_message: 'the os is not win32!',
|
||||
|
|
|
@ -103,7 +103,6 @@ option('gl-dxinterop-d3d9', type: 'feature', value: 'auto', description: 'OpenGL
|
|||
option('ios-gl', type: 'feature', value: 'auto', description: 'iOS OpenGL ES interop support')
|
||||
option('videotoolbox-gl', type: 'feature', value: 'auto', description: 'Videotoolbox with OpenGL')
|
||||
option('videotoolbox-pl', type: 'feature', value: 'auto', description: 'Videotoolbox with libplacebo')
|
||||
option('vulkan-interop', type: 'feature', value: 'auto', description: 'Vulkan graphics interop')
|
||||
|
||||
# macOS features
|
||||
option('macos-10-15-4-features', type: 'feature', value: 'auto', description: 'macOS 10.15.4 SDK Features')
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <libavutil/buffer.h>
|
||||
#include <libavutil/hwcontext.h>
|
||||
#if HAVE_VULKAN_INTEROP
|
||||
#if HAVE_VULKAN
|
||||
#include <libavutil/hwcontext_vulkan.h>
|
||||
#endif
|
||||
#include <libavutil/mem.h>
|
||||
|
@ -393,7 +393,7 @@ bool mp_update_av_hw_frames_pool(struct AVBufferRef **hw_frames_ctx,
|
|||
hw_frames->width = w;
|
||||
hw_frames->height = h;
|
||||
|
||||
#if HAVE_VULKAN_INTEROP
|
||||
#if HAVE_VULKAN
|
||||
if (format == AV_PIX_FMT_VULKAN && disable_multiplane) {
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(sw_format);
|
||||
if ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) &&
|
||||
|
|
|
@ -76,7 +76,7 @@ const struct ra_hwdec_driver *const ra_hwdec_drivers[] = {
|
|||
#if HAVE_ANDROID_MEDIA_NDK
|
||||
&ra_hwdec_aimagereader,
|
||||
#endif
|
||||
#if HAVE_VULKAN_INTEROP
|
||||
#if HAVE_VULKAN
|
||||
&ra_hwdec_vulkan,
|
||||
#endif
|
||||
|
||||
|
|
|
@ -178,7 +178,6 @@ pl_vulkan mppl_create_vulkan(struct vulkan_opts *opts,
|
|||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||
};
|
||||
|
||||
#if HAVE_VULKAN_INTEROP
|
||||
/*
|
||||
* Request the additional extensions and features required to make full use
|
||||
* of the ffmpeg Vulkan hwcontext and video decoding capability.
|
||||
|
@ -208,7 +207,6 @@ pl_vulkan mppl_create_vulkan(struct vulkan_opts *opts,
|
|||
};
|
||||
|
||||
features.pNext = &atomic_float_feature;
|
||||
#endif
|
||||
|
||||
AVUUID param_uuid = { 0 };
|
||||
bool is_uuid = opts->device &&
|
||||
|
@ -223,11 +221,9 @@ pl_vulkan mppl_create_vulkan(struct vulkan_opts *opts,
|
|||
.async_transfer = opts->async_transfer,
|
||||
.async_compute = opts->async_compute,
|
||||
.queue_count = opts->queue_count,
|
||||
#if HAVE_VULKAN_INTEROP
|
||||
.extra_queues = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
|
||||
.opt_extensions = opt_extensions,
|
||||
.num_opt_extensions = MP_ARRAY_SIZE(opt_extensions),
|
||||
#endif
|
||||
.features = &features,
|
||||
.device_name = is_uuid ? NULL : opts->device,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue