mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-01 04:28:48 +00:00
7d20d126c3
This introduces a client-side library with FFI bindings (libvirtgpu_kumquat_ffi.so) + server (Kumquat). The main goal is to develop features and test applications, without a VM. gfxstream and other virtio-gpu contexts may easily connect to the virtio-gpu part of the multi-media server via replacing traditional virtgpu DRM ioctls with FFI functions (they are ABI compatible). gfxstream has had similiar features for a long time, with the main goal of testing deqp-{gles, vk} without a VM. It was known the "Android host build" for the longest time, and it was recently improved to GfxstreamEnd2EndTests. The downside of this approach is if you want to test complex apps (think gfxbench) and multiple apps at the same time, it breaks down. This is good enough to run vulkaninfo and all headless apps probably. Apps with windowing fail, but due to gfxsteam-specific bugs so far. Getting windowing working + Kumquat is a goal. A side goal would be to test cross-domain and that requires the ability for multi-context interop using external memory. The current GfxstreamEnd2EndTests only support one GPU context at a time. It addition, camera/video support is important too, hence the name Kumquat (since ideally it won't just be rutabaga, it'll be something different). If we added emulated virtio-media support, we in theory can test GPU <--> media interop without a VM too. Probably the allocator <--> renderer flow should work first, and generically it really doesn't (everyone has their own workarounds). We might want to connect the virtgpu_rutabaga APIs in minigbm.. Dependencies: Clap 4.1.8, same version as in AOSP KNOWN ISSUES: 1) Use of UnixStream as the socket type. This is a stream socket, so there are no message boundaries (the bytes sent by a particular send() won't necessarily be received by a single corresponding recv()). This could also lead to partial commands. The proper solution would be to leverage SEQPACKET socket, but std::os::unix::net does not have support yet. One could leverage nix and do a DIY RutabagaSocket. However, this is not observed in practice yet, since the client side library as a mutex around every access. Many commands also wait for a response ensuring ordering. It should be fixed though. 2) Mmap instead of Vulkano Mapping. Unlikely to work on Nvidia. 3) Emulated import/export not complete. BUG=b:300140266 TEST = cargo build --features=gfxstream + target/debug/kumquat vulkaninfo via gfxstream (works) tfw-pkg/bin/testfw_app --gfx egl --gl_api=gles -w 1280 -h 720 -t gl_manhattan_off (loads but hangs due X11/virtio-gpu spec/gfxstream bugs). Change-Id: I4c16a2fc7b41691585cf4ba7ee8f36602cb6036d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5645904 Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
40 lines
1.1 KiB
TOML
40 lines
1.1 KiB
TOML
[package]
|
|
name = "rutabaga_gfx"
|
|
version = "0.1.3"
|
|
authors = ["The ChromiumOS Authors + Android Open Source Project"]
|
|
edition = "2021"
|
|
description = "Handling virtio-gpu protocols"
|
|
license-file = "LICENSE"
|
|
|
|
[features]
|
|
ipc = []
|
|
gfxstream = []
|
|
gfxstream_stub = []
|
|
virgl_renderer = []
|
|
minigbm = []
|
|
# To try out Vulkano, delete the following line and uncomment the line in "dependencies". Vulkano
|
|
# features are just a prototype and not integrated yet into the ChromeOS build system.
|
|
vulkano = []
|
|
x = []
|
|
|
|
[dependencies]
|
|
cfg-if = "1.0.0"
|
|
libc = "0.2.116"
|
|
remain = "0.2"
|
|
thiserror = "1.0.23"
|
|
zerocopy = { version = "0.7", features = ["derive"] }
|
|
|
|
log = "0.4"
|
|
|
|
# To build latest Vulkano, change version to git = "https://github.com/vulkano-rs/vulkano.git"
|
|
# vulkano = { version = "0.33.0", optional = true }
|
|
|
|
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
|
|
nix = { version = "0.28", features = ["event", "feature", "fs", "mman", "socket", "uio", "ioctl"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
winapi = {version = "0.3", features = ["winnt", "handleapi", "processthreadsapi", "winbase"]}
|
|
|
|
[build-dependencies]
|
|
pkg-config = "0.3"
|
|
anyhow = "1.0.57"
|