OSDN Git Service

drm/virtgpu api: blob resources
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 24 Sep 2020 00:32:00 +0000 (17:32 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 29 Sep 2020 09:23:08 +0000 (11:23 +0200)
commiteda3e1018f786f8f3db93001fb2da757b193ed1a
treeead5763601c99d2bb36f46d26b2a78767004b563
parente5cd6cbe025570f6135f48538cb450254f8fbdd3
drm/virtgpu api: blob resources

This makes blob resources available to guest userspace. They are needed
for GL4.5, Vulkan and zero-copy virtio-gpu.

For Mesa, blob resources have been tested with Piglit's ARB_buffer_storage
tests and apitraces.  Apitraces of GL4.5 games show we're between 70%
to 80% of host performance on Iris, based on a apitrace of a 2013 GL4.5
game:

11.204 FPS (guest)
15.947 FPS (host)

This is still better than the status quo, when said game was unplayable
with Virgl due to an inefficient GL4.3 fallback.  But there's still room
for improvement if we want to match HW-assisted virtualization.

For Vulkan, blob resources have been tested with dEQP.vk.memory* and
running Vulkan applications in production with the "Cuttlefish" virtual
Android device.  This has been done with Lingfeng Yang's "gfxstream"
Vulkan implementation, which virtualizes Vulkan across many Google
products.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Lingfeng Yang <lfy@google.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-5-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
include/uapi/drm/virtgpu_drm.h