summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorduncan.hopkins <duncan.hopkins@foundry.com>2023-10-27 15:34:01 +0100
committerMarge Bot <emma+marge@anholt.net>2024-03-18 18:06:45 +0000
commit0108bae30f5f5deba8e430766dc3465bda82d309 (patch)
tree7921804bc2f70014930d373e1e39c2f78684897b /meson.build
parent97b6851815acee2115bd1caff8e7edde23f3f7c5 (diff)
apple: Meson defines GLX_USE_APPLE to allow for Gallium drivers to work on MacOS.
By default, on MacOS, MESA will build a version that does not run the Gallium drivers on MacOS. GLX_USE_APPLE must be defined to switch the code over to using the Gallium drivers. GLX_USE_APPLE will be defined if any Gallium driver other than just SWRast is requested. The default behaviour, due to default values, always asks for SWRast. This logic leaves the default behaviour alone but allows the Gallium drivers to be actived without extra parameters. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 686d5225deb..f6abd9165b8 100644
--- a/meson.build
+++ b/meson.build
@@ -860,6 +860,12 @@ if with_platform_x11
pre_args += '-DGLX_USE_DRM'
elif with_dri_platform == 'apple'
pre_args += '-DGLX_USE_APPLEGL'
+ # Check to see if more than just the default 'swrast' is required
+ if (not with_gallium_softpipe) or 1 < gallium_drivers.length()
+ # Switch the MacOS code from "forwarding to the OpenGL.framework" mode
+ # and into actual Gallium Driver mode
+ pre_args += '-DGLX_USE_APPLE'
+ endif
elif with_dri_platform == 'windows'
pre_args += '-DGLX_USE_WINDOWSGL'
endif