public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/2] Add virglrenderer support
@ 2026-02-20  1:23 Joseph Kogut
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Kogut @ 2026-02-20  1:23 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Romain Naour, Joseph Kogut, Adam Ford,
	Steve deRosier

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-11 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20  1:23 [Buildroot] [PATCH v3 0/2] Add virglrenderer support Joseph Kogut
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox