mesa: update to version 26.2.2

26.2.0 was a development release which upstream advised against using;
26.2.1 is the first stable point release on the 26.2 branch and 26.2.2
adds further bug fixes on top of it, among them the armhf build fix and
one potential security issue. Drop patch 400, whose fix is now present
upstream, and refresh the remaining patches. Add a new patch adapting
the gallivm ORCJIT object linking layer creator to the signature change
in LLVM 23, which targets without MCJIT support such as riscv64 need.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle committed 2026-09-18 16:16:45 +01:00
1 parent aa4a28522c
commit b1f2e305d9
7 files changed
+116 -44

No files matched your search

+3 -3
View File
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mesa
PKG_VERSION:=26.1.2
PKG_RELEASE:=2
PKG_VERSION:=26.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://archive.mesa3d.org/
PKG_HASH:=bac2bca9121897a2b8162e79636b50ac998fca799c8e6cf914edd85962babdf0
PKG_HASH:=eeb29ca7e56cfaa8e8a79538dcf834e3b18e501c31bef5145e959ea437cc4216
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
@@ -10,7 +10,7 @@ Subject: [PATCH 1/2] meson: allow using LLVM as embedded project
--- a/meson.build
+++ b/meson.build
@@ -1895,17 +1895,29 @@ _shared_llvm = get_option('shared-llvm')
@@ -2001,17 +2001,29 @@ _shared_llvm = get_option('shared-llvm')
.disable_auto_if(host_machine.system() == 'windows') \
.allowed()
@@ -51,7 +51,7 @@ Subject: [PATCH 1/2] meson: allow using LLVM as embedded project
if dep_llvm.found()
pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
pre_args += '-DLLVM_IS_SHARED=@0@'.format(_shared_llvm.to_int())
@@ -1992,7 +2004,11 @@ endif
@@ -2094,7 +2106,11 @@ endif
dep_clang = null_dep
if with_clc
@@ -66,7 +66,7 @@ Subject: [PATCH 1/2] meson: allow using LLVM as embedded project
--- a/src/compiler/clc/meson.build
+++ b/src/compiler/clc/meson.build
@@ -25,14 +25,14 @@ if not _shared_llvm or \
@@ -24,14 +24,14 @@ if not _shared_llvm or \
opencl_c_base_h = custom_target(
'opencl-c-base.h',
@@ -1,6 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Mon, 13 Oct 2025 01:32:22 +0100
Subject: panfrost: Enable cross-compilation of precompilers on non-Linux hosts
Date: Mon, 13 Oct 2025 02:42:15 +0100
Subject: [PATCH] panfrost: Enable cross-compilation of precompilers on
non-Linux hosts
This patch enables building Mesa's Panfrost precompilers on non-Linux
hosts (macOS, Windows, etc.) by introducing a stub kernel mode driver
@@ -29,15 +31,24 @@ Changes:
4. Extended panfrost build to support with_drivers_clc for CLC
precompiler requirements
Refreshed against Mesa 26.1.1: the per-arch source list now contains
pan_buffer.c, pan_fb.c and pan_fb_nir.c in addition to pan_blend.c
and pan_texture.c. All of those include pan_desc.h transitively but
do not call into kmod, so they can build against the stub header on
non-Linux hosts.
Refreshed against Mesa 26.2.1: upstream added a 'v14' pixel-format/
per-arch variant and a soong_compat_c_args entry to libpanfrost_lib's
c_args; both carried through unchanged into the stub/full-driver split.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
src/meson.build | 2 +-
src/panfrost/lib/kmod/pan_kmod_stub.h | 29 +++++++++++++
src/panfrost/lib/meson.build | 59 +++++++++++++++++++--------
src/panfrost/lib/pan_desc.h | 4 ++
src/panfrost/lib/pan_image.h | 4 ++
src/panfrost/meson.build | 2 +-
6 files changed, 82 insertions(+), 18 deletions(-)
create mode 100644 src/panfrost/lib/kmod/pan_kmod_stub.h
--- a/src/meson.build
+++ b/src/meson.build
@@ -92,7 +92,7 @@ endif
@@ -101,7 +101,7 @@ endif
if with_any_intel
subdir('intel')
endif
@@ -89,7 +100,7 @@ non-Linux hosts.
+ subdir('kmod')
+endif
pixel_format_versions = ['5', '6', '7', '9', '10', '12', '13']
pixel_format_versions = ['5', '6', '7', '9', '10', '12', '13', '14']
libpanfrost_pixel_format = []
@@ -21,21 +23,28 @@ foreach ver : pixel_format_versions
endforeach
@@ -112,7 +123,7 @@ non-Linux hosts.
+ libpanfrost_per_arch_c_args += '-DPAN_KMOD_STUB'
+endif
foreach ver : ['4', '5', '6', '7', '9', '10', '12', '13']
foreach ver : ['4', '5', '6', '7', '9', '10', '12', '13', '14']
libpanfrost_per_arch += static_library(
- 'pan-arch-v' + ver,
- [
@@ -149,7 +160,7 @@ non-Linux hosts.
+ libpanfrost_link_with += libpankmod_lib
+endif
+
+libpanfrost_lib_c_args = [no_override_init_args]
+libpanfrost_lib_c_args = [no_override_init_args, soong_compat_c_args]
+if not (with_gallium_panfrost or with_panfrost_vk)
+ libpanfrost_lib_c_args += '-DPAN_KMOD_STUB'
+endif
@@ -158,7 +169,7 @@ non-Linux hosts.
'panfrost_lib',
[libpanfrost_lib_files, pan_packers],
include_directories : [inc_include, inc_src, inc_panfrost],
- c_args : [no_override_init_args],
- c_args : [no_override_init_args, soong_compat_c_args],
+ c_args : libpanfrost_lib_c_args,
gnu_symbol_visibility : 'hidden',
dependencies: [dep_libdrm, idep_nir, idep_mesautil, libpanfrost_model_dep],
@@ -173,7 +184,7 @@ non-Linux hosts.
+endif
+
libpanfrost_dep = declare_dependency(
link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_compiler, libpanfrost_pixel_format, libpanfrost_per_arch],
link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_pixel_format, libpanfrost_per_arch],
include_directories: [inc_include, inc_src, inc_panfrost],
- dependencies: [deps_for_libpanfrost, libpankmod_dep, idep_nir],
+ dependencies: libpanfrost_dependencies,
@@ -194,17 +205,6 @@ non-Linux hosts.
#include "pan_image.h"
#include "pan_pool.h"
--- a/src/panfrost/meson.build
+++ b/src/panfrost/meson.build
@@ -14,7 +14,7 @@ subdir('shared')
subdir('model')
subdir('compiler')
-if with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
+if with_drivers_clc or with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
subdir('genxml')
subdir('lib')
subdir('clc')
--- a/src/panfrost/lib/pan_image.h
+++ b/src/panfrost/lib/pan_image.h
@@ -18,7 +18,11 @@
@@ -219,3 +219,22 @@ non-Linux hosts.
#include "util/log.h"
--- a/src/panfrost/meson.build
+++ b/src/panfrost/meson.build
@@ -34,14 +34,14 @@ endif
subdir('shared')
subdir('model')
-if with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
+if with_drivers_clc or with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
subdir('genxml')
subdir('lib')
endif
subdir('compiler')
-if with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
+if with_drivers_clc or with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
subdir('clc')
endif
@@ -1,3 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 9 May 2026 01:37:16 +0100
Subject: [PATCH] teflon: make linked NPU driver dependencies conditional
libteflon unconditionally linked driver_etnaviv, driver_rocket and
driver_ethosu, even when the corresponding gallium driver is disabled,
causing a link failure. Build the dependency list conditionally on
with_gallium_etnaviv/with_gallium_rocket/with_gallium_ethosu instead.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
src/gallium/targets/teflon/meson.build | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
--- a/src/gallium/targets/teflon/meson.build
+++ b/src/gallium/targets/teflon/meson.build
@@ -1,3 +1,14 @@
@@ -1,11 +0,0 @@
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -331,7 +331,7 @@ lp_build_fill_mattrs(std::vector<std::st
llvm::sys::getHostCPUFeatures(features);
#endif
- for (llvm::StringMapIterator<bool> f = features.begin();
+ for (auto f = features.begin();
f != features.end();
++f) {
MAttrs.push_back(((*f).second ? "+" : "-") + (*f).first().str());
@@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 17 Sep 2026 12:00:00 +0100
Subject: [PATCH] gallivm: adapt the ObjectLinkingLayer creator to LLVM 23
LLVM 23 changed LLJITBuilderState::ObjectLinkingLayerCreator to take
the JITLinkMemoryManager that LLJIT itself owns instead of leaving the
creator to provide one, so the existing lambda no longer converts and
the build fails on targets without MCJIT support, such as riscv64.
Select a third lambda for LLVM 23 and later which forwards that memory
manager to the ObjectLinkingLayer.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
@@ -341,14 +341,21 @@ LPJit::LPJit() :jit_dylib_count(0) {
.setJITTargetMachineBuilder(std::move(JTMB))
#ifdef USE_JITLINK
.setObjectLinkingLayerCreator(
-#if LLVM_VERSION_MAJOR >= 21
+#if LLVM_VERSION_MAJOR >= 23
+ /* LLVM 23 passes in the memory manager owned by the LLJIT */
+ [&](ExecutionSession &ES,
+ llvm::jitlink::JITLinkMemoryManager &MemMgr) {
+ return std::make_unique<ObjectLinkingLayer>(ES, MemMgr);
+#elif LLVM_VERSION_MAJOR >= 21
/* LLVM 21 removed the Triple argument */
[&](ExecutionSession &ES) {
+ return std::make_unique<ObjectLinkingLayer>(
+ ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
#else
[&](ExecutionSession &ES, const llvm::Triple &TT) {
-#endif
return std::make_unique<ObjectLinkingLayer>(
ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
+#endif
})
#else
#if LLVM_USE_INTEL_JITEVENTS
@@ -1,6 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Mon, 25 May 2026 22:00:00 +0100
Subject: zink: allow KMS-only display fd to fall through to default
Date: Tue, 26 May 2026 01:55:36 +0100
Subject: [PATCH] zink: allow KMS-only display fd to fall through to default
Vulkan device selection
When MESA_LOADER_DRIVER_OVERRIDE=zink is used with a GBM device created
@@ -16,9 +17,14 @@ whichever ICD vkEnumeratePhysicalDevices() reports first (PowerVR on
JH7110). Cross-device dma-buf import via VK_KHR_external_memory_fd
takes care of getting the rendered frame onto the display controller.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
src/gallium/drivers/zink/zink_screen.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -3862,10 +3862,15 @@ zink_render_rdev(int fd, int64_t *dev_ma
@@ -3882,10 +3882,15 @@ zink_render_rdev(int fd, int64_t *dev_ma
if (drmGetDevice2(fd, 0, &dev))
return -1;