[Mesa-dev] [PATCH] meson: implement default driver arguments
Dylan Baker
dylan at pnwbakers.com
Mon Oct 30 17:21:50 UTC 2017
This allows drivers to be set by OS/arch in a sane manner.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
meson.build | 37 +++++++++++++++++++++++++++++++++++--
meson_options.txt | 8 ++++----
2 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 24d997b3e0a..436d676d72d 100644
--- a/meson.build
+++ b/meson.build
@@ -90,7 +90,19 @@ with_dri_r200 = false
with_dri_nouveau = false
with_dri_swrast = false
_drivers = get_option('dri-drivers')
-if _drivers != ''
+if _drivers == 'default'
+ if ['linux', 'bsd'].contains(host_machine.system())
+ if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+ with_dri_i915 = true
+ with_dri_i965 = true
+ with_dri_r100 = true
+ with_dri_r200 = true
+ with_dri_nouveau = true
+ with_dri = true
+ endif
+ # TODO: PPC, Sparc
+ endif
+elif _drivers != ''
_split = _drivers.split(',')
with_dri_i915 = _split.contains('i915')
with_dri_i965 = _split.contains('i965')
@@ -112,7 +124,28 @@ with_gallium_vc5 = false
with_gallium_etnaviv = false
with_gallium_imx = false
_drivers = get_option('gallium-drivers')
-if _drivers != ''
+if _drivers == 'default'
+ if ['linux', 'bsd'].contains(host_machine.system())
+ if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+ with_gallium_radeonsi = true
+ with_gallium_nouveau = true
+ with_gallium_softpipe = true
+ with_gallium = true
+ with_dri = true
+ elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
+ with_gallium_pl111 = true
+ with_gallium_vc4 = true
+ with_gallium_vc5 = true
+ with_gallium_freedreno = true
+ with_gallium_etnaviv = true
+ with_gallium_imx = true
+ with_gallium_softpipe = true
+ with_gallium = true
+ with_dri = true
+ endif
+ # TODO: PPC, Sparc
+ endif
+elif _drivers != ''
_split = _drivers.split(',')
with_gallium_pl111 = _split.contains('pl111')
with_gallium_radeonsi = _split.contains('radeonsi')
diff --git a/meson_options.txt b/meson_options.txt
index 74f1e71bf43..0de54f9422d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -34,8 +34,8 @@ option(
option(
'dri-drivers',
type : 'string',
- value : 'i915,i965,r100,r200,nouveau',
- description : 'comma separated list of dri drivers to build.'
+ value : 'default',
+ description : 'comma separated list of dri drivers to build. If this is set to default all drivers applicable to the target OS/architecture will be built'
)
option(
'dri-drivers-path',
@@ -46,8 +46,8 @@ option(
option(
'gallium-drivers',
type : 'string',
- value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx',
- description : 'comma separated list of gallium drivers to build.'
+ value : 'default',
+ description : 'comma separated list of gallium drivers to build. If this is set to default all drivers applicable to the target OS/architecture will be built'
)
option(
'gallium-media',
--
2.14.3
More information about the mesa-dev
mailing list