Search Unity

How can I force Unity to use my GTX 1060 for the GPU Lightmapper instead of my integrated graphics?

Discussion in 'Global Illumination' started by badfitz66, Nov 30, 2018.

  1. badfitz66

    badfitz66

    Joined:
    Nov 21, 2013
    Posts:
    6
    Title.

    My game heavily relies on baked lighting. It's not a large scene but I still find myself waiting 10~ or so minutes every time I bake my lighting. I tried to use the new GPU lightmapper but it was still slow and I realized it's using my integrated graphics instead of my dedicated GTX 1060 3GB.

    I've looked at the pinned post about it and used the command arguments for the shortcut to try and force it to use my dedicated GPU but that didn't work. Neither did going in nvidia control panel and forcing unity to use my GTX 1060 (it already was. I also tried forcing it to use my integrated since pinned post says it uses the gpu not being used to render the editor but that didn't work)

    Anyone know how I can fix this?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,728
    Wait for a fix (they said something about fixing this, but it’s probably for 2019.1 and beyond), or wait 10 minutes.
     
  3. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    I have a 1060 and it was working fine for the first preview test they released a while ago, but I ahven't tried it recently. My drivers are 411.70.
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Right now you have to use a command line argument to select a specific device as described in the pinned post here https://forum.unity.com/threads/gpu-lightmapper-preview.561103. In 2019.1 we will default to the same GPU as the Editor instead of the other (idle) GPU in your system. That changes hasn't landed yet but we expect it in a public alpha or beta release in a few weeks. Meanwhile start the editor like this (with 0 and 1 replaced by what is your preferred GPU from the editor log)
    Code (CSharp):
    1. C:\Program Files\Unity 2019.1.0a3\Editor>Unity.exe -OpenCL-PlatformAndDeviceIndices 1 0
     
  5. badfitz66

    badfitz66

    Joined:
    Nov 21, 2013
    Posts:
    6
    As explained in my post, I've tried the command arguments. They didn't do anything. No matter which combination of 0 and 1 I use. Editor.log doesn't shed any light on what 'number' my GTX 1060 is.
     
  6. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    Seems related to the opencl.dll bug we have with newer drivers (fix in progress). Meantime can you try deleteting opencl.dll or downgrading your gfx driver to 416.34.