From 9a2a85b83b6ef5fcd9af1166b3cfeec8b85c047a Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 14 Mar 2026 15:27:37 +0100 Subject: [PATCH 1/5] osxbundle: fix a wrong vulkan search path the paths in the array are meant to be base paths to the vulkan path. remove vulkan from it so it won't end up as /usr/share/vulkan/vulkan. --- TOOLS/dylib_unhell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TOOLS/dylib_unhell.py b/TOOLS/dylib_unhell.py index 8562d7a4fcfc8..6ebbc47f3511a 100755 --- a/TOOLS/dylib_unhell.py +++ b/TOOLS/dylib_unhell.py @@ -218,7 +218,7 @@ def process_vulkan_loader(binary, loader_name, loader_relative_folder, library_n os.path.join("/etc", loader_relative_folder), os.path.join(os.path.expanduser("~"), ".local/share", loader_relative_folder), os.path.join("/usr/local/share", loader_relative_folder), - os.path.join("/usr/share/vulkan", loader_relative_folder), + os.path.join("/usr/share", loader_relative_folder), os.path.join(get_homebrew_prefix(), "etc", loader_relative_folder), os.path.join(get_homebrew_prefix(), "share", loader_relative_folder), # old location ] From 97a0ab862793e445a72deb4b404889292fcafedf Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 14 Mar 2026 15:34:07 +0100 Subject: [PATCH 2/5] osxbundle: fix vulkan loader search path check the old check stopped at the first occurrence of a vulkan loader path. though it's possible different vulkan loaders are installed in different paths, leading to not found vulkan loaders. to prevent this, also check if the needed vulkan loader is actually installed to that path. specific case is when installing MoltenVK and KosmicKrisp at the same time. the former is installed in the homebrew prefix under etc/ the latter under share/. the latter wasn't found previous, since the former was found first. --- TOOLS/dylib_unhell.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/TOOLS/dylib_unhell.py b/TOOLS/dylib_unhell.py index 6ebbc47f3511a..778cc24faf41a 100755 --- a/TOOLS/dylib_unhell.py +++ b/TOOLS/dylib_unhell.py @@ -224,24 +224,26 @@ def process_vulkan_loader(binary, loader_name, loader_relative_folder, library_n ] loader_system_folder = "" + loader_system_path = "" for loader_system_search_folder in loader_system_search_folders: if os.path.exists(loader_system_search_folder): loader_system_folder = loader_system_search_folder - break + if os.path.exists(os.path.join(loader_system_folder, loader_name)): + loader_system_path = os.path.join(loader_system_folder, loader_name) + break if not loader_system_folder: print(">>> could not find loader folder " + loader_relative_folder) return + if not loader_system_path: + print(">>> could not find loader " + loader_name) + return + loader_bundle_folder = os.path.join(resources_path(binary), loader_relative_folder) - loader_system_path = os.path.join(loader_system_folder, loader_name) loader_bundle_path = os.path.join(loader_bundle_folder, loader_name) library_relative_folder = "../../../Frameworks/" - if not os.path.exists(loader_system_path): - print(">>> could not find loader " + loader_name) - return - if not os.path.exists(loader_bundle_folder): os.makedirs(loader_bundle_folder) From abbf54e0bcb9a0328fc9ef3272f5b78807b816ba Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 14 Mar 2026 15:35:41 +0100 Subject: [PATCH 3/5] osxbundle: bundle KosmicKrisp vulkan loader/driver additionally to the MoltenVK loader/driver also bundle KosmicKrisp when available. --- TOOLS/dylib_unhell.py | 1 + 1 file changed, 1 insertion(+) diff --git a/TOOLS/dylib_unhell.py b/TOOLS/dylib_unhell.py index 778cc24faf41a..77807bce65d47 100755 --- a/TOOLS/dylib_unhell.py +++ b/TOOLS/dylib_unhell.py @@ -294,6 +294,7 @@ def process(binary): print(">> copying and processing vulkan loader") process_vulkan_loader(binary, "MoltenVK_icd.json", "vulkan/icd.d", "ICD") + process_vulkan_loader(binary, "kosmickrisp_mesa_icd.aarch64.json", "vulkan/icd.d", "ICD") if check_vulkan_max_version("1.3.261.1"): process_vulkan_loader( binary, From fd55c04bcbfa65541542431638e0bb00295a63e8 Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 14 Mar 2026 16:31:22 +0100 Subject: [PATCH 4/5] ci/mac: install mesa and KosmicKrisp --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38dba22f404dc..a555ad2f80c33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -313,7 +313,7 @@ jobs: if brew list ffmpeg &> /dev/null; then brew unlink ffmpeg; fi brew install -q autoconf automake curl pkgconf libtool python freetype fribidi little-cms2 \ luajit libass ffmpeg-full meson rust uchardet mujs libplacebo molten-vk vulkan-loader vulkan-headers \ - libarchive libbluray libcaca libcdio-paranoia libdvdnav rubberband zimg + libarchive libbluray libcaca libcdio-paranoia libdvdnav rubberband zimg mesa brew link ffmpeg-full - name: Build with meson From 9e4ca547369baf3a3ccd1b7d32eb6d126fb0e273 Mon Sep 17 00:00:00 2001 From: der richter Date: Wed, 27 May 2026 14:49:19 +0200 Subject: [PATCH 5/5] ci/mac: disable unnecessary dependencies egl and x11 clipboard if mesa is installed for KosmicKrisp it also installs dependencies that are autodetected and basically useless on macOS. this leads +200mb of dylibs when bundled. for example: libEGL.dylib > libgallium.dylib > libLLVM.dylib (+190mb) libXfixes.dylib > libX11.dylib libX11-xcb.dylib --- ci/build-macos.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build-macos.sh b/ci/build-macos.sh index eef301e5834d6..83efe9ef54368 100755 --- a/ci/build-macos.sh +++ b/ci/build-macos.sh @@ -19,6 +19,7 @@ meson setup build $common_args \ -D{plain-gl,rubberband,zimg,zlib}=enabled \ -D{cocoa,coreaudio,gl-cocoa,videotoolbox-gl,videotoolbox-pl}=enabled \ -D{swift-build,macos-cocoa-cb,macos-media-player,macos-touchbar,vulkan}=enabled \ + -D{egl,x11-clipboard}=disabled \ -Dswift-flags="${SWIFT_FLAGS}" meson compile -C build -j4