Hi Vivek On Tue, Apr 29, 2025 at 10:13 AM Vivek Kasireddy <vivek.kasire...@intel.com> wrote: > > 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. > > Essentially, this patch series provides a hardware accelerated, > opensource VDI option for users using Qemu and Spice by leveraging > the iGPU/dGPU on the host machine via the Gstreamer framework. >
Could you explain why Spice or GStreamer can't handle a non-linear texture layout? It feels like a limitation that is not under QEMU responsibility, I am not sure it should have to do it. Btw, the series will likely have conflicts with "ui: support multi plane texture", which I think we should merge first. (https://patchew.org/QEMU/20250327025848.46962-1-yuq...@gmail.com/) > v2 -> v3: > - Check for errors after invoking glImportMemoryFdEXT() using > glGetError() and report the error to user (Dmitry) > > v1 -> 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 against 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 <kra...@redhat.com> > Cc: Marc-André Lureau <marcandre.lur...@redhat.com> > Cc: Dmitry Osipenko <dmitry.osipe...@collabora.com> > Cc: Frediano Ziglio <fredd...@gmail.com> > Cc: Michael Scherle <michael.sche...@rz.uni-freiburg.de> > Cc: Dongwon Kim <dongwon....@intel.com> > Cc: Alex Bennée <alex.ben...@linaro.org> > > 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 | 28 ++++++ > ui/spice-core.c | 16 ++++ > ui/spice-display.c | 184 +++++++++++++++++++++++++++++++++---- > 6 files changed, 223 insertions(+), 16 deletions(-) > > -- > 2.49.0 > > -- Marc-André Lureau