llvm-mesa, mesa: LLVM 22.1.5 / Mesa 26.0.6 + virtio + teflon (rocket, etnaviv)#114
Open
dangowrt wants to merge 2 commits into
Open
llvm-mesa, mesa: LLVM 22.1.5 / Mesa 26.0.6 + virtio + teflon (rocket, etnaviv)#114dangowrt wants to merge 2 commits into
dangowrt wants to merge 2 commits into
Conversation
246d851 to
5276a0d
Compare
dc852ba to
63f1ff5
Compare
Bump the Mesa-internal LLVM (kept in feeds/video/libs/llvm/) from
21.1.3 to 22.1.5, and the matching SPIRV-LLVM-Translator from
21.1.1 to 22.1.2.
The SPIRV-LLVM-Translator's major version tracks LLVM's major,
so it caps which LLVM major we can move to. Khronos has now
shipped v22.1.2 (latest in the 22.x series), allowing the LLVM
major bump.
Mesa 26.0.6 sets only a minimum LLVM (>= 18 / 15 / 8 depending
on the requested driver set); no upper bound, so LLVM 22.x is
acceptable.
Two LLVM 22 build-system changes need adapting in the Makefile:
1. LIBCLC_TARGETS_TO_BUILD got stricter target name validation:
'amdgcn--amdhsa' is rejected in favour of 'amdgcn-amd-amdhsa',
and the 32-bit nvptx ('nvptx--', 'nvptx--nvidiacl') targets
were dropped (the 64-bit equivalents remain).
2. libclc bytecode now installs under
'usr/lib/clang/<major>/lib/libclc/' rather than the previous
'usr/share/clc/'. Adjust the SPIR-V .spv copy in Build/Install
to source from the new location (a glob on the major version
avoids re-touching this on the next bump).
The downstream 100-allow-arc-target.patch still applies unchanged.
Link: https://github.com/llvm/llvm-project/releases/tag/llvmorg-22.1.5
Link: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/tag/v22.1.2
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Bump mesa from 25.2.4 to latest stable point release in the 26.0.x series. Drop 001-gallivm-support-LLVM-21.patch which has been merged upstream. Refresh the remaining downstream patches (100-meson-allow-using-LLVM-as-embedded-project, 200-panfrost-Enable-cross-compilation-of-precompilers-on) for the new upstream context. Add +libdisplay-info to the DEPENDS of every libvulkan-* package (broadcom, imagination, intel, intel-hasvk, lvp, panfrost, radeon, virtio): Mesa 26.0 unconditionally pulls libdisplay-info into the WSI Vulkan path on Linux (gated only by host_machine.system() == 'windows'), so every ICD now NEEDED-links libdisplay-info.so.3 and OpenWrt's shlibs check rejects packages without the explicit dependency. libvulkan-nouveau is @broken (needs Rust) so it does not get touched. The 'imagination-experimental' vulkan-drivers value got renamed to plain 'imagination' in Mesa 26; update the VULKAN_DRIVERS entry accordingly. Add 'imagination' to the host build's -Dtools= list so the PowerVR pco_clc precompiler is built and installed into $(STAGING_DIR_HOSTPKG)/bin/ during the host-build stage. The target vulkan variant uses -Dprecomp-compiler=system and looks the binary up there via find_program('pco_clc', native:true); without this, the target configure stage fails with "Program 'pco_clc' not found or not executable" as soon as the imagination vulkan driver enters the gallium tree. New packages: * libvulkan-virtio: the venus virtio-gpu Vulkan ICD, useful for VM/container guests forwarding Vulkan to a host GPU. Mirrors the libvulkan-lvp install pattern. Wired via VULKAN_DRIVERS+=virtio. * libteflon-rocket and libteflon-etnaviv: two flavours of mesa's "teflon" TensorFlow Lite delegate. teflon links one or more NPU back-ends from gallium into a libteflon.so that TFLite loads as an external delegate. The two variants here cover the NPU silicon found on OpenWrt-supported hardware: - rocket: Rockchip RKNPU on RK3566 / RK3568 / RK3588(s) (rockchip/armv8 target). - etnaviv: VeriSilicon VIP9000-class NPU on NXP i.MX 8M Plus and i.MX 95 (imx/cortexa53 target). The Arm Ethos-U back-end is omitted; it targets Cortex-M55 MCUs which OpenWrt does not run on. Each variant is its own VARIANT= mesa build with -Dgallium-drivers=<rocket|etnaviv> -Dteflon=true; both produce /usr/lib/libteflon.so so the two packages declare each other as CONFLICTS (typical OpenWrt mesa-variant pattern). A small downstream patch (300-teflon-conditional-npu-drivers.patch) adjusts src/gallium/targets/teflon/meson.build so that the driver_etnaviv / driver_rocket / driver_ethosu link_with entries are conditional on with_gallium_<X> instead of unconditional. Without it, building libteflon with only one back-end fails because the other driver_X meson variables are undefined when the corresponding gallium-driver is not selected. Tested locally on aarch64_cortex-a53 (mediatek/filogic) building the existing softpipe / llvmpipe / vulkan (now with virtio) variants plus the new teflon-rocket and teflon-etnaviv variants in turn; each produces its respective .apk with all NEEDED-links resolved by the declared DEPENDS. Link: https://docs.mesa3d.org/relnotes/26.0.6.html Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintainer: @dangowrt
This PR bundles three related updates: the Mesa-internal LLVM
(
feeds/video/libs/llvm/, often calledllvm-mesa), Mesa itself,and three new sub-packages exposed by the Mesa 26 update.
llvm-mesa: update to 22.1.5 / SPIRV-LLVM-Translator 22.1.2The SPIRV-LLVM-Translator's major version tracks LLVM's major, so it
caps which LLVM major we can move to. Khronos has now shipped v22.1.2
(latest 22.x), allowing the major bump.
Two LLVM 22 build-system adjustments:
LIBCLC_TARGETS_TO_BUILDgot stricter target-name validation —amdgcn--amdhsais rejected in favour ofamdgcn-amd-amdhsa,and the 32-bit
nvptx--/nvptx--nvidiacltargets are gone.usr/lib/clang/<major>/lib/libclc/rather than the previoususr/share/clc/.mesa: update to 26.0.6 (from 25.2.4)001-gallivm-support-LLVM-21.patch(merged upstream in 26.0).+libdisplay-infoto everylibvulkan-*package'sDEPENDS(broadcom, imagination, intel, intel-hasvk, lvp,panfrost, radeon, virtio) — Mesa 26 unconditionally pulls
libdisplay-infointo the WSI Vulkan path on Linux. Every ICDnow NEEDED-links
libdisplay-info.so.3; shlibs check rejectsany package without the explicit dep.
libvulkan-nouveauis@BROKEN(Rust) so it's untouched.imagination-experimentalvulkan-drivers value toplain
imagination(renamed upstream in Mesa 26).New packages —
libvulkan-virtio,libteflon-rocket,libteflon-etnavivlibvulkan-virtio— venusThe virtio-gpu Vulkan ICD, useful for VM / container guests that
forward Vulkan to the host GPU via virtio-gpu. Mirrors
libvulkan-lvp'sinstall pattern; new
VULKAN_DRIVERS+=virtioblock in the Makefile.libteflon-rocket/libteflon-etnaviv— TFLite NPU delegatesMesa's
teflonTFLite delegate links one or more NPU back-ends intoa
libteflon.sothat TensorFlow Lite loads as an external delegate.The two variants here cover the NPU silicon on OpenWrt-supported
hardware:
libteflon-rocketrockchip/armv8libteflon-etnavivimx/cortexa53The Arm Ethos-U back-end is omitted (Cortex-M55 MCU territory, not
OpenWrt's runtime). Each variant is its own VARIANT= mesa build with
-Dgallium-drivers=<rocket|etnaviv> -Dteflon=true. Both install/usr/lib/libteflon.so, so the two packages declare each other asCONFLICTS.A small downstream patch
300-teflon-conditional-npu-drivers.patchmakes thedriver_etnaviv/driver_rocket/driver_ethosulink_withentries in
src/gallium/targets/teflon/meson.buildconditional onwith_gallium_<X>.A note on the embedded
llvm-mesafeeds/video/libs/llvm/is a deliberate exception to the OpenWrt"package each library separately, share via dynamic linking" rule:
Mesa-specific build (no RTTI, narrowed target list, static-only)
incompatible with what a system LLVM would expose; consumed at
link-time only and inlined into
libgallium*.so/libvulkan_*.so.Upstream: