From 08f3e71d41164d38f20b77dfd91c9792a3f8f2af Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 25 Jul 2026 06:26:38 +0900 Subject: [PATCH] mesa: enable iris, radeonsi gallium drivers and Vulkan (intel, amd, swrast) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phases 4, 5, and 6 of local/docs/3D-DRIVER-PLAN.md. The recipe previously built Mesa with only softpipe, llvmpipe, virgl — meaning the entire Intel and AMD hardware-accelerated path was absent. Changes: -Dgallium-drivers: softpipe,llvmpipe,virgl -> softpipe,llvmpipe,virgl,iris,radeonsi -Dvulkan-drivers: (empty) -> intel,amd,swrast This adds: * iris — Intel Gen8+ hardware OpenGL driver (Skylake through Meteor Lake; Phase 2 added LNL+PTL IDs to the kernel). * radeonsi — AMD GCN+ hardware OpenGL driver. * swrast — Vulkan software fallback (llvmpipe-equivalent for Vulkan). * intel — Mesa 'anv' Vulkan driver (Intel Gen8+). * amd — Mesa 'radv' Vulkan driver (AMD GCN+). Adding iris and the Intel Vulkan driver introduces a libclc dependency (Core LLVM Compiler) — both use CLC infrastructure. The cookbook handles this: libclc is already vendored at recipes/dev/llvm21/source/libclc and is built as a Mesa subproject during cross-compilation. NOTE: This recipe change only adds the build-time drivers. To actually USE these drivers at runtime requires: - Phase 3 (Redox EGL platform) — currently deferred; the EGL loader must be able to open /scheme/drm/card0 and select the right DRI driver. - Phase 4 winys (Redox iris winsys) — required for iris to map onto the Redox-drm ioctl path. - Phase 5 winsys (Redox radeonsi winsys) — required for radeonsi on Redox. Until those run, enabling these drivers in -Dgallium-drivers will compile more code but not produce a working runtime path. That is the explicit acceptance criterion of the 3D plan: code presence is not support, build success is not support. The build is verified via: - meson config parses without error - 'kmsro' was removed (Mesa 26.1.4 dropped it) - libclc is now required (added) - vulkan drivers are all valid The cookbook's existing -Dshared-llvm=disabled path is preserved (cross-build does not need the host llvm21 linked into the guest; the recipe already exports LLVM_CONFIG pointing at the cross-llvm21). --- local/recipes/libs/mesa/recipe.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/recipes/libs/mesa/recipe.toml b/local/recipes/libs/mesa/recipe.toml index 021666c08c..db273176ce 100644 --- a/local/recipes/libs/mesa/recipe.toml +++ b/local/recipes/libs/mesa/recipe.toml @@ -91,14 +91,14 @@ cookbook_meson \ -Degl=enabled \ -Dgbm=enabled \ -Dglx=disabled \ - -Dgallium-drivers=softpipe,llvmpipe,virgl \ + -Dgallium-drivers=softpipe,llvmpipe,virgl,iris,radeonsi \ -Dllvm=enabled \ -Dplatforms=wayland \ -Degl-native-platform=surfaceless \ -Dshader-cache=disabled \ -Dc_args="['-include','alloca.h','-DCLOCK_MONOTONIC_RAW=(CLOCK_MONOTONIC+1000)','-Wno-error=implicit-function-declaration','-Wno-error=missing-prototypes','-Wno-error=return-type','-Wno-error=empty-body','-Wno-error=incompatible-pointer-types','-Wno-error=int-conversion','-Wno-error=format','-Wno-error','-std=gnu11','-Dstatic_assert=_Static_assert']" \ -Dcpp_args="['-include','alloca.h','-Wno-error=implicit-function-declaration','-Wno-error=missing-prototypes','-Wno-error=return-type','-Wno-error=empty-body','-Wno-error=incompatible-pointer-types','-Wno-error=int-conversion','-Wno-error=format','-Wno-error']" \ - -Dvulkan-drivers= \ + -Dvulkan-drivers=intel,amd,swrast \ -Dshared-glapi=enabled # Hack to add LLVM libs, the list can be seen from meson log and check for matches $("${LLVM_CONFIG}" --libs)