Unity GPU Profiler is a great tool to help developers optimize app’s GPU performance. Now, given that we have even more control of our standalone devices, we can enable Unity’s GPU Profiler on Oculus Quest and Oculus Go thanks to our partners at Unity and Qualcomm.
The feature is available on all Unity versions since 2017.4.30f1 / 2018.4.2f1 / 2019.1.7f1 / 2019.2.0b5 / 2019.3.0a5.
To get started, we recommend that you start by visiting Unity’s profiler overview page. While this article will provide a few quick notes to help you develop for the unique characteristics of our hardware, which can differ from developing traditional PC apps.
Due to profiling overhead, the absolute value of draw call timing is higher than the actual one, which is usually not a big issue on PC hardware. This is especially the case when you have a lot of smaller draws, in turn, we recommend using the number to do relative value comparisons, instead of putting too much attention on the absolute numbers.
Sometimes, you can see some noise in the profiling result, for example, a very simple piece of geometry can show an abnormally high GPU timing sometimes, which are mostly caused by VrRuntime GPU preemptions (Guardian / TimeWarp etc). When developing for Quest and Go, we recommend that you gather several samples and pick the smaller one if that happened, there are chances the collision between your draw call and TimeWarp can be avoided randomly.
Mobile GPUs support dynamic clocking for battery optimization, as a result, GPU performance can be quite different under different clock levels and it will affect profiling results. We suggest you keep an eye on your app’s GPU level to make sure the comparison is apples to apples.
adb logcat -s VrApi
adb shell setprop debug.oculus.gpuLevel 3
This feature is still not available on Gear VR due to legacy graphic driver issues.
Overall, GPU performance optimization can always be a challenge, but without a good profiling tool, it can be much more difficult. We are happy that the Unity GPU Profiler now effectively works with our products, guiding our developers to optimize their app more efficiently, while assuring the delivery of an even better VR game/application.