From: Daniel Drake <ddrake@baylibre.com>
To: openembedded-core@lists.openembedded.org
Cc: Venkatasainath Ravikanti <venkatasainath.ravikanti@windriver.com>,
Daniel Drake <ddrake@baylibre.com>
Subject: [PATCH 2/2] mesa: upgrade 26.2.4 -> 26.3.1
Date: Fri, 27 Nov 2026 15:46:52 +0000 [thread overview]
Message-ID: <20261127154652.253316-3-ddrake@baylibre.com> (raw)
In-Reply-To: <20261127154652.253316-1-ddrake@baylibre.com>
Release notes:
https://docs.mesa3d.org/relnotes/26.3.0.html
https://docs.mesa3d.org/relnotes/26.3.1.html
The Venus (virtio) Vulkan driver now requires venus-protocol 1.1.3
instead of carrying the protocol headers in-tree.
Removed patches, included in 26.3:
* 0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch
(part of 265a2d4f0f8 "amd: import addrlib v10.9")
* 0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch
(aac5108bbfa "gallivm: adapt for JITLink in LLVM 23")
Removed patches, no longer needed:
* 0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch
The jay_predication typed enum is gone and the upstream code now
compiles fine with gcc 12.
Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
...uiltin_cpu_supports-for-avx2-detecti.patch | 55 -------------------
...gallivm-adapt-for-JITLink-in-LLVM-23.patch | 51 -----------------
...er-jay-jay_ir.h-do-not-used-typed-en.patch | 36 ------------
meta/recipes-graphics/mesa/mesa.inc | 12 ++--
4 files changed, 6 insertions(+), 148 deletions(-)
delete mode 100644 meta/recipes-graphics/mesa/files/0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch
delete mode 100644 meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch
delete mode 100644 meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch
diff --git a/meta/recipes-graphics/mesa/files/0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch b/meta/recipes-graphics/mesa/files/0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch
deleted file mode 100644
index 2b30c1b5c7..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b00409956cd1a58f1c676de9cbfd2c688ca3fc9f Mon Sep 17 00:00:00 2001
-From: Khem Raj <khem.raj@oss.qualcomm.com>
-Date: Thu, 13 Aug 2026 00:00:00 +0000
-Subject: [PATCH] addrlib: avoid __builtin_cpu_supports for avx2 detection
-
-__builtin_cpu_supports("avx2") lowers to a PC-relative reference to the
-libgcc/compiler-rt __cpu_model global. With clang+lld, linking that
-reference into a shared library fails because __cpu_model is treated as
-preemptible there:
-
- relocation R_X86_64_PC32 cannot be used against symbol '__cpu_model';
- recompile with -fPIC
-
-Check CPUID directly instead, which avoids the __cpu_model reference
-entirely and works with both GCC and Clang.
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43820]
-Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
----
- src/amd/addrlib/src/core/addrswizzlersimd.h | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/amd/addrlib/src/core/addrswizzlersimd.h b/src/amd/addrlib/src/core/addrswizzlersimd.h
-index fd53e40..ce30204 100644
---- a/src/amd/addrlib/src/core/addrswizzlersimd.h
-+++ b/src/amd/addrlib/src/core/addrswizzlersimd.h
-@@ -57,6 +57,8 @@
- #if ADDR_HAS_AVX2
- #if _MSC_VER
- #include <Windows.h>
-+#else
-+#include <cpuid.h>
- #endif
- #include <immintrin.h>
-
-@@ -85,7 +87,18 @@ static inline bool CpuSupportsAvx2() {
- #if _MSC_VER
- return IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE);
- #elif defined(__GNUC__)
-- return __builtin_cpu_supports("avx2");
-+ // __builtin_cpu_supports() lowers to a PC-relative reference to the
-+ // libgcc/compiler-rt __cpu_model global, which some clang+lld
-+ // configurations reject when linking into a shared library (the
-+ // symbol is treated as preemptible: "relocation R_X86_64_PC32 cannot
-+ // be used against symbol '__cpu_model'"). Check CPUID directly instead.
-+ unsigned int eax, ebx, ecx, edx;
-+ if (__get_cpuid_max(0, nullptr) < 7)
-+ {
-+ return false;
-+ }
-+ __cpuid_count(7, 0, eax, ebx, ecx, edx);
-+ return (ebx & bit_AVX2) != 0;
- #else
- #error "What platform is this?"
- #endif
diff --git a/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch b/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch
deleted file mode 100644
index 756b68a898..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From cda383625f5d1fd06657fb998b7d1370a7fabd8f Mon Sep 17 00:00:00 2001
-Message-ID: <cda383625f5d1fd06657fb998b7d1370a7fabd8f.1791114851.git.marcel@ziswiler.com>
-From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
-Date: Wed, 30 Sep 2026 14:10:14 +0800
-Subject: [PATCH] gallivm: adapt for JITLink in LLVM 23
-
-In LLVM 23, the ObjectLinkingLayerCreator callback now takes an
-additional memory manager argument.
-
-Adapt for this API change.
-
-This argument eliminates the need to create a InProcessMemoryManager
-by ourselves so a dedicated implementation is added.
-
-Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16325
-Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16325]
----
- src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-index 09d56e543ee..bc9d7837ecd 100644
---- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-@@ -346,6 +346,13 @@ LPJit::LPJit() :jit_dylib_count(0) {
- .setJITTargetMachineBuilder(std::move(JTMB))
- #ifdef USE_JITLINK
- .setObjectLinkingLayerCreator(
-+#if LLVM_VERSION_MAJOR >= 23
-+ /* LLVM 23 added a JITLinkMemoryManager argument, use it as our
-+ * JITLinkMemoryManager. */
-+ [&](ExecutionSession &ES, llvm::jitlink::JITLinkMemoryManager &MM) {
-+ return std::make_unique<ObjectLinkingLayer>(ES, MM);
-+ })
-+#else
- #if LLVM_VERSION_MAJOR >= 21
- /* LLVM 21 removed the Triple argument */
- [&](ExecutionSession &ES) {
-@@ -355,6 +362,7 @@ LPJit::LPJit() :jit_dylib_count(0) {
- return std::make_unique<ObjectLinkingLayer>(
- ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
- })
-+#endif
- #else
- #if LLVM_USE_INTEL_JITEVENTS
- .RegisterJITEventListener(
---
-2.52.0
-
diff --git a/meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch b/meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch
deleted file mode 100644
index b923c4c1fb..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From ccfa5a6555f6eb035ace12cba1ce3e785a47895f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Sun, 14 Jun 2026 17:42:19 +0200
-Subject: [PATCH] src/intel/compiler/jay/jay_ir.h: do not used typed enum
-
-This is a C23 feature and not supported by gcc < 13, which
-many host distros still have (e.g. Debian 12).
-
-Upstream-Status: Inappropriate [yocto host distro requirements]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- src/intel/compiler/jay/jay_ir.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/intel/compiler/jay/jay_ir.h b/src/intel/compiler/jay/jay_ir.h
-index 3b819cb..34b8877 100644
---- a/src/intel/compiler/jay/jay_ir.h
-+++ b/src/intel/compiler/jay/jay_ir.h
-@@ -518,7 +518,7 @@ jay_type_is_any_float(enum jay_type t)
- return jay_base_type(t) == JAY_TYPE_F || jay_base_type(t) == JAY_TYPE_BF;
- }
-
--enum jay_predication : uint8_t {
-+enum jay_predication {
- /** No predication. */
- JAY_NOT_PREDICATED = 0,
-
-@@ -592,7 +592,7 @@ typedef struct jay_inst {
- bool decrement_dep:1;
- uint8_t padding :1;
-
-- enum jay_predication predication;
-+ uint8_t predication;
- gen_condition conditional_mod;
-
- jay_def cond_flag; /**< conditional flag */
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 6ef725c9a7..a938114e1a 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,15 +17,12 @@ PE = "2"
SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
- file://0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch \
file://0001-src-util-u_math.c-do-not-use-arm-fpu-instructions-if.patch \
- file://0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch \
- file://0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch \
file://0001-meson-check-TLSDESC-support-with-a-shared-library.patch \
"
-SRC_URI[sha256sum] = "bce5f7fbebb934373b86c999a064d52fb5065878dc57f287f95346648ec832e9"
-PV = "26.2.4"
+SRC_URI[sha256sum] = "4e4e438eac7b840a9383988cbb7c08dad8041da544b9319fc26d319fa7348961"
+PV = "26.3.1"
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
@@ -164,7 +161,10 @@ VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost libclc', ',pa
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_SWRAST}', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'virtio', '${VULKAN_DRIVERS_VIRTIO}', '', d)}"
-PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers libdrm"
+VULKAN_DEPS = "glslang-native vulkan-loader vulkan-headers libdrm"
+VULKAN_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virtio', ' venus-protocol', '', d)}"
+
+PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',${VULKAN_DEPS}"
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
# mesa development and testing tools support, per driver
--
2.56.1
next prev parent reply other threads:[~2026-11-27 15:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:46 [PATCH 0/2] mesa: upgrade 26.2.4 -> 26.3.1 Daniel Drake
2026-11-27 15:46 ` [PATCH 1/2] venus-protocol: add recipe Daniel Drake
2026-11-27 15:46 ` Daniel Drake [this message]
2026-12-01 7:41 ` [PATCH 0/2] mesa: upgrade 26.2.4 -> 26.3.1 Ravikanti, Venkatasainath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127154652.253316-3-ddrake@baylibre.com \
--to=ddrake@baylibre.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=venkatasainath.ravikanti@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.