summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorduncan.hopkins <duncan.hopkins@foundry.com>2023-10-27 15:32:55 +0100
committerMarge Bot <emma+marge@anholt.net>2024-03-18 18:06:45 +0000
commitb0bdd0cae3b22d9db91a49e0c6f625445a055831 (patch)
tree07b6976787a9559cdcb83ad8fafdb7e44babf314 /meson.build
parentaf04f17909109b91425ac21d0d9d54f2ec3b59af (diff)
meson: relaxed some meson restrictions on MacOS/Apple allowing for wider build support.
This patch allows the meson build files, on MacOS, to build the DRI2 and EGL code paths. This is needed to activate the gallium drivers for swrast and zink to be used. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index fe3a7f334f8..686d5225deb 100644
--- a/meson.build
+++ b/meson.build
@@ -445,11 +445,10 @@ with_gbm = get_option('gbm') \
.allowed()
with_xlib_lease = get_option('xlib-lease') \
- .require(with_platform_x11 and system_has_kms_drm, error_message : 'xlib-lease requires X11 and KMS/DRM support') \
+ .require(with_platform_x11 and (system_has_kms_drm or with_dri_platform == 'apple'), error_message : 'xlib-lease requires X11 and KMS/DRM support') \
.allowed()
with_egl = get_option('egl') \
- .require(host_machine.system() != 'darwin', error_message : 'EGL not supported on MacOS') \
.require(with_platform_windows or with_platform_haiku or with_dri or with_platform_android, error_message : 'EGL requires DRI, Haiku, Windows or Android') \
.require(with_shared_glapi, error_message : 'EGL requires shared-glapi') \
.require(with_glx != 'xlib', error_message :'EGL requires DRI, but GLX is being built with xlib support') \
@@ -559,7 +558,7 @@ if with_vulkan_icd_dir == ''
endif
# GNU/Hurd includes egl_dri2, without drm.
-with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
+with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple' or
host_machine.system() == 'gnu')
with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed()
@@ -2068,6 +2067,7 @@ if with_platform_x11
pre_args += '-DXCB_KEYSYMS_AVAILABLE'
endif
dep_x11_xcb = dependency('x11-xcb')
+ dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
if with_dri_platform == 'drm' and not dep_libdrm.found()
error('libdrm required for gallium video statetrackers when using x11')
endif