Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.99k stars 169 forks source link

hyper-v host GPU encoding, slicing resources #4418

Open totaam opened 1 week ago

totaam commented 1 week ago

This ticket may well end up moved to another project if it proves beneficial to more than just xpra.

Hyper-v:

Important: most passthrough and partitioning solutions don't allow guests to access to the hardware encoders, only opengl / vulcan. Another (smaller) downside is that they require modifications to the OS configuration that cannot easily be managed using a package or script. So, perhaps we should expose a memory mapped service to the guests so that they can hand over pixel buffers to the host which can take care of managing the encoder chip(s) and send back encoded frames.

For now, this is just an easy place to dump references and links:

I CAN (edit) find the ivshmem equivalent for hyper-v: see #3666 and VMBUS: VMbus enables efficient, low-latency communication between the host and the guest VM


ivshmem links for the Linux implementation: #3810

totaam commented 4 hours ago

For OpenGL acceleration of WSL2 guests, see https://github.com/Xpra-org/xpra/blob/master/docs/Usage/WSL.md

totaam commented 3 hours ago

As for GPU encoding, AMD AMF includes some code samples: https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/samples/ It's not yet clear to me if we can use DirectX11 contexts when running in Windows Server context. https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c : this sample encodes NV12 frames using AMF Encoder and writes them to H.264 elementary stream