mesa: enable iris, radeonsi gallium drivers and Vulkan (intel, amd, swrast)

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).
This commit is contained in:
2026-07-25 06:26:38 +09:00
parent bba923e075
commit 08f3e71d41
+2 -2
View File
@@ -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)