[PATCH v2 0/6] ui/spice: Enable gl=on option for non-local or remote clients

Vivek Kasireddy posted 6 patches 6 days, 8 hours ago
include/ui/console.h       |   2 +
include/ui/spice-display.h |   4 +
qemu-options.hx            |   5 +
ui/console-gl.c            |  26 ++++++
ui/spice-core.c            |  16 ++++
ui/spice-display.c         | 184 +++++++++++++++++++++++++++++++++----
6 files changed, 221 insertions(+), 16 deletions(-)
[PATCH v2 0/6] ui/spice: Enable gl=on option for non-local or remote clients
Posted by Vivek Kasireddy 6 days, 8 hours ago
To address the limitation that this option is incompatible with
remote clients, this patch series adds an option to select a
preferred codec and also enable gl=on option for clients that
are connected via the network. In other words, with this option
enabled (and the below linked Spice series merged), it would be
possible to have Qemu share a dmabuf fd with Spice, which would
then forward it to a hardware or software based encoder and
eventually send the data associated with the fd to a client that
could be located on a different machine.

v2:
- Replace the option name preferred-codec with video-codecs (Marc-André)
- Add a warning when an fd cannot be created from texture (Marc-André)
- Add a new patch to blit the scanout texture into a linear one to
  make it work with virgl
- Rebased and tested agains the latest Spice master

Tested with the following Qemu parameters:
-device virtio-vga,max_outputs=1,xres=1920,yres=1080,blob=true
-spice port=3001,gl=on,disable-ticketing=on,video-codecs=gstreamer:h264

and remote-viewer --spice-debug spice://x.x.x.x:3001 on the client side.

Associated Spice server MR (merged):
https://gitlab.freedesktop.org/spice/spice/-/merge_requests/229

---
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Michael Scherle <michael.scherle@rz.uni-freiburg.de>
Cc: Dongwon Kim <dongwon.kim@intel.com>

Vivek Kasireddy (6):
  ui/spice: Add an option for users to provide a preferred codec
  ui/spice: Enable gl=on option for non-local or remote clients
  ui/spice: Submit the gl_draw requests at 60 FPS for remote clients
  ui/console-gl: Add a helper to create a texture with linear memory
    layout
  ui/spice: Create a new texture with linear layout when gl=on is
    enabled
  ui/spice: Blit the scanout texture if its memory layout is not linear

 include/ui/console.h       |   2 +
 include/ui/spice-display.h |   4 +
 qemu-options.hx            |   5 +
 ui/console-gl.c            |  26 ++++++
 ui/spice-core.c            |  16 ++++
 ui/spice-display.c         | 184 +++++++++++++++++++++++++++++++++----
 6 files changed, 221 insertions(+), 16 deletions(-)

-- 
2.48.1