Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

enable_d3d11_debug_symbols adds 10GB of pressure on memory RAM: impossible to debug

Discussion in 'Universal Render Pipeline' started by sebas77, Jun 25, 2020.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,214
    I wanted to profile some shaders with the symbols on our min specs machine, but it's absolutely impossible, as it has 4GB only and once the feature is on, it adds 10GB of extra memory on top.

    I don't know anymore why I write these posts in the forum, since I rarely get any feedback, but I hope this won't pass unnoticed.
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,158
    Are you enabling this globally or just for the shaders you want to debug / profile?
     
    sebas77 likes this.
  3. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,214
    is there a way to enable it globally? It's just for my shader, but it's used on 90% of the game (a lot of variances)
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,158
    It seems really odd that a single shader is generating 10gb of debug symbols.. how many variants are you using? This 'feature' is literally just telling the shader compiler to include debug info - so it scales with what is included in the build.

    At a guess: you are only experiencing this in the player and not the editor? Would you be able to post your shader so I can take a look at how you have configured your keywords?
     
  5. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,214
    If you download the project from this bug report: https://fogbugz.unity3d.com/default.asp?1258493_duj4uk9c2a7finjt

    a follow these steps, you will be able to repro it:

    Open the project, open the addressable window (window -> asset management -> addressable). Keep it open because, otherwise, it could affect the success of the built (no clue why, but some times the build fails if it's closed)
    go to Build -> Open Build Window -> Windows 64 - profile

    run the game, once you get to the main menu, check the amount of ram used with task manager or whatever.

    Close it, open the file s_gamecraft.shader, uncomment the
    #pragma enable_d3d11_debug_symbols

    build again and check the memory now.

    I noticed that once that pragma is enabled, this file is huge:

    upload_2020-6-25_23-20-50.png

    normally it is:

    upload_2020-6-25_23-21-1.png

    so yeah, I suspect that if you just try the shader, you may not be able to repro it. It may be something in combination to the addressable too.
     
    Last edited: Jun 25, 2020
  6. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,214
    @Tim-C let me know if you want me to open a bug report. IT may be simpler. I'll do it in case I won't get a reply as well.
     
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,158
    Yes please do :)
     
    sebas77 likes this.
unityunity