From cd8715440ae8c3c3eb8f2c8337a2bb288b0f3d92 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 31 Mar 2025 11:43:17 +1000 Subject: [PATCH] gallivm: check for avx512vbmi and tell LLVM the correct answer. 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 Part-of: (cherry picked from commit 5d6d167a7c2f492710b666c963cfa306e3d82aae) --- .pick_status.json | 2 +- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index ec3fb52e93b..b90e73f612c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -544,7 +544,7 @@ "description": "gallivm: check for avx512vbmi and tell LLVM the correct answer.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 5b615d627ff..2b8b4636fc5 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -383,6 +383,7 @@ lp_build_fill_mattrs(std::vector &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) {