Skip to content

Commit 8b8d14f

Browse files
noah1510Marge Bot
authored and
Marge Bot
committed
add zink to macos ci
This commit causes zink to be build in the macos ci on every commit. In addition to that meson will now error if there is no moltenvk-dir given on macos since the build would fail anyways. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19531>
1 parent e244b0f commit 8b8d14f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/macos.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
brew "libxcb"
2727
brew "libxdamage"
2828
brew "libxext"
29+
brew "molten-vk"
2930
brew "ninja"
3031
brew "pkg-config"
3132
@@ -41,7 +42,7 @@ jobs:
4142
[binaries]
4243
llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
4344
EOL
44-
$MESON_EXEC . build --native-file=native_config -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast -Dglx=${{ matrix.glx_option }}
45+
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
4546
- name: Build
4647
run: $MESON_EXEC compile -C build
4748
- name: Test

src/gallium/drivers/zink/meson.build

+10-3
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,18 @@ zink_nir_algebraic_c = custom_target(
7676
zink_c_args = []
7777
inc_zink_vk = []
7878

79-
# MoltenVK options
80-
if with_moltenvk_dir != ''
81-
inc_zink_vk = [inc_zink_vk, include_directories( join_paths(with_moltenvk_dir, 'include') )]
79+
if host_machine.system() == 'darwin'
80+
81+
# MoltenVK options
82+
if with_moltenvk_dir != ''
83+
inc_zink_vk += include_directories(join_paths(with_moltenvk_dir, 'include'))
84+
else
85+
error('moltenvk-dir is required but not set.')
86+
endif
87+
8288
zink_c_args += ['-x','objective-c'] # Put compiler into objective-C mode to allow for MacOS types, like IOSurface and CAMetalLayer
8389
zink_c_args += ['-iframework' , 'Foundation']
90+
8491
endif
8592

8693
libzink = static_library(

0 commit comments

Comments
 (0)