diff options
author | der richter <der.richter@gmx.de> | 2023-09-30 16:01:04 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2023-10-14 18:39:56 +0200 |
commit | 78d43740f52db817d98bcf24fb30a76ab6fa13ff (patch) | |
tree | 4e50dcd3872d7935ca55ca547e8d26502e2c1bfc /meson.build | |
parent | bc66de2834dcf69d4d05163350a219d2fbc47a56 (diff) | |
download | mpv-78d43740f52db817d98bcf24fb30a76ab6fa13ff.tar.bz2 mpv-78d43740f52db817d98bcf24fb30a76ab6fa13ff.tar.xz |
vo_gpu/vo_gpu_next: add vulkan support for macOS
add support for vulkan through metal and a translation layer like
MoltenVK. also add the possibility to use different render timing modes
for testing.
i still consider this experimental atm.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 4485c74a56..a56bb1f37c 100644 --- a/meson.build +++ b/meson.build @@ -1546,12 +1546,14 @@ swift = get_option('swift-build').require( darwin and macos_sdk_version.version_compare('>=10.10') and swift_ver.version_compare('>=4.1'), error_message: 'A suitable macos sdk version or swift version could not be found!', ) +features += {'swift': swift.allowed()} swift_sources = [] -if cocoa.found() and swift.allowed() +if features['cocoa'] and features['swift'] swift_sources += files('osdep/macos/libmpv_helper.swift', 'osdep/macos/log_helper.swift', 'osdep/macos/mpv_helper.swift', + 'osdep/macos/precise_timer.swift', 'osdep/macos/swift_compat.swift', 'osdep/macos/swift_extensions.swift', 'video/out/mac/common.swift', @@ -1561,7 +1563,7 @@ if cocoa.found() and swift.allowed() endif macos_cocoa_cb = get_option('macos-cocoa-cb').require( - features['cocoa'] and swift.allowed(), + features['cocoa'] and features['swift'], error_message: 'Either cocoa or swift could not be found!', ) features += {'macos-cocoa-cb': macos_cocoa_cb.allowed()} @@ -1569,9 +1571,14 @@ if features['macos-cocoa-cb'] swift_sources += files('video/out/cocoa_cb_common.swift', 'video/out/mac/gl_layer.swift') endif +if features['cocoa'] and features['vulkan'] and features['swift'] + swift_sources += files('video/out/mac_common.swift', + 'video/out/mac/metal_layer.swift') + sources += files('video/out/vulkan/context_mac.m') +endif macos_media_player = get_option('macos-media-player').require( - macos_10_12_2_features.allowed() and swift.allowed(), + macos_10_12_2_features.allowed() and features['swift'], error_message: 'Either the macos sdk version is not at least 10.12.2 or swift was not found!', ) features += {'macos-media-player': macos_media_player.allowed()} @@ -1579,7 +1586,7 @@ if features['macos-media-player'] swift_sources += files('osdep/macos/remote_command_center.swift') endif -if swift.allowed() and swift_sources.length() > 0 +if features['swift'] and swift_sources.length() > 0 subdir('osdep') endif |