nir: fix nir_fixup_is_exported for LLVM-22

Starting with LLVM-22 we won't see the kernel wrapper anymore, and this
is a trivial fix to get around this.

See: 5458eb2511

Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit 24d20df3d6)
This commit is contained in:
Karol Herbst 2026-01-17 01:04:20 +01:00 committed by Eric Engestrom
parent 84566763c2
commit ca428e3b3c
2 changed files with 10 additions and 1 deletions

View file

@ -1794,7 +1794,7 @@
"description": "nir: fix nir_fixup_is_exported for LLVM-22",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -48,6 +48,15 @@ nir_fixup_is_exported(nir_shader *nir)
nir_foreach_function(func, nir) {
if (_mesa_set_search(shadowed, func->name)) {
func->is_exported = func->is_entrypoint;
} else {
/* Starting with LLVM-22 we don't see the wrappers anymore, so we
* can simply export every entrypoint.
*
* We could do an LLVM version check here, but that's going to be a
* mess making nir depending on LLVM in any way and this seems to work
* for both situations.
*/
func->is_exported |= func->is_entrypoint;
}
if (func->name[0] == '_') {