From 04055256eca68a4c33295d7bbdd72aabf2a2361d Mon Sep 17 00:00:00 2001 From: Louis Montagne Date: Tue, 5 May 2026 12:29:45 +0200 Subject: [PATCH] meson: allow DRI on darwin to enable Zink + EGL builds Mesa already sets `with_dri_platform = 'apple'` when the host system is darwin (line 412), but the gating on `with_dri` itself only enables DRI when `system_has_kms_drm` is true (or for the kgsl/Zink combo). Darwin has no KMS/DRM, so DRI ends up disabled and Zink targeting EGL surfaceless cannot be built. Extend the existing `kgsl + zink` exception to also cover darwin: enable DRI on darwin only when zink is the gallium driver in use. This factors the exception under the `with_gallium_zink` umbrella, which leaves the old appledri X11 / GLX path completely untouched on darwin builds that do not enable zink. Validated on macOS 15.2 / Apple Silicon with Mesa 26.x targeting Zink over the KosmicKrisp Vulkan ICD: OpenGL 4.6 surfaceless contexts work end to end. Suggested-by: QwertyChouskie Signed-off-by: Louis Montagne Part-of: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f1b561b6ad5..bdff7fb7abb 100644 --- a/meson.build +++ b/meson.build @@ -355,7 +355,7 @@ with_vdrm = [ ].contains(true) with_dri = false -if with_gallium and (system_has_kms_drm or (freedreno_kmds.contains('kgsl') and with_gallium_zink)) +if with_gallium and (system_has_kms_drm or (with_gallium_zink and (freedreno_kmds.contains('kgsl') or host_machine.system() == 'darwin'))) _glx = get_option('glx') _egl = get_option('egl') if _glx == 'dri' or _egl.enabled() or (_glx == 'disabled' and _egl.allowed())