Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating a DX11 staging texture backed by custom RAM allocation.

17 views
Skip to first unread message

Geoffrey McRae

unread,
Jun 5, 2021, 7:33:06 AM6/5/21
to
Hi All,

I am the author of Looking Glass (https://looking-glass.io) and I am looking for a way to improve our DXGI Desktop Duplication capture performance. This question is specifically about how to avoid an extra CPU memory copy as part of our pipeline.

If you are not familiar with Looking Glass, what we are doing is using a virtual hardware device (IVSHMEM) to map a block of shared memory into a Windows Virtual Machine. We then use this shared RAM to pass the captured desktop back to the host so that it can be rendered on screen. We do this so that we can acquire the video output of a GPU that has been passed through to the guest by means of VFIO and integrate it into the Linux desktop.

Currently, our pipeline works as follows:

1) AcquireFrame
2) CopyResource to staging texture (system RAM)
3) mmap staging texture
4) memcpy to IVSHMEM memory
5) unmap staging texture

My question here is, is it possible to avoid this by creating a DX11 staging texture backed by our IVSHMEM device directly removing our need to copy the texture again?

If this needs to be done in kernel space (the IVSHMEM driver) this is possible, but it would be preferable if there is a userspace method of performing this.

Kind Regards,
Geoffrey McRae
0 new messages