Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Skybox cubemap leak in Unity 2019.3.0f6, HDRP 7.1.8

Discussion in 'High Definition Render Pipeline' started by nfauvet_ubi, Jan 30, 2020.

  1. nfauvet_ubi

    nfauvet_ubi

    Joined:
    Jan 18, 2019
    Posts:
    6
    Hello there,

    We observed what seems to be a leak since the version 2019.3.0f5
    I reproduced it in a minimal scenario in Unity 2019.3.0f6, with HDRP 7.1.8

    TL;DR; Moving a light with an HDRI sky activated leaks skybox cubemaps.

    Steps:

    New scene (one camera, one directional light)
    Add an empty object with a Volume component.
    Create a volume profile
    Override Visual Environment
    Select sky type HDRI Sky

    Play
    Translate the light
    Texture memory is skyrocketting (I stopped at 192GB)
    In the profiler I see a huge leak of SkyboxCubemapConvolution and SkyboxCubemap_256x256_Mips_ARGBHalf
    Each 4.0 MB, seemingly created each frame, and not deleted.

    Hope that helps.
     
    ruudvangaal and SaphiBlue like this.
  2. SaphiBlue

    SaphiBlue

    Joined:
    Apr 18, 2016
    Posts:
    43
    I can confirm this.

    I also observed, the memory leaks does not happen in a standalone build.
     
  3. nfauvet_ubi

    nfauvet_ubi

    Joined:
    Jan 18, 2019
    Posts:
    6
    Thanks for that detail, at least we can build a product useful for more than 20 seconds :)
    I have no doubt that it will be fixed, it is just annoying for the development phase.