[Mesa-dev] [PATCH] meson: Add some presets for s390 and ppc
Dylan Baker
dylan at pnwbakers.com
Fri Sep 28 20:53:11 UTC 2018
Quoting Adam Jackson (2018-09-28 12:59:16)
> s390 doesn't have working llvm, so llvmpipe isn't an option. softpipe
> might be more featureful but classic swrast is faster. s390x has working
> llvm so we can build llvmpipe there.
>
> ppc doesn't have working llvm either (so give it classic swrast too),
> but at least it has a PCI bus you could maybe plug things into. Build
> gallium nouveau and r300 there, they might not work very well but at
> least PowerPC Macs had cards of that vintage. For ppc64 and ppc64le,
> build the gallium drivers corresponding to PCIE cards, and llvmpipe.
>
> For all of the above, don't build Vulkan drivers yet. radv should in
> principle Just Work on ppc64le, but that's true of aarch64 too, and
> we're not building radv by default there yet either.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
> meson.build | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 97693b91ecf..71a19110d17 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -96,10 +96,11 @@ system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].cont
> _drivers = get_option('dri-drivers')
> if _drivers.contains('auto')
> if system_has_kms_drm
> - # TODO: PPC, Sparc
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> _drivers = ['i915', 'i965', 'r100', 'r200', 'nouveau']
> - elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
> + elif ['s390', 'ppc'].contains(host_machine.cpu_family())
> + _drivers = ['swrast']
> + elif ['arm', 'aarch64', 's390x', 'ppc64', 'ppc64le'].contains(host_machine.cpu_family())
I don't see s390 or ppc64le in the cpu_family table here: https://mesonbuild.com/Reference-tables.html
I can't remember if the plan was to handle ppc64le as
`host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'`
or if ppc64le was going to be a unique thing. Or if we ever figured that out at
all.
> _drivers = []
> else
> error('Unknown architecture @0 at . Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.'.format(
> @@ -126,7 +127,6 @@ with_dri = _drivers.length() != 0 and _drivers != ['']
> _drivers = get_option('gallium-drivers')
> if _drivers.contains('auto')
> if system_has_kms_drm
> - # TODO: PPC, Sparc
probably should leave Sparc here.
Otherwise:
Acked-by: Dylan Baker <dylan at pnwbakers.com>
> if ['x86', 'x86_64'].contains(host_machine.cpu_family())
> _drivers = [
> 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast'
> @@ -136,6 +136,20 @@ if _drivers.contains('auto')
> 'pl111', 'v3d', 'vc4', 'freedreno', 'etnaviv', 'imx', 'nouveau',
> 'tegra', 'virgl', 'swrast',
> ]
> + elif ['ppc'].contains(host_machine.cpu_family())
> + _drivers = [
> + 'nouveau', 'r300',
> + ]
> + elif ['ppc64', 'ppc64le'].contains(host_machine.cpu_family())
> + _drivers = [
> + 'r600', 'radeonsi', 'nouveau', 'swrast'
> + ]
> + elif ['s390'].contains(host_machine.cpu_family())
> + _drivers = []
> + elif ['s390x'].contains(host_machine.cpu_family())
> + _drivers = [
> + 'swrast'
> + ]
> else
> error('Unknown architecture @0 at . Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
> host_machine.cpu_family()))
> @@ -179,7 +193,7 @@ if _vulkan_drivers.contains('auto')
> if system_has_kms_drm
> if host_machine.cpu_family().startswith('x86')
> _vulkan_drivers = ['amd', 'intel']
> - elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
> + elif ['arm', 'aarch64', 'ppc', 'ppc64', 'ppc64le', 's390', 's390x'].contains(host_machine.cpu_family())
> _vulkan_drivers = []
> else
> error('Unknown architecture @0 at . Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
> --
> 2.17.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: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180928/63685377/attachment-0001.sig>
More information about the mesa-dev
mailing list