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>
This commit is contained in:
11
meson.build
11
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
|
||||
|
Reference in New Issue
Block a user