Search Unity

Texture Upalods not using the Async Upload Pipeline

Discussion in 'General Graphics' started by Lucas_TDF, May 18, 2022.

  1. Lucas_TDF

    Lucas_TDF

    Joined:
    Apr 4, 2022
    Posts:
    9
    Hi,

    I'm investigating a perf issue in our mobile game (Unity 2019.4) where we are experiencing some stuttering during gameplay. After checking the profiler, I can see that this is caused by the GPU being blocked on 3 Texture Uploads (Gfx.UploadTextureData).

    After reading the doc, I saw that Texture Uploads should automatically go through the Async Upload Pipeline for elligible textures but I dont see any call to AsyncUploadManager.AsyncResourceUpload. It seems like my textures are going through the synchronous upload pipeline, thus blocking the CPU and causing stuttering.

    The textures in question are just Albedo Maps with the following settings (Android):
    * Resize Algo: Mitchell
    * Format: RGB(A) Compressed ASTC 10x10 block
    * Compressor Quality: Normal

    I've also checked and the Compression Method is set to LZ4 in our Build Settings.

    So I have two questions:
    * Why isnt the AsyncUploadManager kicking in and uploading the Texture asynchronously
    * How come a 16mb texture upload takes 166ms on a modern GPU (RTX3060)

    One thing I've noticed after building the game is that I dont see any .resS files being produced while the doc seemed to mention that those files are mandatory for the AsyncUploadPipeline, I dont know why there are not here.

    Finaly, I'm seeing this behavior while testing in the Editor, I unfortunately cant test on device atm but will do asap and report if I'm seeing the same behavior.

    Thanks a lot for your help!
     

    Attached Files:

  2. Lucas_TDF

    Lucas_TDF

    Joined:
    Apr 4, 2022
    Posts:
    9
    Bump,
    anyone has an idea?
    thanks.
     
  3. BartekGugulskiBaltoro

    BartekGugulskiBaltoro

    Joined:
    Nov 25, 2020
    Posts:
    19
    According to this article, AUP is used when read/write option in texture import settings is disabled, the synchronous one is when it is enabled, so you might want to check that out.