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

yet another grx.waitforpresent thread

Discussion in 'Editor & General Support' started by UniqueUlysees, Jan 8, 2022.

  1. UniqueUlysees


    Jan 28, 2020
    My game is simple runner with automatic prefab destroying when some distance between camera achieved thus batches and verticies num is almost constant. Anything is constant. When testing long playtime on android i'm getting strong and constant 90 fps. Problem is that after 3-4 minutes of playing GPU rapidly began choking and gfx.waitforpresent value reaches more than 4000 msec. Strange thing is that after i hiding game (returning to mainscreen of phone) and return again to game window i get black screen for about 1-2 seconds and then game continues with 90fps and again.....Can't guess what it can be :( Please help.
  2. MartinTilo


    Unity Technologies

    Aug 16, 2017
    This sounds like thermal throttling to me, i.e. after a while, your phone gets hot and CPU and/or GPU get clocked down to a lower frequency by the OS. To avoid thermal throttling, the chips need to have some time off to cool down since the phone is entirely passively cooled. Each phone is different but the rough guideline is to leave 30-40% of your frame time to idling on each chip. 90 FPS likely doesn't leave enough idle time for cooling down. Maybe a lower frame rate target would fit this phone better.

    Another way besides leaving idle time every frame is to set a lower frame rate target in menu scenes or similar situations where it wouldn't be as noticeable. Besides reducing overall frame rate, which also affects the update loop and the frequency at which input is checked, On Demand Rendering can reduce just the rendering and GPU impact by skipping the drawing of some frames.