git: f57f55339271 - main - graphics/mesa-{dri,libs}: Enable virgl and consequently gallium-va unconditionally
Date: Wed, 01 Jul 2026 15:10:25 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f57f5533927184a5913d160c3d7606b13d83b47b
commit f57f5533927184a5913d160c3d7606b13d83b47b
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-07-01 15:09:26 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-07-01 15:10:17 +0000
graphics/mesa-{dri,libs}: Enable virgl and consequently gallium-va unconditionally
PR: 296405
Tested by: fuz
---
graphics/mesa-dri/Makefile | 6 +-----
graphics/mesa-dri/pkg-plist | 2 ++
graphics/mesa-libs/Makefile | 6 ++++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index 0a609a5af596..a0e1c4d33261 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -13,7 +13,7 @@ LIB_DEPENDS+= libgallium-${MESAVERSION}.so:graphics/mesa-libs \
USES+= llvm:lib,noexport
-GALLIUM_DRIVERS= zink
+GALLIUM_DRIVERS= virgl zink
OPTIONS_DEFINE= ZSTD
OPTIONS_GROUP= GALLIUM PLATFORM VULKAN
@@ -108,10 +108,6 @@ MESON_ARGS+= -Dandroid-libbacktrace=disabled \
-Dmicrosoft-clc=disabled \
-Dvalgrind=disabled
-.if !${PORT_OPTIONS:Mr600} && !${PORT_OPTIONS:Mradeonsi}
-MESON_ARGS+= -Dgallium-va=disabled
-.endif
-
.if ${ARCH} != amd64
MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629
.endif
diff --git a/graphics/mesa-dri/pkg-plist b/graphics/mesa-dri/pkg-plist
index 12b1d77c49ea..564f1d9c8e07 100644
--- a/graphics/mesa-dri/pkg-plist
+++ b/graphics/mesa-dri/pkg-plist
@@ -45,6 +45,8 @@
%%X11%%lib/dri/sun4i-drm_dri.so
%%X11%%%%llvmpipe%%lib/dri/swrast_dri.so
%%X11%%lib/dri/udl_dri.so
+%%X11%%lib/dri/virtio_gpu_dri.so
+lib/dri/virtio_gpu_drv_video.so
%%X11%%lib/dri/vkms_dri.so
%%X11%%%%svga%%lib/dri/vmwgfx_dri.so
%%X11%%lib/dri/zink_dri.so
diff --git a/graphics/mesa-libs/Makefile b/graphics/mesa-libs/Makefile
index 5ccbf75018ce..663cdcb3cf3a 100644
--- a/graphics/mesa-libs/Makefile
+++ b/graphics/mesa-libs/Makefile
@@ -47,12 +47,14 @@ LDFLAGS_i386= -Wl,-znotext
# a real gallium driver set so install_megadrivers actually ships the lib;
# the per-driver lib/dri/*_dri.so shims that fall out of this build are
# stripped in post-install (they belong to graphics/mesa-dri).
-GALLIUM_DRIVERS= crocus i915 iris llvmpipe panfrost r300 r600 radeonsi svga zink
+GALLIUM_DRIVERS= crocus i915 iris llvmpipe panfrost r300 r600 radeonsi \
+ svga virgl zink
.if ${ARCH} != amd64 && ${ARCH} != i386 && ${ARCH} != x86_64
GALLIUM_DRIVERS:= ${GALLIUM_DRIVERS:Ncrocus:Ni915:Niris:Nsvga}
.endif
.if ${ARCH} == armv7
-GALLIUM_DRIVERS= llvmpipe
+# These require llvm to be compiled with the amdgpu backend, which is not default on armv7
+GALLIUM_DRIVERS:= ${GALLIUM_DRIVERS:Nr600:Nradeonsi}
.endif
MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,}