[Mesa-dev] [RFC PATCH mesa 1/5] meson: give different names to the vars containing dri drivers vs gallium drivers
Dylan Baker
dylan at pnwbakers.com
Sat Feb 24 00:42:59 UTC 2018
Quoting Eric Engestrom (2018-02-23 10:08:44)
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> meson.build | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index e470e62074da9a46767c..2d474b140373292e49e7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -108,24 +108,24 @@ with_dri_r100 = false
> with_dri_r200 = false
> with_dri_nouveau = false
> with_dri_swrast = false
> -_drivers = get_option('dri-drivers')
> -if _drivers == 'auto'
> +_dri_drivers = get_option('dri-drivers')
If we're going to keep these around I'd rather drop the leading _, that tells me
that this is a temporary variable and not something to be relied on.
> +if _dri_drivers == 'auto'
> if host_machine.system() == 'linux'
> # TODO: PPC, Sparc
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> - _drivers = 'i915,i965,r100,r200,nouveau'
> + _dri_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
> elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
> # only swrast would make sense here, but gallium swrast is a much better default
> - _drivers = ''
> + _dri_drivers = ''
> else
> error('Unknown OS. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
> endif
> endif
> -if _drivers != ''
> - _split = _drivers.split(',')
> +if _dri_drivers != ''
> + _split = _dri_drivers.split(',')
> with_dri_i915 = _split.contains('i915')
> with_dri_i965 = _split.contains('i965')
> with_dri_r100 = _split.contains('r100')
> @@ -151,25 +151,25 @@ with_gallium_i915 = false
> with_gallium_svga = false
> with_gallium_virgl = false
> with_gallium_swr = false
> -_drivers = get_option('gallium-drivers')
> -if _drivers == 'auto'
> +_gallium_drivers = get_option('gallium-drivers')
> +if _gallium_drivers == 'auto'
> if host_machine.system() == 'linux'
> # TODO: PPC, Sparc
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> - _drivers = 'r300,r600,radeonsi,nouveau,virgl,svga,swrast'
> + _gallium_drivers = 'r300,r600,radeonsi,nouveau,virgl,svga,swrast'
> elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
> - _drivers = 'pl111,vc4,vc5,freedreno,etnaviv,imx,virgl,svga,swrast'
> + _gallium_drivers = 'pl111,vc4,vc5,freedreno,etnaviv,imx,virgl,svga,swrast'
> else
> error('Unknown architecture. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
> endif
> elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
> - _drivers = 'swrast'
> + _gallium_drivers = 'swrast'
> else
> error('Unknown OS. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
> endif
> endif
> -if _drivers != ''
> - _split = _drivers.split(',')
> +if _gallium_drivers != ''
> + _split = _gallium_drivers.split(',')
> with_gallium_pl111 = _split.contains('pl111')
> with_gallium_radeonsi = _split.contains('radeonsi')
> with_gallium_r300 = _split.contains('r300')
> --
> Cheers,
> Eric
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180223/a6ffecde/attachment-0001.sig>
More information about the mesa-dev
mailing list