From: Joseph Kogut <joseph.kogut@gmail.com>
To: buildroot@buildroot.org
Cc: Adrian Perez de Castro <aperez@igalia.com>,
Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Romain Naour <romain.naour@gmail.com>,
Joseph Kogut <joseph.kogut@gmail.com>
Subject: [Buildroot] [PATCH v4 2/5] package/virglrenderer: new package
Date: Tue, 17 Mar 2026 15:16:23 -0700 [thread overview]
Message-ID: <20260317-virglrenderer-v4-2-ed223e222bb6@gmail.com> (raw)
In-Reply-To: <20260317-virglrenderer-v4-0-ed223e222bb6@gmail.com>
Add virglrenderer, an optional dependency of QEMU, which facilitates
acceleration of rendering and optionally video decode through
virtio-gpu.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/virglrenderer/Config.in | 101 +++++++++++++++++++++++++++++++
package/virglrenderer/virglrenderer.hash | 5 ++
package/virglrenderer/virglrenderer.mk | 60 ++++++++++++++++++
5 files changed, 168 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 88a684d9ac..a34cf57923 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1766,6 +1766,7 @@ F: package/python-xlib/
F: package/sentry-cli/
F: package/sentry-native/
F: package/unclutter-xfixes/
+F: package/virglrenderer/
N: Joshua Henderson <joshua.henderson@microchip.com>
F: package/qt5/qt5wayland/
diff --git a/package/Config.in b/package/Config.in
index 371a1c33e1..da54fc2704 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -366,6 +366,7 @@ comment "Graphic libraries"
source "package/sdl2_ttf/Config.in"
source "package/spirv-headers/Config.in"
source "package/tk/Config.in"
+ source "package/virglrenderer/Config.in"
source "package/vulkan-headers/Config.in"
source "package/vulkan-loader/Config.in"
source "package/vulkan-sdk/Config.in"
diff --git a/package/virglrenderer/Config.in b/package/virglrenderer/Config.in
new file mode 100644
index 0000000000..fdf785288b
--- /dev/null
+++ b/package/virglrenderer/Config.in
@@ -0,0 +1,101 @@
+config BR2_PACKAGE_VIRGLRENDERER
+ bool "virglrenderer"
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_USE_MMU # fork()
+ select BR2_PACKAGE_LIBEPOXY
+ help
+ A library for accelerated graphics and compute in
+ virtualized guests.
+
+ https://qemu.readthedocs.io/en/v10.0.3/system/devices/virtio-gpu.html#virtio-gpu-virglrenderer
+
+if BR2_PACKAGE_VIRGLRENDERER
+config BR2_PACKAGE_VIRGLRENDERER_VIRGL
+ bool "virgl"
+ default y
+ depends on (BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGBM) \
+ || BR2_PACKAGE_HAS_LIBGL
+ help
+ Enable API-level OpenGL acceleration over virtio-gpu.
+
+ Say 'y' if you want to run applications with OpenGL
+ acceleration in virtualized guests. Requires host
+ support for OpenGL.
+
+ https://docs.mesa3d.org/drivers/virgl.html
+
+comment "virgl needs OpenGL or OpenGL EGL and libgbm"
+ depends on !((BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGBM) \
+ || BR2_PACKAGE_HAS_LIBGL) \
+
+config BR2_PACKAGE_VIRGLRENDERER_VENUS
+ bool "venus"
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER
+ depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader
+ depends on !BR2_STATIC_LIBS # vulkan-loader
+ depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
+ select BR2_PACKAGE_VULKAN_HEADERS
+ select BR2_PACKAGE_VULKAN_LOADER
+ help
+ Enable API-level Vulkan acceleration over virtio-gpu.
+
+ Say 'y' if you want to run applications with Vulkan
+ acceleration in virtualized guests. Requires host
+ support for Vulkan.
+
+ https://docs.mesa3d.org/drivers/venus.html
+
+config BR2_PACKAGE_VIRGLRENDERER_VAAPI
+ bool "vaapi support"
+ depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBVA
+ help
+ Enable hardware accelerated video encode/decode through
+ libva over virtio-gpu.
+
+comment "DRM backends"
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_AMDGPU
+ bool "amdgpu"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_AMD
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBDRM_AMDGPU
+ help
+ Enable DRM backend for amdgpu, used by Gallium radeonsi
+ and RADV vulkan drivers.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_INTEL
+ bool "intel"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for i915, used by Gallium i915/Iris
+ and Intel vulkan drivers.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_MSM
+ bool "msm"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
+ depends on !BR2_arm
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for msm, used by Gallium freedreno
+ driver.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_PANFROST
+ bool "panfrost"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_PANFROST
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for Panfrost, used by the panfrost
+ Gallium/vulkan drivers.
+
+endif
+
+comment "virglrenderer needs a toolchain w/ gcc >= 4.9"
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/virglrenderer/virglrenderer.hash b/package/virglrenderer/virglrenderer.hash
new file mode 100644
index 0000000000..03da595091
--- /dev/null
+++ b/package/virglrenderer/virglrenderer.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256 065bc56e89e6f631f96101cd62eba0748e48eb888b434edc86e89d05395e76f3 virglrenderer-1.3.0.tar.gz
+
+# License
+sha256 3b32caf16e2402c2aff2b716858713f3e1feded85c25e71bf829816ee5009402 COPYING
diff --git a/package/virglrenderer/virglrenderer.mk b/package/virglrenderer/virglrenderer.mk
new file mode 100644
index 0000000000..4e7bcbb849
--- /dev/null
+++ b/package/virglrenderer/virglrenderer.mk
@@ -0,0 +1,60 @@
+################################################################################
+#
+# virglrenderer
+#
+################################################################################
+
+VIRGLRENDERER_VERSION = 1.3.0
+VIRGLRENDERER_SITE = https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/$(VIRGLRENDERER_VERSION)
+VIRGLRENDERER_LICENSE = MIT
+VIRGLRENDERER_LICENSE_FILES = COPYING
+VIRGLRENDERER_INSTALL_STAGING = YES
+VIRGLRENDERER_DEPENDENCIES = \
+ libepoxy \
+ host-pkgconf \
+ host-python3 \
+ host-python-pyyaml
+VIRGLRENDERER_CPE_ID_VALID = YES
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VIRGL),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGBM),yy)
+VIRGLRENDERER_PLATFORMS += egl
+VIRGLRENDERER_DEPENDENCIES += libegl \
+ libgbm
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+VIRGLRENDERER_PLATFORMS += glx
+VIRGLRENDERER_DEPENDENCIES += libgl
+endif
+endif # BR2_PACKAGE_VIRGLRENDERER_VIRGL
+
+VIRGLRENDERER_CONF_OPTS += -Dplatforms=$(subst $(space),$(comma),$(VIRGLRENDERER_PLATFORMS))
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VENUS),y)
+VIRGLRENDERER_CONF_OPTS += -Dvenus=true
+VIRGLRENDERER_DEPENDENCIES += vulkan-headers \
+ vulkan-loader
+else
+VIRGLRENDERER_CONF_OPTS += -Dvenus=false
+endif
+
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_AMDGPU) += amdgpu-experimental
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_INTEL) += i915-experimental
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_MSM) += msm
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_PANFROST) += panfrost-experimental
+
+VIRGLRENDERER_CONF_OPTS += -Ddrm-renderers=$(subst $(space),$(comma),$(VIRGLRENDERER_DRM_BACKENDS-y))
+
+ifneq ($(VIRGLRENDERER_DRM_BACKENDS-y),)
+VIRGLRENDERER_DEPENDENCIES += libdrm
+endif
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VAAPI),y)
+VIRGLRENDERER_CONF_OPTS += -Dvideo=true
+VIRGLRENDERER_DEPENDENCIES += libva libdrm
+else
+VIRGLRENDERER_CONF_OPTS += -Dvideo=false
+endif
+
+$(eval $(meson-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-03-17 22:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 22:16 [Buildroot] [PATCH v4 0/5] Add virglrenderer support Joseph Kogut
2026-03-17 22:16 ` [Buildroot] [PATCH v4 1/5] package/libepoxy: remove gl/egl dependency Joseph Kogut
2026-03-17 22:16 ` Joseph Kogut [this message]
2026-03-17 22:16 ` [Buildroot] [PATCH v4 3/5] package/virglrenderer: Fix build with glibc 2.43 Joseph Kogut
2026-03-18 19:07 ` Joseph Kogut
2026-03-17 22:16 ` [Buildroot] [PATCH v4 4/5] package/qemu: add OpenGL config Joseph Kogut
2026-03-17 22:16 ` [Buildroot] [PATCH v4 5/5] package/qemu: add virglrenderer support Joseph Kogut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317-virglrenderer-v4-2-ed223e222bb6@gmail.com \
--to=joseph.kogut@gmail.com \
--cc=aperez@igalia.com \
--cc=buildroot@buildroot.org \
--cc=eric.le.bihan.dev@free.fr \
--cc=romain.naour@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox