Add command line arguments for configuring which capsets and features are
enabled when configuring Rutabaga.
Since we now specify the capsets explicitly we can drop the MAX_NUM_CAPSETS
constant and fix the TODO.
The curently exposed capsets for virglrenderer are: virgl and virgl2.
For gfxstream they are: gfxstream-vulkan and gfxstream-gles.
Signed-off-by: Matej Hrica <mhrica@redhat.com>
This was an oversight - for the user to be able to use the crate as a
library, the start_backend needs to be part of the public API.
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Remove the workaround to disable compiling the code on non-gnu targets.
(the CI now doesn't attempt compiling on musl)
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Remove capset constants definitions in protocol.rs, these are unecessary,
because we use the constants defined in the Rutabaga crate.
Signed-off-by: Matej Hrica <mhrica@redhat.com>
The name of the project/backend is "virglrenderer", the dash was added by
clap. Adding the dash seems confusing to the user, the old name is kept
as a hidden alias.
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Add a new compile-time feature, `gfxstream`, which is included in the
default features. The only thing that changes is that we can now build
without requiring the `gfxstream_backend` library on compilation time,
which helps in cases it is not packaged in a distro, or is not available
at a user's build machine.
Also update `README.md` with information about the build-time feature.
This commit does not change anything other than make gfxstream gpu mode
opt-out at build-time. Everything should continue to work the same.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit adds more tests for uncovered code paths
This test also covers some gpu commands functionality
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This program is a vhost-user backend daemon that provides
VIRTIO GPU device emulation as specified in the VIRTIO Spec v.1.2
https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html
This crate utilizes the rutabaga crate from crosvm with some
minor modification to rutabaga crate to fix compilation.
This crate depends on this PR[rust-vmm/vhost#239]
that implements support for QEMU's vhost-user-gpu protocol.
This device uses the rutabaga_gfx crate to offer two rendering backends:
1. Virglrenderer:
- Rutabaga translates OpenGL API and Vulkan calls to an intermediate
representation and allows for OpenGL acceleration on the host.
2. Gfxstream:
- GLES and Vulkan calls are forwarded to the host.
These backends can be used by simply changing the `--gpu-mode` command
line option.
This crate also includes some modifications from libkrun virtio-gpu device
https://github.com/containers/libkrun/tree/main/src/devices/src/virtio/gpu
Fixes: rust-vmm#598
Co-authored-by: Dorinda Bassey <dbassey@redhat.com>
Co-authored-by: Matej Hrica <mhrica@redhat.com>
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Signed-off-by: Matej Hrica <mhrica@redhat.com>