Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add VirGL pres

...

The virtio-gpu 3D implementation is more complex. Besides supporting all the functionality from above, it also introduces some architecture changes as well as additions to the virtio-gpu command set. It is still work in progress.

On the guest side some modifications to the Mesa library (an open-source implementation of many graphics APIs, including OpenGLOpenGL ES (versions 1, 2, 3), OpenCL) have been done.  Applications on the guest side still speak unmodified OpenGL to the Mesa library. But instead of Mesa handing commands over to the hardware it is channeled through virtio-gpu to the backend on the host. The backend then receives the raw graphics stack state (Gallium state, see [4]) and interprets it using virglrenderer from the raw state into an OpenGL form, which can be executed as entirely normal OpenGL on the host machine.  The The host also translates shaders from the TGSI format [5] used by Gallium into the GLSL format used by OpenGL. The OpenGL stack on the host side does not even have to be Mesa, and could be some proprietary graphics stack.The host uses virglrenderer to provide accelerated rendering. It receives Gallium states from the guest kernel via its virtio-gpu interface, which are then translated into OpenGL on the host. It also translates shaders from the TGSI format [5] used by Gallium into the GLSL format used by OpenGL.

Considering the command set extensions, the following was added:

...

The overall complexity of virtio-gpu 3D is mostly handled by the Mesa library on the guest side and by virglrenderer on the host side.

VirGL architecture, comparison to other approaches, future directions

An architecture presentation from Collabora (VirGL developers) has been attached below. This outlines the current design and approach taken for VirGL development, the reasons behind these choices, a comparison to other approaches (e.g. direct hardware sharing provided by vendor drivers), and some possible future directions for development of open, vendor-neutral, graphics sharing standards.

 

View file
name2020-06-06 - AGL Virt EG - Daniel Stone - Collabora - VirGL.pdf
height250


[1] https://en.wikipedia.org/wiki/FourCC

...