Viewer GPU Affinity - Running multiple viewers on multiple GPU's on one machine

I’m running 2 (and preferably more) Unity3D viewers on a single machine with multiple GPUs (2 at this moment). When checking GPU load and memory usage it seems that only the primary GPU is used for all the viewers while the secondary GPU is just idling.

I have tried starting the viewer with the command-line argument ‘-adapter N’ to select which adapter the viewer should use but to no avail. I’m currently starting a viewer using:

MyProject.exe -popupwindow -adapter n -force-d3d11

Has anyone successfully been able to run multiple viewers on multiple GPUs?

Any tips on setting the GPU Affinity for unity viewers?

Try the -gpu argument.

It’s not in the docs yet, but a unity dev in this thread ( http://forum.unity3d.com/threads/use-of-multiple-video-cards-running-multiple-instances-of-a-unity-standalone-player-on-windows.382751/ ) explains:

-adapter option actually refers to d3d9 adapters, which are actual “outputs” of the graphics card, for example, monitors. To force a specific graphics card, use the “-gpu” flag. For example, launch one instance with “-gpu 0”, and another instance with “-gpu 1”. By the way - this will only work if you’re using D3D11 or D3D12 as your graphics API in player settings.

This requires Unity 5.2 or greater.