gallivm: check for avx512vbmi and tell LLVM the correct answer.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

There are some CPUs out there which don't have vbmi and do have
other avx512 and mesa crashes on those with illegal instructions.

This was reported to Red Hat support.

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34282>
This commit is contained in:
Dave Airlie 2025-03-31 11:43:17 +10:00 committed by Marge Bot
parent 4ac900b5bf
commit 5d6d167a7c

View file

@ -383,6 +383,7 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
MAttrs.push_back(util_get_cpu_caps()->has_avx512bw ? "+avx512bw" : "-avx512bw");
MAttrs.push_back(util_get_cpu_caps()->has_avx512dq ? "+avx512dq" : "-avx512dq");
MAttrs.push_back(util_get_cpu_caps()->has_avx512vl ? "+avx512vl" : "-avx512vl");
MAttrs.push_back(util_get_cpu_caps()->has_avx512vbmi ? "+avx512vbmi" : "-avx512vbmi");
#endif
#if DETECT_ARCH_ARM
if (!util_get_cpu_caps()->has_neon) {