spice: add opengl/virgl/dmabuf support
commit474114b7305cc1be7c2ee8ba5267be159a9d56e3
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 13 Oct 2015 13:39:34 +0000 (13 15:39 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 23 Feb 2016 11:04:39 +0000 (23 12:04 +0100)
tree339f6ec47224eb4106fa8134d24a37e40915bdd8
parent58c7b618f3889f53308142403117d5ae24bda9bc
spice: add opengl/virgl/dmabuf support

This adds support for dma-buf passing to spice.  This makes virtio-gpu
with 3d acceleration work with spice.

Workflow:
 * virglrenderer renders the guest command stream into a texture.
 * qemu exports the texture as dma-buf and passes on that dma-buf
   to spice-server.
 * spice-server passes the dma-buf to spice-client, using unix
   socket file descriptor passing.
 * spice-client asks the window systems composer to render the
   dma-buf to the screen.

Requires cutting edge spice (server) and spice-gtk (client) builds,
from git master branch.

Also requires libvirt managing your qemu instance, and using
"virt-viewer --attach $guest".  libvirt will connect spice-server and
spice-client using unix sockets instead of tcp sockets then, which
is required for file descriptor passing.

Works for the local case (spice server and client on the same machine)
only.  Supporting remote too is planned (by feeding the dma-bufs into
gpu-assisted video encoder), but not there yet.

gl mode is turned off by default, use "-spice gl=on,$otherargs" to
enable it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
include/ui/spice-display.h
qemu-options.hx
ui/spice-core.c
ui/spice-display.c