[Mesa-dev] [PATCH] meson: better defaults for osx, windows and cygwin
Dylan Baker
dylan at pnwbakers.com
Sat Feb 3 18:07:41 UTC 2018
Quoting Jon Turney (2018-02-03 05:49:40)
> set suitable defaults for 'dri-drivers', 'gallium-drivers', 'vulkan-drivers'
> and 'platforms' options for osx, windows and cygwin, adding cygwin where
> appropriate.
>
> Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
> ---
> meson.build | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index cb3b6587b4..b49bc9e805 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -92,15 +92,16 @@ with_dri_nouveau = false
> with_dri_swrast = false
> _drivers = get_option('dri-drivers')
> if _drivers == 'auto'
> - # TODO: PPC, Sparc
> - if not ['darwin', 'windows'].contains(host_machine.system())
> + if not ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
> + # TODO: PPC, Sparc
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> _drivers = 'i915,i965,r100,r200,nouveau'
> else
> error('Unknown architecture. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
> endif
> else
> - error('Unknown OS. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
> + # only swrast would make sense here, but gallium swrast is a much better default
> + _drivers = ''
I'm really not a fan of dumping the 'else error' case. This currently means that
for example haiku will try to build something that they cannot support. I'd
really rather just set appropriate defaults for OSes that are guaranteed
supported and still let OSes that haven't been tested fall through to error. I
also think that's a nice place for people trying to use mesa meson on a new
platform, since they understand we haven't tested on their OS.
> endif
> endif
> if _drivers != ''
> @@ -132,7 +133,7 @@ with_gallium_virgl = false
> with_gallium_swr = false
> _drivers = get_option('gallium-drivers')
> if _drivers == 'auto'
> - if not ['darwin', 'windows'].contains(host_machine.system())
> + if not ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
> # TODO: PPC, Sparc
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> _drivers = 'r300,r600,radeonsi,nouveau,virgl,svga,swrast'
> @@ -142,7 +143,7 @@ if _drivers == 'auto'
> error('Unknown architecture. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
> endif
> else
> - error('Unknown OS. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
> + _drivers = 'swrast'
> endif
> endif
> if _drivers != ''
> @@ -170,7 +171,7 @@ with_amd_vk = false
> with_any_vk = false
> _vulkan_drivers = get_option('vulkan-drivers')
> if _vulkan_drivers == 'auto'
> - if not ['darwin', 'windows'].contains(host_machine.system())
> + if not ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
> if host_machine.cpu_family().startswith('x86')
> _vulkan_drivers = 'amd,intel'
> else
> @@ -234,7 +235,7 @@ if _platforms == 'auto'
> if system_has_kms_drm
> _platforms = 'x11,wayland,drm,surfaceless'
> else
> - error('Unknown OS, no platforms enabled. Patches gladly accepted to fix this.')
> + _platforms = 'x11,surfaceless'
This has the same problem, we're turning on surfaces blindly, hoping that the
platform is unix-like and uses x11 and surfaceless platforms.
> endif
> endif
> if _platforms != ''
> --
> 2.16.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180203/3b3e2843/attachment-0001.sig>
More information about the mesa-dev
mailing list