From c0a27baf73d6e9c7b2b2f415bfcf656b2db1834a Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Thu, 3 Dec 2026 04:12:52 +0800 Subject: [PATCH] mesa: Build asahi's Vulkan driver (Honeykrisp) for the A12 GPU badapple runs Vulkan on the A12's G11 through Honeykrisp (vkcube under weston on the iPhone XS Max); OrchardLinux/mesa carries that support. Build asahi next to imagination in the Vulkan build and install libvulkan_asahi.so with its ICD manifest, rewritten to the installed path as the PowerVR one is. Assisted-by: LLM Signed-off-by: Henrik Klee --- packages/mesa/arch/PKGBUILD | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/mesa/arch/PKGBUILD b/packages/mesa/arch/PKGBUILD index 410d25d..d3bbb93 100644 --- a/packages/mesa/arch/PKGBUILD +++ b/packages/mesa/arch/PKGBUILD @@ -30,8 +30,8 @@ epoch=1 # Mesa's version, the commit's number on the fork's main branch (so that a # newer commit is a newer package), and the commit. pkgver=27.0.0.4 -pkgrel=2 -pkgdesc="Mesa from the OrchardLinux fork: OpenGL through Zink or in software, the asahi driver for the Apple A12 GPU, the Vulkan driver for the Apple PowerVR GPUs, and the desktop's GPU probe" +pkgrel=3 +pkgdesc="Mesa from the OrchardLinux fork: OpenGL through Zink or in software, the asahi drivers (OpenGL and Vulkan) for the Apple A12 GPU, the Vulkan driver for the Apple PowerVR GPUs, and the desktop's GPU probe" url="https://github.com/OrchardLinux/mesa" license=('MIT') arch=('aarch64') @@ -58,9 +58,10 @@ build() { # package leaves out. local common=(--prefix=/usr --wrap-mode=nodownload -Db_lto=false -Dllvm=enabled -Dgles1=disabled -Dvideo-codecs= -Dtools= -Dvulkan-layers= -Dbuild-tests=false) - # The Vulkan driver, with the options it has been tested with on the tablets. + # The Vulkan drivers, with the options they have been tested with on the + # devices: imagination (the PowerVR GPUs) and asahi (Honeykrisp, the A12's G11). meson setup "mesa-${_commit}" build-vulkan "${common[@]}" --buildtype=debugoptimized \ - -Dplatforms=x11,wayland -Dvulkan-drivers=imagination -Dgallium-drivers= \ + -Dplatforms=x11,wayland -Dvulkan-drivers=imagination,asahi -Dgallium-drivers= \ -Dopengl=false -Degl=disabled -Dgbm=disabled -Dglx=disabled -Dgles2=disabled ninja -C build-vulkan # OpenGL. X11 and GLX are for applications under Xwayland, as in Arch's mesa. @@ -99,6 +100,11 @@ package() { build-vulkan/src/imagination/vulkan/powervr_mesa_icd.*.json > powervr_mesa_icd.json grep -q '"library_path": "/usr/lib/libvulkan_powervr_mesa.so"' powervr_mesa_icd.json install -Dm 644 powervr_mesa_icd.json "${pkgdir}/usr/share/vulkan/icd.d/powervr_mesa_icd.json" + install -Dm 755 build-vulkan/src/asahi/vulkan/libvulkan_asahi.so "${pkgdir}/usr/lib/libvulkan_asahi.so" + sed 's#"library_path": "[^"]*"#"library_path": "/usr/lib/libvulkan_asahi.so"#' \ + build-vulkan/src/asahi/vulkan/asahi_icd.*.json > asahi_icd.json + grep -q '"library_path": "/usr/lib/libvulkan_asahi.so"' asahi_icd.json + install -Dm 644 asahi_icd.json "${pkgdir}/usr/share/vulkan/icd.d/asahi_icd.json" install -Dm 755 gpu-probe "${pkgdir}/usr/lib/orchard/gpu-probe" # Where omarchy-a's login session looks for it. install -d "${pkgdir}/usr/lib/omarchy-a"