com.unity.webrtc icon indicating copy to clipboard operation
com.unity.webrtc copied to clipboard

[REQUEST] DUAL GPUS (One for Unity/game, the other for encoding).

Open ZeoWorks opened this issue 3 years ago • 5 comments

Hello! I was wondering if it would ever be possible to 'select device' for vide encoding in the future?

This means we could encode on a second GPU while the game is running on the first GPU. It will prevent throttling I imagine.

Thanks.

ZeoWorks avatar Aug 16 '21 23:08 ZeoWorks

"NVIDIA GPUs contain one or more hardware-based decoder and encoder(s) (separate from the CUDA cores) which provides fully-accelerated hardware-based video decoding and encoding for several popular codecs. With decoding/encoding offloaded, the graphics engine and the CPU are free for other operations.", https://developer.nvidia.com/nvidia-video-codec-sdk

I don't think it will change anything in the performance

theomonnom avatar Aug 17 '21 18:08 theomonnom

In my experience (GTX 1080, RTX 2060), both do take a performance hit when encoding.

ZeoWorks avatar Aug 20 '21 20:08 ZeoWorks

@ZeoWorks I have never tried dual GPUs but it is an interesting idea.

I think that using dual GPUs for rendering/encoding increases the delay because occurring copy textures between GPUs. It might be good for increasing concurrent peers for video receiver.

karasusan avatar Aug 23 '21 08:08 karasusan

Hello! I was wondering if it would ever be possible to 'select device' for vide encoding in the future?

This means we could encode on a second GPU while the game is running on the first GPU. It will prevent throttling I imagine.

Thanks.

I piloted a dual GPU setup. It isn't reliable with Windows on DirectX in general. Only DirectX 11 renders offscreen correctly right now too, DirectX 12 Unity does not. You will need a significant list of fixes. I haven't tried Vulkan + Linux (NvCuda)

doctorpangloss avatar Aug 30 '21 17:08 doctorpangloss

memo: WRS-290

karasusan avatar Apr 19 '22 02:04 karasusan