mesa: Upgrade to 26.2.0
PATCH v4 1/3 mesa: Upgrade to 26.2.0
Release notes:
https://lists.freedesktop.org/archives/mesa-dev/2026-August/226690.html
Removed upstream patches:
* 0001-gallivm-Fix-armhf-build-against-LLVM-22.patch
* 0001-src-intel-compiler-jay-fix-GCC-10-case-label-declara.patch
Adapted patches:
* 0001-freedreno-don-t-encode-build-path-into-binaries.patch
* 0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch
--- ...on-t-encode-build-path-into-binaries.patch | 17 +++++--- ...livm-Fix-armhf-build-against-LLVM-22.patch | 27 ------------- ...er-jay-fix-GCC-10-case-label-declara.patch | 39 ------------------- ...er-jay-jay_ir.h-do-not-used-typed-en.patch | 8 ++-- meta/recipes-graphics/mesa/mesa.inc | 6 +-- 5 files changed, 17 insertions(+), 80 deletions(-) delete mode 100644 meta/recipes-graphics/mesa/files/0001-gallivm-Fix-armhf-build-against-LLVM-22.patch delete mode 100644 meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-fix-GCC-10-case-label-declara.patch
meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch +11 -6
@@ -1,4 +1,4 @@ -From 266f7047df67d500223b66f7eb9d8779be4f4ad1 Mon Sep 17 00:00:00 2001 +From 1ae1feb55885c8ec26ed2ef148fa75c6240d9804 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov <[email protected]> Date: Wed, 10 Dec 2025 02:27:16 +0200 Subject: [PATCH] freedreno: don't encode build path into binaries
@@ -25,7 +25,7 @@ Signed-off-by: Quentin Schulz <[email protected]> 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build -index e8f01b8..8144a75 100644 +index e8f01b880bc..8144a75bd1c 100644 --- a/src/freedreno/meson.build +++ b/src/freedreno/meson.build @@ -4,9 +4,10 @@
@@ -42,13 +42,18 @@ index e8f01b8..8144a75 100644 dep_libarchive = dependency('libarchive', allow_fallback: true, required: false, disabler : true) dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false) diff --git a/src/freedreno/registers/meson.build b/src/freedreno/registers/meson.build -index f4be681..cd0caaf 100644 +index 9318ce48fe5..8d2b305d202 100644 --- a/src/freedreno/registers/meson.build +++ b/src/freedreno/registers/meson.build -@@ -43,4 +43,6 @@ if install_fd_decode_tools - endforeach - endif +@@ -16,6 +16,8 @@ freedreno_copyright = files(copyright_file) + + freedreno_xml_header_files = [] +devenv.set('RNN_PATH', meson.current_source_dir()) + subdir('adreno') + + foreach f : xml_adreno_files +-- +2.55.0 +
meta/recipes-graphics/mesa/files/0001-gallivm-Fix-armhf-build-against-LLVM-22.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 8db6e909c3a540d31a73b79a0792e927cc2c6e83 Mon Sep 17 00:00:00 2001 -From: Alessandro Astone <[email protected]> -Date: Sun, 1 Mar 2026 18:14:09 +0100 -Subject: [PATCH] gallivm: Fix armhf build against LLVM 22 - -StringMapIterator<bool> became StringMapIterBase<bool, false /* IsConst */>; -Use `auto` to handle either case. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40161] -Signed-off-by: Jose Quaresma <[email protected]> ---- - src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -index ce8ca02..86779f0 100644 ---- 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::string> &MAttrs) - 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());
meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-fix-GCC-10-case-label-declara.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From e41dee25f266d434e39af66e216a945f0085533b Mon Sep 17 00:00:00 2001 -From: Wang Mingyu <[email protected]> -Date: Tue, 16 Jun 2026 09:12:34 +0000 -Subject: [PATCH] src/intel/compiler/jay: fix GCC 10 case label declaration - error - -GCC 10 (and earlier) does not allow a variable declaration immediately -after a case label, because a label must be followed by a statement. - - error: a label can only be part of a statement and a declaration is not a statement - -Wrap the case block for JAY_OPCODE_DESWIZZLE_ODD in braces to make the -declaration a valid statement inside the block. - -Upstream-Status: Inappropriate [yocto host distro requirements] - -Signed-off-by: Wang Mingyu <[email protected]> ---- - src/intel/compiler/jay/jay_to_binary.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/intel/compiler/jay/jay_to_binary.c b/src/intel/compiler/jay/jay_to_binary.c -index 62b9576..a0a9498 100644 ---- a/src/intel/compiler/jay/jay_to_binary.c -+++ b/src/intel/compiler/jay/jay_to_binary.c -@@ -362,11 +362,12 @@ emit(struct brw_codegen *p, - brw_BFN(p, dst, SRC(0), SRC(1), SRC(2), brw_imm_ud(jay_bfn_ctrl(I))); - break; - -- case JAY_OPCODE_DESWIZZLE_ODD: -+ case JAY_OPCODE_DESWIZZLE_ODD: { - bool hi = simd_offs ? true : jay_deswizzle_odd_src2_hi(I); - brw_MOV(p, dst, - byte_offset(to_brw_reg(f, I, simd_offs, 0, false), hi ? 64 : 0)); - break; -+ } - - case JAY_OPCODE_DESWIZZLE_EVEN: - brw_set_default_exec_size(p, BRW_EXECUTE_16);
meta/recipes-graphics/mesa/files/0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch +4 -4
@@ -16,7 +16,7 @@ diff --git a/src/intel/compiler/jay/jay_ir.h b/src/intel/compiler/jay/jay_ir.h index 8307044..abf175a 100644 --- a/src/intel/compiler/jay/jay_ir.h +++ b/src/intel/compiler/jay/jay_ir.h -@@ -579,7 +579,7 @@ jay_type_is_any_float(enum jay_type t) +@@ -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; }
@@ -25,12 +25,12 @@ index 8307044..abf175a 100644 /** No predication. */ JAY_NOT_PREDICATED = 0, -@@ -634,7 +634,7 @@ typedef struct jay_inst { +@@ -592,7 +592,7 @@ typedef struct jay_inst { bool decrement_dep:1; - unsigned padding :12; + uint8_t padding :1; - enum jay_predication predication; + uint8_t predication; - enum jay_conditional_mod conditional_mod; + gen_condition conditional_mod; jay_def cond_flag; /**< conditional flag */
meta/recipes-graphics/mesa/mesa.inc +2 -4
@@ -17,14 +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-gallivm-Fix-armhf-build-against-LLVM-22.patch \ file://0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch \ - file://0001-src-intel-compiler-jay-fix-GCC-10-case-label-declara.patch \ file://0001-src-util-u_math.c-do-not-use-arm-fpu-instructions-if.patch \ " -SRC_URI[sha256sum] = "5296b88a0f1e012e2cb9ada150a2bbadf728ca81e5a4fb2ab43c83a4d2158606" -PV = "26.1.6" +SRC_URI[sha256sum] = "efd4bb08cdb7c365a812cd4e6c9202ab55b2f22cdcd13c7d6c4f9647b799a4ef" +PV = "26.2.0" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.55.0
PATCH v4 2/3 mesa-libclc: New recipe for forking libclc for Rusticl purposes in Mesa
See the reasoning and discussion at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020
which was merged and backported to 26.2.0.
TL;DR: LLVM constantly introduces breaking changes that cause regressions for running OpenCL CTS with Rusticl and finally Karol Herbst had enough.
This fork is from the LLVM 22 version of libclc and contains the necessary fixes to make Rusticl pass OpenCL CTS.
--- meta/conf/distro/include/maintainers.inc | 1 + .../mesa/mesa-libclc_22.1.8.3.bb | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -524,6 +524,7 @@ RECIPE_MAINTAINER:pn-menu-cache = "Ross Burton <[email protected]>" RECIPE_MAINTAINER:pn-mesa = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-demos = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-gl = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-mesa-libclc = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-mesa-tools-native = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-meson = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-meta-environment-${MACHINE} = "Richard Purdie <[email protected]>"
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb new file +26 -0
@@ -0,0 +1,26 @@ +SUMMARY = "Mesa fork of libclc: Implementation of the library requirements of the OpenCL C programming language." +HOMEPAGE = "https://gitlab.freedesktop.org/karolherbst/mesa-libclc/" +SECTION = "devel" +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" + +SRC_URI = "git://gitlab.freedesktop.org/karolherbst/mesa-libclc.git;protocol=https;branch=llvm_22" + +SRCREV = "87f66007242ff10e9e84bf32be84f9057f6abc75" + +inherit cmake pkgconfig + +# Depend explicitly on clang-native instead of using TOOLCHAIN as the build +# objects from this recipe are build explicitly using clang for GPU targets. +# We could INHIBIT_DEFAULT_DEPS to avoid any other toolchain but then we need +# to wrestle CMake to configure without a toolchain. +DEPENDS += "clang-native spirv-llvm-translator-native" + +# Semicolon-separated list of targets to build +LIBCLC_TARGETS ?= "all" + +EXTRA_OECMAKE += "-DLIBCLC_TARGETS_TO_BUILD='${LIBCLC_TARGETS}'" + +FILES:${PN} += "${datadir}/mesa-clc" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.55.0
Re: [OE-core] [PATCH v4 2/3] mesa-libclc: New recipe for forking libclc for Rusticl purposes in Mesa
Hi Zoltan,
I’ve skimmed the discussion on the MR that created this and am wondering if this series should also include “libclc: remove”. Nothing else in the layer index uses libclc but mesa, and we don’t want recipes in core that never get built.
Ross
Quoted 76 lines · Zoltan Boszormenyi via lists.openembedded.org
See the reasoning and discussion at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020
which was merged and backported to 26.2.0.TL;DR: LLVM constantly introduces breaking changes that cause regressions for running OpenCL CTS with Rusticl and finally Karol Herbst had enough.
This fork is from the LLVM 22 version of libclc and contains the necessary fixes to make Rusticl pass OpenCL CTS.
Signed-off-by Zoltán Böszörményi <[email protected]>---
meta/conf/distro/include/maintainers.inc | 1 +
.../mesa/mesa-libclc_22.1.8.3.bb | 26 +++++++++++++++++++2 files changed, 27 insertions(+)create mode 100644 meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb
meta/conf/distro/include/maintainers.inc +0
-0@@ -524,6 +524,7 @@ RECIPE_MAINTAINER:pn-menu-cache = "Ross Burton <[email protected]>"RECIPE_MAINTAINER:pn-mesa = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-demos = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-gl = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-mesa-libclc = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-mesa-tools-native = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-meson = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-meta-environment-${MACHINE} = "Richard Purdie <[email protected]>"
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb new file +26
-0@@ -0,0 +1,26 @@ +SUMMARY = "Mesa fork of libclc: Implementation of the library requirements of the OpenCL C programming language." +HOMEPAGE = "https://gitlab.freedesktop.org/karolherbst/mesa-libclc/" +SECTION = "devel" +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" + +SRC_URI = "git://gitlab.freedesktop.org/karolherbst/mesa-libclc.git;protocol=https;branch=llvm_22" + +SRCREV = "87f66007242ff10e9e84bf32be84f9057f6abc75" + +inherit cmake pkgconfig + +# Depend explicitly on clang-native instead of using TOOLCHAIN as the build +# objects from this recipe are build explicitly using clang for GPU targets. +# We could INHIBIT_DEFAULT_DEPS to avoid any other toolchain but then we need +# to wrestle CMake to configure without a toolchain. +DEPENDS += "clang-native spirv-llvm-translator-native" + +# Semicolon-separated list of targets to build +LIBCLC_TARGETS ?= "all" + +EXTRA_OECMAKE += "-DLIBCLC_TARGETS_TO_BUILD='${LIBCLC_TARGETS}'" + +FILES:${PN} += "${datadir}/mesa-clc" + +BBCLASSEXTEND = "native nativesdk"Signature · 10 lines
2.55.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#242982): https://lists.openembedded.org/g/openembedded-core/message/242982 Mute This Topic: https://lists.openembedded.org/mt/120638651/6875888 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Re: [PATCH v4 2/3] mesa-libclc: New recipe for forking libclc for Rusticl purposes in Mesa
In reply to Zoltán BöszörményiHi Zoltán,
Quoted 36 lines · Zoltán Böszörményi
See the reasoning and discussion at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020
which was merged and backported to 26.2.0.TL;DR: LLVM constantly introduces breaking changes that cause regressions for running OpenCL CTS with Rusticl and finally Karol Herbst had enough.
This fork is from the LLVM 22 version of libclc and contains the necessary fixes to make Rusticl pass OpenCL CTS.
Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/conf/distro/include/maintainers.inc | 1 + .../mesa/mesa-libclc_22.1.8.3.bb | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+)create mode 100644 meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb
meta/conf/distro/include/maintainers.inc +1
-0@@ -524,6 +524,7 @@ RECIPE_MAINTAINER:pn-menu-cache = "Ross Burton <[email protected]>" RECIPE_MAINTAINER:pn-mesa = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-demos = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-mesa-gl = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-mesa-libclc = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-mesa-tools-native = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-meson = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-meta-environment-${MACHINE} = "Richard Purdie <[email protected]>"meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb new file +0
-0
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb line 2
Quoted 2 lines
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb new file +2
-0@@ -0,0 +1,26 @@ +SUMMARY = "Mesa fork of libclc: Implementation of the library requirements of the OpenCL C programming language." +HOMEPAGE = "https://gitlab.freedesktop.org/karolherbst/mesa-libclc/"
Sorry for the mangled link. Sad that they still keep this in Karol's namespace. It however matches what they use in their CI (via the GitLab Project ID), see .gitlab-ci/container/build-libclc.sh.
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb line 9
Quoted 7 lines
meta/recipes-graphics/mesa/mesa-libclc_22.1.8.3.bb new file +7
-0+SECTION = "devel" +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" + +SRC_URI = "git://gitlab.freedesktop.org/karolherbst/mesa-libclc.git;protocol=https;branch=llvm_22" + +SRCREV = "87f66007242ff10e9e84bf32be84f9057f6abc75"
How do we make sure we use the mesa-libclc blessed by mesa for a given release?
It seems like we should use the tag as specified in MESA_LIBCLC_VERSION=22.1.8.3 in .gitlab-ci/container/build-libclc.sh. Can you add a comment in mesa-libclc and mesa.inc that mesa-libclc should only be bumped with mesa.inc, and that a bump in mesa.inc should REEEEEEALLLLLLY check we use the expected mesa-libclc version (put it next to SRCREV so it appears in the git context when someone sends a patch).
I've only barely looked at the changes made between 26.1.0 and 26.2.0 but we should be able to drastically relax the libclc requirement for anything but opencl (rusticl). c.f. 20b40644b7ae ("clc: make libclc optional for configs not needing it")
Someone will need to start looking into what they're doing with panfrost, c.f. the new panfrost-rust option. There's a bunch of additional dependencies in src/panfrost/compiler/kraid/meson.build we'll need. Oh well, something for later (but probably very soon, like next release).
Cheers,
Quentin
PATCH v4 3/3 mesa, mesa-tools-native: Use mesa-libclc
In reply to Zoltán BöszörményiAccording to the release notes at
https://lists.freedesktop.org/archives/mesa-dev/2026-August/226690.html
| One important note for packagers is that there is now a Mesa community | maintained libclc fork that is verified to pass the OpenCL CTS with | Mesa/Rusticl, and will fix bugs after an upstream libclc major release | branch goes EoL. The Mesa build system will pick it up when available, | and fall back to upstream libclc if not. This libclc fork is not | verified for any other usages or users of libclc outside of Mesa.
Rusticl would complain if about not this libclc fork is used due to OpenCL CTS compliance.
--- meta/recipes-graphics/mesa/mesa-tools-native.bb | 2 +- meta/recipes-graphics/mesa/mesa.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa-tools-native.bb +1 -1
@@ -11,7 +11,7 @@ PACKAGECONFIG += "gallium-llvm" # to PACKAGECONFIG like in mesa.inc PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}" -DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native" +DEPENDS += "mesa-libclc-native spirv-tools-native spirv-llvm-translator-native" EXTRA_OEMESON += " \ -Dmesa-clc=enabled -Dinstall-mesa-clc=true -Dmesa-clc-bundle-headers=enabled \
meta/recipes-graphics/mesa/mesa.inc +2 -2
@@ -108,7 +108,7 @@ PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" # "opencl" also requires libclc and gallium-llvm to be present in PACKAGECONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang libclc spirv-tools spirv-llvm-translator" +PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang mesa-libclc spirv-tools spirv-llvm-translator" X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence" # "x11" requires "opengl"
@@ -252,7 +252,7 @@ RPROVIDES:libopencl-mesa += "virtual-opencl-icd" RPROVIDES:libgles2-mesa += "libgles3-mesa" RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev" -RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc', '', d)}" +RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-libclc', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libgallium \
Signature · 1 line
2.55.0