Gfxstream Merged Into Mesa For Vulkan Virtualization
([Mesa] 5 Hours Ago
Mesa Gfxstream)
- Reference: 0001492783
- News link: https://www.phoronix.com/news/Mesa-Gfxstream-Merged
- Source link:
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 [1]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 [2]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 [3]this mailing list thread .
[1] https://crosvm.dev/book/appendix/rutabaga_gfx.html#build-aemu-base
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246
[3] https://lists.freedesktop.org/archives/mesa-dev/2024-January/226123.html
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 [1]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 [2]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 [3]this mailing list thread .
[1] https://crosvm.dev/book/appendix/rutabaga_gfx.html#build-aemu-base
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246
[3] https://lists.freedesktop.org/archives/mesa-dev/2024-January/226123.html
Kjell