mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
gallivm: add LoongArch support to the mattrs setting code
Currently the mattrs is set according to the softdev convention, with LSX explicitly disabled because it's troublesome at least on LLVM 17. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
This commit is contained in:
parent
08425d9aaf
commit
979c364018
1 changed files with 18 additions and 0 deletions
|
|
@ -414,6 +414,24 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
|
|||
*/
|
||||
MAttrs = {"+m","+c","+a","+d","+f"};
|
||||
#endif
|
||||
|
||||
#if DETECT_ARCH_LOONGARCH64 == 1
|
||||
/*
|
||||
* TODO: Implement util_get_cpu_caps()
|
||||
*
|
||||
* No FPU-less LoongArch64 systems are ever shipped yet, and LP64D is
|
||||
* the default ABI, so FPU is enabled here.
|
||||
*
|
||||
* The Software development convention defaults to have "128-bit
|
||||
* vector", so LSX is enabled here, see
|
||||
* https://github.com/loongson/la-softdev-convention/releases/download/v0.1/la-softdev-convention.pdf
|
||||
*/
|
||||
MAttrs = {"+f","+d"};
|
||||
#if LLVM_VERSION_MAJOR == 17
|
||||
/* LLVM 17's LSX support is incomplete, so explicitly mask it */
|
||||
MAttrs.push_back("-lsx");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue