summary refs log tree commit diff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorLingfeng Yang <lfy@google.com>2020-01-30 10:00:36 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-19 06:18:37 +0000
commitddbe8b7e8eb141bf7ccbb0554278fff7164be166 (patch)
treee1673e3a329e8f7472f40492d7abfe07831e6a61 /Cargo.toml
parent79f10170da3c131ee23eee3018f981811e09a4cc (diff)
downloadcrosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar.gz
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar.bz2
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar.lz
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar.xz
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.tar.zst
crosvm-ddbe8b7e8eb141bf7ccbb0554278fff7164be166.zip
virtio-gpu: gfxstream backend
Adds a new backend type, gfxstream, that calls out to a C library
implementing the actual rendering.

The purpose is to allow the Cuttlefish and Android Studio Emulator teams
to use crosvm with the current API-forwarding style of rendering
employed in the Android Studio Emulator.

Also, introduces a new key to the --gpu command line interface,
backend=, which selects from different backends. Note that the previous
behavior is now deprecated and will be removed after some time
(when all clients switch over to backend=).

The gfxstream backend itself implements a subset of 3d-related resource
and context creation/transfer/execbuffer commands. Their meaning is
specific to the way in which they are interpreted in the backend
library.

To interface with display, gfx stream backend takes a callback that is
run on guest vsync. The callback is responsible for repainting the
display's contents. gfx stream provides a callback, get_pixels, that can
be used asynchronously. The asyncness is not taken advantage of
currently but will be useful for cases where the client attached to the
VMM might want to update at a different rate than guest vsync.

The guts of the stream backend library is currently defined here:

https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/android-qemu2-glue/emulation/virtio-goldfish-pipe.cpp

The linking of the library is controlled via the feature "gfxstream".
If the feature is turned off, we use a default do-nothing stub impl.

Next steps:
- integrate virtio-gpu-next so as to have host coherent memory for
vulkan
- Figure out low latency command submit/response with SUBMIT_CMD_3DV2

BUG=b:146066070

Change-Id: If647381c15e5459cec85e2325f97e2f0a963b083
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2033305
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Auto-Submit: Lingfeng Yang <lfy@google.com>
Commit-Queue: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 9afef46..7eb7215 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,7 @@ wl-dmabuf = ["devices/wl-dmabuf", "gpu_buffer", "resources/wl-dmabuf"]
 x = ["devices/x"]
 virtio-gpu-next = ["gpu_renderer/virtio-gpu-next"]
 composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
+gfxstream = ["devices/gfxstream"]
 
 [dependencies]
 arch = { path = "arch" }