[Mesa-dev] [PATCH] meson: better defaults for osx, windows and cygwin

Jon Turney jon.turney at dronecode.org.uk
Sat Feb 3 13:49:40 UTC 2018


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 = ''
   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'
   endif
 endif
 if _platforms != ''
-- 
2.16.1



More information about the mesa-dev mailing list