[Mesa-dev] Merging virtio-gpu vulkan driver

Chia-I Wu olvaffe at gmail.com
Mon Apr 5 17:21:26 UTC 2021


Hi list,

We are looking to merge virtio-gpu vulkan driver

  https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800

On the good side, the driver is conformant with Vulkan 1.2 (vtest) and
Vulkan 1.1 (virtio-gpu).  I only tried it on a handful of games (e.g.,
Dota 2, Hades on Proton with D3D and Vulkan backends, and some
others), but it appeared to work with reasonable framerates.  I was
told that it works with other games as well.

I tried Basemark GPU a month ago on a Core i7-7820HQ.  The fps numbers were

  quality highend: native 17.07, vtest 16.83, virtio-gpu 16.65
  quality medium: native 98.19, vtest 91.15, virtio-gpu 92.29
  quality simple: native 327.52, vtest 317.17, virtio-gpu 283.02

On the bad side, the driver requires

  VIRTIO_GPU_F_RESOURCE_BLOB (kernel 5.11 but not supported by qemu)
  VIRTIO_GPU_F_CONTEXT_INIT (to be upstreamed[1])

As a result, it can only be tested with crosvm[2] or vtest[3].

We develop using anv as the host driver mostly.  Simple samples work
when the host driver is radv, but games hit a host KVM bug quickly.
The issue has been reported and we expect it to be fixed by upstream.

The protocol for Vulkan command serialization is not finalized either.
The driver is still marked experimental and must be enabled with
-Dvulkan-drivers=virtio-experimental.  The plan is to mark the driver
stable after the kernel ABI and the protocol ABI are finalized.

[1] https://gitlab.freedesktop.org/virgl/drm-misc-next/-/commits/context-init/
[2] KVM-based VMM written in Rust
https://chromium.googlesource.com/chromiumos/platform/crosvm/
[3] vtest is a part of virglrenderer and is what I use for most of the
developments


More information about the mesa-dev mailing list