[virglrenderer-devel] virtgpu 3d specs and custom guest driver
Dave Airlie
airlied at gmail.com
Mon Jun 22 06:00:53 UTC 2020
On Mon, 22 Jun 2020 at 15:57, Elias Naur <mail at eliasnaur.com> wrote:
>
> Hi,
>
> Please point me in the direction of the best place to start implementing
> a custom virtio-gpu 3d driver.
>
> I'm exploring the viability of developing GUI programs
> capable of running directly in a virtual machine that exports
> a virtio-gpu device.
You really want to use the Mesa 3D project to provide a standard
OpenGL or OpenGL-ES interface for applications to use.
>
> I have:
>
> A prototype Go unikernel,
>
> https://git.sr.ht/~eliasnaur/microvisor
>
> capable of running Go programs directly in Qemu.
>
> A Go GUI library,
>
> https://gioui.org
>
> designed to be very portable (only needs GPU and input device access).
By GPU it sounds like it needs OpenGL ES access, which means you'd
have to use Mesa project to provide the GL ES interface.
> I'm about to start implementing a 2d virtio-gpu driver in Go, which I
> hope will demonstrate drawing from inside the virtual machine.
>
> However, I failed to find even preliminary specification, list of
> commands or anything else to help with developing a 3d driver. It
> is my impression that the virtio-gpu 3d interface is similar to
> OpenGL, so I don't expect a serious impedance mismatch between the
> existing Gio OpenGL ES backend and virtio-gpu.
The Mesa gallium later is what the virgl interface is based upon, TGSI
is the shader language sent to the host. Against Mesa is the project
with all of the info in it.
> Do you know of information better than studying, say, the Linux
> guest driver? And what is the purpose of virglrenderer,
>
> https://gitlab.freedesktop.org/virgl/virglrenderer
>
> ? From the name it sounds like it might help me develop and test the
> driver by being a reference implementation of a virtgpu => OpenGL
> translator.
virglrenderer is the code running on the host side, inside qemu.
Dave.
More information about the virglrenderer-devel
mailing list