- Home /
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?
Did you have any luck with this? I'd appreciate ANY info! Thanks :)
This may be a dumb question, but are you actually typing "-adapter n" or are you substituting 'n' with a number?
No I was using a number for n, but thanks for asking you never know :).
Answer by adamonline45 · Apr 01, 2016 at 08:04 PM
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.
Thanks for pointing this out! In 4.x we solved it by making a DX11 wrapper which takes care of this, good that we can now possibly get rid of this!
Hi. Do you know a way to assign a GPU per Camera (or per targetDisplay) in a single Unity instance ? This should be the ultimate solution for multi-display rendering (CAVE system for example) using only one computer.
Your answer
Follow this Question
Related Questions
What is the best solution for building a program that utilises multiple displays through one PC? 0 Answers
GPU instancing and collision detection in flocking behaviour simulation 0 Answers
Getting more than one GUI window to display 0 Answers
Multiple Simultaneous Rendering Unity Instances 2 Answers
Y value of MousePosition become negative When focus on second display? 0 Answers