Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feature Request Absent Profiler Memory module category 'Shaders'

Discussion in 'Profiler Previews' started by JesOb, Jun 9, 2021.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    With Uber shaders in SRP shaders can use as much as 600MB of memory and we can not see any info in profiler module about this category.

    Correctly stripping shaders is hard task and having high level view on how much MB taken by shaders can help a lot

    Please add shaders memory budget :)
     
    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Hi! Thanks for the request!
    To clarify - are you thinking of per variant breakdown for a particular shader? Could you expand what would make it more actionable for you?

    For context - we've improved recently shader memory tracking by correctly showing per shader memory in memory profiler(s) (available and backported - 2021.2.0a2, 2021.1.0b3, 2020.2.3f1 and 2019.4.20f1).
     

    Attached Files:

  3. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Hi

    We are working on latest 2020.3 build with URP so have everything you mentioned :)
    Few years ago I have never thought so shaders itself can consume a lot of memory and high level chart without shaders in it was ok:
    Screenshot_17.png

    But today with URP it is not the case and now wee need high level info to see it ASAP because shaders can take most amount of memory bundget:
    Screenshot_16.png

    Dont have screen of unfolded shaders section but there is 3 URP/Lit shaders 96 MB each

    So just to know we have bad shaders memory consumption in project - shaders category in top image can be very usable.

    To somehow know why we have so much memory consumed by shaders, why all this shader variants actually loaded into memory, what shader variants actually compiled into build there will be very good to have by shader variant breakdown in detailed view.

    P.S.: Android player dont know it shader memory concumption at all, unity treat shader memory as some external allocated. Only iOS player can show actual shader consumption for now.
     
    alexeyzakharov likes this.
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,460
    Thanks for that feedback, adding Shader memory to the list of top level counters sounds like a good idea we'll explore. just gonna have to double check if none of that memory would already be (partially) covered by Graphics memory if we want to use it in the new breakdown bar UI.
     
    JesOb likes this.