Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Feature Request API: How to know if native texture memory is located on the GPU?

Discussion in 'Profiler Previews' started by Peter77, Jan 10, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,517
    The short answer is that you sadly can't.

    There is no unified way to query the hardware to tell you whether an Asset (Texture/Mesh...) is on the VRAM or RAM. Some Platforms/Vendors/Devices might come with API for this but even the presence for these APIs is not a given. So right now, it is just not implemented at all for Unity. Also, the current MemoryProfiler API doesn't capture if an Asset is Read/Write enabled.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    OK cool, thanks for the info!
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,517
    You're welcome :)
    And just to say this, we don't like that we can't tell you whether it is on the vram or not either. we'd like to be able to add this at some point for at least some platforms but... With it being such a scattershot right now, we can't promise anything.
     
    Peter77 likes this.