From d7957a2a2091a00c8ccdebb6900e5a0f21aa205d Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:24:54 +0300 Subject: Use "volk" instead of statically linked Vulkan loader. --- platform/osx/detect.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'platform/osx/detect.py') diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 2393f2ea10..6b25daf05d 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -25,12 +25,6 @@ def get_opts(): ("osxcross_sdk", "OSXCross SDK version", "darwin16"), ("MACOS_SDK_PATH", "Path to the macOS SDK", ""), ("VULKAN_SDK_PATH", "Path to the Vulkan SDK", ""), - BoolVariable( - "use_static_mvk", - "Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables" - " validation layers)", - False, - ), EnumVariable("macports_clang", "Build using Clang from MacPorts", "no", ("no", "5.0", "devel")), BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True), BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False), @@ -188,12 +182,10 @@ def configure(env): ) env.Append(LIBS=["pthread", "z"]) - env.Append(CPPDEFINES=["VULKAN_ENABLED"]) - env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "QuartzCore", "-framework", "IOSurface"]) - if env["use_static_mvk"]: - env.Append(LINKFLAGS=["-L$VULKAN_SDK_PATH/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/", "-lMoltenVK"]) - env["builtin_vulkan"] = False - elif not env["builtin_vulkan"]: - env.Append(LIBS=["vulkan"]) + if env["vulkan"]: + env.Append(CPPDEFINES=["VULKAN_ENABLED"]) + env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "QuartzCore", "-framework", "IOSurface"]) + if not env["use_volk"]: + env.Append(LINKFLAGS=["-L$VULKAN_SDK_PATH/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/", "-lMoltenVK"]) # env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED']) -- cgit v1.2.3