diff --git a/libs/mesa/Makefile b/libs/mesa/Makefile index eb5ffef..aceac3a 100644 --- a/libs/mesa/Makefile +++ b/libs/mesa/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mesa -PKG_VERSION:=26.1.2 +PKG_VERSION:=26.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://archive.mesa3d.org/ -PKG_HASH:=bac2bca9121897a2b8162e79636b50ac998fca799c8e6cf914edd85962babdf0 +PKG_HASH:=c47e81bddc4760360a41ac3c5acec38acb81f9d750ecef47e7f3adc7021a4442 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause diff --git a/libs/mesa/patches/200-panfrost-Enable-cross-compilation-of-precompilers-on.patch b/libs/mesa/patches/200-panfrost-Enable-cross-compilation-of-precompilers-on.patch index 736573d..95856a1 100644 --- a/libs/mesa/patches/200-panfrost-Enable-cross-compilation-of-precompilers-on.patch +++ b/libs/mesa/patches/200-panfrost-Enable-cross-compilation-of-precompilers-on.patch @@ -1,6 +1,8 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Daniel Golle -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,26 @@ 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 +--- + 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 + +diff --git a/src/meson.build b/src/meson.build +index c36f44b..919eb36 100644 --- 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 @@ -46,6 +59,9 @@ non-Linux hosts. subdir('panfrost') endif if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil or with_microsoft_vk +diff --git a/src/panfrost/lib/kmod/pan_kmod_stub.h b/src/panfrost/lib/kmod/pan_kmod_stub.h +new file mode 100644 +index 0000000..44b9e07 --- /dev/null +++ b/src/panfrost/lib/kmod/pan_kmod_stub.h @@ -0,0 +1,29 @@ @@ -78,6 +94,8 @@ non-Linux hosts. +#if defined(__cplusplus) +} /* extern C */ +#endif +diff --git a/src/panfrost/lib/meson.build b/src/panfrost/lib/meson.build +index 55b6757..213d85d 100644 --- a/src/panfrost/lib/meson.build +++ b/src/panfrost/lib/meson.build @@ -2,7 +2,9 @@ @@ -89,7 +107,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 +130,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 +167,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 +176,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,13 +191,15 @@ 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, ) if with_tests +diff --git a/src/panfrost/lib/pan_desc.h b/src/panfrost/lib/pan_desc.h +index 34bdabe..d556796 100644 --- a/src/panfrost/lib/pan_desc.h +++ b/src/panfrost/lib/pan_desc.h @@ -8,7 +8,11 @@ @@ -194,17 +214,8 @@ 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') +diff --git a/src/panfrost/lib/pan_image.h b/src/panfrost/lib/pan_image.h +index 642f4a6..3c0e098 100644 --- a/src/panfrost/lib/pan_image.h +++ b/src/panfrost/lib/pan_image.h @@ -18,7 +18,11 @@ @@ -219,3 +230,19 @@ non-Linux hosts. #include "util/log.h" +diff --git a/src/panfrost/meson.build b/src/panfrost/meson.build +index cb928b1..68bf5d7 100644 +--- a/src/panfrost/meson.build ++++ b/src/panfrost/meson.build +@@ -34,7 +34,7 @@ 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 +-- +2.55.0 + diff --git a/libs/mesa/patches/300-teflon-conditional-npu-drivers.patch b/libs/mesa/patches/300-teflon-conditional-npu-drivers.patch index 3ad0cbf..dd7eb5b 100644 --- a/libs/mesa/patches/300-teflon-conditional-npu-drivers.patch +++ b/libs/mesa/patches/300-teflon-conditional-npu-drivers.patch @@ -1,3 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +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 +--- + src/gallium/targets/teflon/meson.build | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/src/gallium/targets/teflon/meson.build b/src/gallium/targets/teflon/meson.build +index fa8b9c4..a82c13f 100644 --- a/src/gallium/targets/teflon/meson.build +++ b/src/gallium/targets/teflon/meson.build @@ -1,3 +1,14 @@ @@ -30,3 +47,6 @@ install : true, ) +-- +2.55.0 + diff --git a/libs/mesa/patches/400-gallivm-lp-bld-misc-auto-iter-llvm22.patch b/libs/mesa/patches/400-gallivm-lp-bld-misc-auto-iter-llvm22.patch deleted file mode 100644 index 1c25163..0000000 --- a/libs/mesa/patches/400-gallivm-lp-bld-misc-auto-iter-llvm22.patch +++ /dev/null @@ -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 f = features.begin(); -+ for (auto f = features.begin(); - f != features.end(); - ++f) { - MAttrs.push_back(((*f).second ? "+" : "-") + (*f).first().str()); diff --git a/libs/mesa/patches/600-zink-allow-kms-only-display-fd.patch b/libs/mesa/patches/600-zink-allow-kms-only-display-fd.patch index 68056b0..989deed 100644 --- a/libs/mesa/patches/600-zink-allow-kms-only-display-fd.patch +++ b/libs/mesa/patches/600-zink-allow-kms-only-display-fd.patch @@ -1,6 +1,7 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Daniel Golle -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,16 @@ 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 +--- + src/gallium/drivers/zink/zink_screen.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c +index c11c6a2..2ef6527 100644 --- 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_major, int64_t *dev_minor) if (drmGetDevice2(fd, 0, &dev)) return -1; @@ -37,3 +45,6 @@ takes care of getting the rendered frame onto the display controller. if(stat(dev->nodes[DRM_NODE_RENDER], &stx)) { ret = -1; +-- +2.55.0 +