From: Joseph Kogut <joseph.kogut@gmail.com>
To: buildroot@buildroot.org
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Romain Naour <romain.naour@gmail.com>,
Joseph Kogut <joseph.kogut@gmail.com>,
Adam Ford <aford173@gmail.com>,
Steve deRosier <derosier@cal-sierra.com>
Subject: [Buildroot] [PATCH v3 0/2] Add virglrenderer support
Date: Thu, 19 Feb 2026 17:23:52 -0800 [thread overview]
Message-ID: <20260219-virglrenderer-v3-0-e2ff1a23be3f@gmail.com> (raw)
Hello,
This patch series adds support for building the virglrenderer library in
buildroot.
Virglrenderer is a userspace library used to support rendering and
compute in virtual machines over virtio-gpu. Virglrenderer supports
serialized API level access to OpenGL and Vulkan through virgl and venus
respectively, as well as mediated DRM level access using host native
context [0]. Notably libkrun [1] and rutabaga_gfx [2] are also capable of
utilizing virglrenderer.
For v3 of the patch, I removed the dependency on (HAS_LIBEGL ||
HAS_LIBGL) in favor of just depending on HAS_LIBEGL. The project is
intended to support both EGL and GLX, but most graphics paths nowadays
use EGL, and this is a bit simpler. Support for GLX could be added in a
later patch if anyone needs it.
The first patch adds the new virglrenderer package.
The second patch adds an OpenGL config for qemu, and a virglrenderer
config that selects it, as virgl/venus currently require a GL
accelerated display frontend. An optional config for enabling venus on
virglrenderer enables vulkan passthrough, and a config for vaapi enables
hardware video acceleration.
Tested with llama-bench running with the vulkan backend in a nested VM.
As seen below, the nested guest is sending commands to the host through
virtio-gpu twice.
# llama-bench -m llama-2-7b.Q4_0.gguf -ngl 100
ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = Virtio-GPU Venus (Virtio-GPU Venus (AMD Radeon RX 6900 XT (RADV NAVI21))) (venus) | uma: 0 | fp16: 1 | warp size: 64 | shared memory: 65536 | int dot: 1 | matrix cores: none
| model | size | params | backend | ngl | test | t/s |
| ------------------------------ | ---------: | ---------: | ---------- | --: | --------------: | -------------------: |
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | Vulkan | 100 | pp512 | 1220.99 ± 10.12 |
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | Vulkan | 100 | tg128 | 82.24 ± 1.00 |
build: unknown (0)
More information about the benchmark and results from other hardware on
the llama.cpp GitHub discussion here [3].
Feedback welcome.
[0] https://www.collabora.com/news-and-blog/blog/2025/01/15/the-state-of-gfx-virtualization-using-virglrenderer/
[1] https://github.com/containers/libkrun
[2] https://github.com/magma-gpu/rutabaga_gfx
[3] https://github.com/ggml-org/llama.cpp/discussions/10879
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
Changes in v3:
- Bump version to v1.3.0
- Add optional deps for panfrost and i915 native context (new)
- Add config for vaapi support
- Remove GLX in favor of EGL
- Update qemu docs links, as previous ones 404 [Romain]
- Fix invalid config reference in BR2_PACKAGE_QEMU_VIRGLRENDERER
[Romain]
- Select libepoxy when enabling OpenGL support in qemu [Romain]
- Add depends on gcc >= 4.1 to virglrenderer (from meson.build)
- Add depends on libgbm to virglrenderer [Romain]
- Add comments for missing dependencies to virglrenderer Kconfig
- Select vulkan-headers when venus is enabled [Romain]
- Disable venus explicitly when the symbol isn't selected
- Link to v2: https://lore.kernel.org/buildroot/20251203-virglrenderer-v2-v2-0-2846fc1a579a@gmail.com
Changes in v2:
- Rebase onto next (python-glslang patch merged)
- Bump version to v1.2.0
- Remove hidden configs for virglrenderer vDRM backends [Romain]
- Fixed typo in qemu/Config.in [Romain]
- Split up configs for qemu OpenGL and virglrenderer support [Romain]
- More detailed qemu config help messages
- Link to v1: https://lore.kernel.org/r/20250618-virglrenderer-upstream-v1-0-57525ac8406e@gmail.com
---
Joseph Kogut (2):
package/virglrenderer: new package
package/qemu: add virglrenderer support
DEVELOPERS | 1 +
package/Config.in | 1 +
package/qemu/Config.in | 28 ++++++++++++++++
package/qemu/qemu.mk | 15 ++++++++-
package/virglrenderer/Config.in | 49 +++++++++++++++++++++++++++
package/virglrenderer/virglrenderer.hash | 5 +++
package/virglrenderer/virglrenderer.mk | 57 ++++++++++++++++++++++++++++++++
7 files changed, 155 insertions(+), 1 deletion(-)
---
base-commit: 6c83a0b8e5658b901dd35ae23217075f035af998
change-id: 20260219-virglrenderer-c4dad969ad89
Best regards,
--
Joseph Kogut <joseph.kogut@gmail.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-02-20 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 1:23 Joseph Kogut [this message]
2026-02-20 1:23 ` [Buildroot] [PATCH v3 1/2] package/virglrenderer: new package Joseph Kogut
2026-02-20 1:23 ` [Buildroot] [PATCH v3 2/2] package/qemu: add virglrenderer support Joseph Kogut
2026-03-04 22:29 ` Romain Naour via buildroot
2026-03-11 19:30 ` 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=20260219-virglrenderer-v3-0-e2ff1a23be3f@gmail.com \
--to=joseph.kogut@gmail.com \
--cc=aford173@gmail.com \
--cc=buildroot@buildroot.org \
--cc=derosier@cal-sierra.com \
--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