feat: Mesa virgl gallium driver — hardware-accelerated 3D for QEMU

Mesa now builds with -Dgallium-drivers=swrast,virgl for Redox target.

Fixes:
- virgl_screen.c: wrapped disk cache creation in #ifndef __redox__
  (build_id_find_nhdr_for_addr uses dl_iterate_phdr — unavailable on Redox)
- bits/safamily-t.h: provided to cross-compiler toolchain sysroot

Durable patch:
- local/patches/mesa/P4-virgl-redox-disk-cache.patch (25 lines)

This enables hardware-accelerated 3D rendering in QEMU via
virtio-gpu + virgl. Mesa EGL/GLES2/GBM now support the virgl
gallium driver alongside llvmpipe software renderer.

63MB pkgar artifact with virgl support.
This commit is contained in:
2026-05-01 00:21:28 +01:00
parent 1c3ed9ec0d
commit 2638186ce1
2 changed files with 27 additions and 1 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ git = "https://gitlab.redox-os.org/redox-os/mesa.git"
upstream = "https://gitlab.freedesktop.org/mesa/mesa"
branch = "redox-24.0"
shallow_clone = true
patches = ["../../../local/patches/mesa/P4-virgl-redox-disk-cache.patch"]
[build]
template = "custom"
dependencies = [
@@ -41,7 +42,7 @@ cookbook_meson \
-Degl=enabled \
-Dgbm=enabled \
-Dglx=disabled \
-Dgallium-drivers=swrast \
-Dgallium-drivers=swrast,virgl \
-Dllvm=enabled \
-Dosmesa=true \
-Dplatforms=redox \