Search Unity

Question Profiling texture streaming

Discussion in 'General Graphics' started by AxelHu20, Nov 20, 2020.

  1. AxelHu20

    AxelHu20

    Joined:
    Apr 30, 2020
    Posts:
    6
    Hi,

    I'm currently testing texture streaming on mobile(android/ios), after setting all paras according to the docs, the streaming mipmap seems to be working.

    However, the memory size data from profiler is not accurate(I use wifi to connect to my android phone). The test scene has only one camera and one texture, at the original distance the texture size in memory is a reasonable number, after moving the camera closer/further in the runtime the number goes down to 300+ bytes. The test texture is 2048 * 2048 rgba etc2, I don't think the size of it in memory can go down to 300+ bytes when moving closer.

    So is it an editor profiler bug or I'm not using it correctly?
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,448
    Hi there,
    in case this is still unresolved for you, you might want to raise this in this thread.
     
  3. alexvector

    alexvector

    Joined:
    Oct 9, 2019
    Posts:
    26
    I just found this thread because I was having the same issue trying to profile texture streaming on Android and taking memory captures. All streamed textures appeared to be around 300 bytes regardless of their actual state.

    After more testing I found out that this is related to Vulkan. Forcing the build to use OpenGL, the profiler works as expected and we can see the texture memory vary when mipmaps are loaded.

    The same issue happens on PC if I force Vulkan. The profiler tracks the texture memory correctly with DX11 but not If I do a build with Vulkan.

    There is probably an issue with the way the mipmap streaming is implemented with Vulkan where it does not report the memory correctly to the profiler.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,448
  5. alexvector

    alexvector

    Joined:
    Oct 9, 2019
    Posts:
    26
    I created a sample and reported as case# 1320962.
     
    AxelHu20 and MartinTilo like this.
  6. alexvector

    alexvector

    Joined:
    Oct 9, 2019
    Posts:
    26
    AxelHu20 and MartinTilo like this.