Gfxstream Merged Into Mesa For Vulkan Virtualization
After seven months under review, Google's Gfxstream code has been upstreamed into Mesa 24.3 as a Vulkan virtualization solution.
Google/Chromium engineers have been working on Gfxstream as part of their Rutabaga Virtual Graphics Interface as a cross-platform abstraction for GPU and display virtualization. This goes in-step with their CrosVM efforts. Those learning about the Rutabaga Virtual Graphics Interface for the first time can learn more via the CrosVM.dev documentation.
Gfxstream within Mesa exists as another new Vulkan driver "gfxstream-experimental" and consists of around 26k lines of new code.
The merge request sums up the Mesa-side Gfxstream code as:
Google uses Gfxstream within the Android Emulator, Cuttlefish. Google Play Games, Fuchsia guests, AAOS reference guests, and various experimental projects.
More background information on Gfxstream for Mesa can be found within this mailing list thread.
Google/Chromium engineers have been working on Gfxstream as part of their Rutabaga Virtual Graphics Interface as a cross-platform abstraction for GPU and display virtualization. This goes in-step with their CrosVM efforts. Those learning about the Rutabaga Virtual Graphics Interface for the first time can learn more via the CrosVM.dev documentation.
Gfxstream within Mesa exists as another new Vulkan driver "gfxstream-experimental" and consists of around 26k lines of new code.
The merge request sums up the Mesa-side Gfxstream code as:
Graphics Streaming Kit is a code generator that makes it easier to serialize and forward graphics API calls from one place to another.
- 1:1 threading model - each guest Vulkan encoder thread gets host side decoding thread
- Support for both virtio-gpu, goldish and testing transports.
- Support for Android, Fuchsia, and Linux guests.
- Ring Buffer to stream commands, in the style of io_uring.
- Currently, there are a set of Mesa objects and gfxstream objects. For example, struct gfxstream_vk_device and the gfxstream object goldfish_device both are internal representations of Vulkan opaque handle VkDevice. The Mesa object is used first, since Mesa provides dispatch. The Mesa object contains a key to the hash table to get a gfxstream internal object (for example, gfxstream_vk_device::internal_object). Eventually, gfxstream objects will be phased out and Mesa objects used exclusively.
- Codegen is done in the codgen directory. It adds another generator to Vulkan-Docs generator, and our goal has been to upstream it eventually.
Google uses Gfxstream within the Android Emulator, Cuttlefish. Google Play Games, Fuchsia guests, AAOS reference guests, and various experimental projects.
More background information on Gfxstream for Mesa can be found within this mailing list thread.
8 Comments