- Home /
Why CPU waits for GPU when there is not much work on GPU?
Hi, I'm running my game on android. However, I get around 30 fps. The main reason of this is that CPU waits for GPU (gfx.WaitForPresentOnGfxThread). What CPU is waiting for is GPUProfiler.EndQueries(35ms). I'm confused about it because GPU takes only 2ms in the frame, so what does CPU actually wait for? To give further information;
-I use multiple barriers with the same game object and I keep instantiating those barriers, together with the ground they are on. I marked them as static and I enabled both static and dynamic batching.
-I enabled multithreading and disabled Vsync
How can I get rid of this GPUProfiler.EndQueries ?
What quality settings are you running the game at? Try lowering them. $$anonymous$$y old 3gb, snapdragon 625 phone had problems with most of the quality settings, I just went with one of the lower ones but increased texture size instead. Baked shadow from single wall was killing half of my performance
I use the lowest quality settings. I disabled shadows and I decreased texture sizes to 256x256. Texture quality is on the eighth res. Anti-aliasing is disabled. Pixel light count is also 0. By the way, my phone is Huawei P20 lite, so it is above the average. I removed all the materials I used, and I get only around 40 fps. WaitForPresent does again account for the majority of the time, although GPU does "no" calculations at all. GPU spends 0 ms.
I guess the max fps for androids are 60, and even in the simplest scene, the profiler displays WaitForPresentOnGfxThread consu$$anonymous$$g a lot of time to keep fps on 60. But then again, why does this delay also occur when the scene is much more complex and fps is around 40 too?
Is it lagging even on newly created project? If not, try disabling light so it is completely dark, also check the shaders used, transparent ones like water often cause problems, also try building the .apk without debugging and see if it is still low fps
Your answer
Follow this Question
Related Questions
weird profiler result? 0 Answers
High GPU Usage Android 0 Answers
How do I draw a background image *fast* (on Android)? 2 Answers