From f75750f7404e5505b582fd6c5feb3e10446073eb Mon Sep 17 00:00:00 2001 From: "duncan.hopkins" Date: Fri, 22 Mar 2024 10:56:16 +0000 Subject: [PATCH] zink/apple: added `moltenvk-dir` search to allow MoltenVK to be sourced from brew. The file layout in the brew obtained molten-vk package is differnt again to the VulkanSDK or MoltenVK packages. Added an extra sub-directory location search from the `moltenvk-dir` build option. This allows for the following to be used `-Dmoltenvk-dir=$(brew --prefix molten-vk)`. Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/meson.build b/src/gallium/drivers/zink/meson.build index 8b66bbe08e0..db68907f256 100644 --- a/src/gallium/drivers/zink/meson.build +++ b/src/gallium/drivers/zink/meson.build @@ -82,11 +82,17 @@ if host_machine.system() == 'darwin' # MoltenVK options if with_moltenvk_dir != '' fs = import('fs') + # Vulkan SDK 1.3.250 to 1.3.268 support moltenvk_includes = join_paths(with_moltenvk_dir, 'MoltenVK', 'include') if not fs.is_dir(moltenvk_includes) + # Vulkan SDK 1.3.275 onwards support moltenvk_includes = join_paths(with_moltenvk_dir, 'macos', 'include') if not fs.is_dir(moltenvk_includes) - error(f'moltenvk includes cannot be found in moltenvk-dir="@with_moltenvk_dir@"') + # MoltenVK from brew support + moltenvk_includes = join_paths(with_moltenvk_dir, 'include') + if not fs.is_dir(moltenvk_includes) + error(f'moltenvk includes cannot be found in moltenvk-dir="@with_moltenvk_dir@"') + endif endif endif inc_zink_vk += include_directories(moltenvk_includes)