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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question [AsyncGPUReadback] huawei Y5 prime, Gfx.RequestAsyncReadbackData takes 35 ms to complete

Discussion in 'General Graphics' started by a122341234155234, Nov 4, 2022.

  1. a122341234155234

    a122341234155234

    Joined:
    Sep 21, 2019
    Posts:
    3
    Hi,

    I'm investigating a perf issue on huawei Y5 prime (dra-al00). I use AsyncGPUReadback.Request to read a small texture of 128*128 from GPU. It surprisingly takes about 35ms to complete the request and meanwhile blocks the render thread. This causes severe framerate dropping (from 30fps to 20fps).

    I have tested the same code on various devices (same tier low end ones, eg. Quad-core CPUs, PowerVR GE8100...). Y5 prime is the only one that has this issue. On other devices, AsyncGPUReadback takes about 3-5ms.

    I also tried to fire the request at a lower frequency, eg, every 4 frames. But it doesn't help, AsyncGPUReadback still takes 35ms every time.

    Any ideas/suggestions to try would be very welcome, or if any Unity employee could explain a little more about AsyncGPUReadback (known issue, limitation?) so I could know what to try next.

    I'm using Unity 2021.3.9f1 LTS.

    Y5 prime spec:
    Android 8.1 (Oreo), EMUI 8
    Mediatek MT6739 (28 nm)
    Quad-core 1.5 GHz Cortex-A53
    PowerVR GE8100
    Note: Intalled 64bit app

    pic1: Y5 prime AsyncGPUReadback on
    upload_2022-11-4_20-20-27.png

    pic2: Y5 prime AsyncGPUReadback off
    upload_2022-11-4_20-21-20.png

    pic3: lm-k200 AsyncGPUReadback on
    lm-k200 spec:
    Android 10
    Qualcomm QM215 Snapdragon 215 (28 nm)
    Quad-core 1.3 GHz Cortex-A53
    Adreno 308
    Note: Intalled 32bit app
    upload_2022-11-4_20-22-25.png

    Thanks
     
    Last edited: Nov 5, 2022
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,622
    Wrong forum, this is a General Graphics post. I'll move your thread.
     
  3. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
  4. a122341234155234

    a122341234155234

    Joined:
    Sep 21, 2019
    Posts:
    3
    Thanks for the reply.

    I think this option (Interaction Mode) is for Editor as the doc says:

    "Specifies how long the Editor can idle before it updates. After one frame finishes, the Editor waits up to the specified amount of time before the next frame begins.

    This allows you to throttle Editor performance, and reduce consumption of CPU resources and power.

    For example, if you want to test the Editor’s performance, set this property to No Throttling. If you want to conserve power (for example, to prolong battery life on a laptop computer), set this property to one of the throttled modes.

    In throttled modes, the Editor stops idling if you interact with it (for example, by panning in the Scene view)."
     
  5. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    560
    It looks like a bug, but might be driver/Android not Unity related.

    Is one OpenGL ES and the other one Vulkan maybe?
     
  6. a122341234155234

    a122341234155234

    Joined:
    Sep 21, 2019
    Posts:
    3
    They both use OpenGLES3. lol