summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSui Jingfeng <suijingfeng@loongson.cn>2023-02-08 09:36:24 +0800
committerMarge Bot <emma+marge@anholt.net>2023-02-22 09:09:43 +0000
commit1ba3e83958e15c8c3de7e02e87540a41801195d5 (patch)
treeef6044ee03543e7818fbe5f43ac2447a100fd3a3 /meson.build
parent1583b150d6a8c32533aa9c2f455ebe75fc6258be (diff)
downloadmesa-1ba3e83958e15c8c3de7e02e87540a41801195d5.tar.gz
meson: add basic support for loongarch
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21182>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 91a7fb8669e..621f0675489 100644
--- a/meson.build
+++ b/meson.build
@@ -154,6 +154,10 @@ if gallium_drivers.contains('auto')
gallium_drivers = [
'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast'
]
+ elif ['loongarch64'].contains(host_machine.cpu_family())
+ gallium_drivers = [
+ 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'etnaviv', 'swrast'
+ ]
else
error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
host_machine.cpu_family()))
@@ -218,6 +222,8 @@ if _vulkan_drivers.contains('auto')
_vulkan_drivers = ['swrast']
elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
_vulkan_drivers = ['amd', 'swrast']
+ elif ['loongarch64'].contains(host_machine.cpu_family())
+ _vulkan_drivers = ['amd', 'swrast']
else
error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
host_machine.cpu_family()))
@@ -1241,6 +1247,11 @@ elif host_machine.cpu_family() == 'mips64' and host_machine.endian() == 'little'
with_asm_arch = 'mips64el'
pre_args += ['-DUSE_MIPS64EL_ASM']
endif
+elif host_machine.cpu_family() == 'loongarch64'
+ if system_has_kms_drm
+ with_asm_arch = 'loongarch64'
+ pre_args += ['-DUSE_LOONGARCH64_ASM']
+ endif
endif
# Check for standard headers and functions