Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Some Helpful Tips For Graphics Analysis and Optimization on Android*

$
0
0

If you’re developing a graphics-intensive application and you’re not satisfied with the performance, read on for what to do to improve it.

Pre-work

The first step to do when analyzing performance is to check whether your application is CPU or GPU bound. You can use Graphics Performance Analyzers (GPA) to do that.

GPA is a tool for graphics analysis and optimization of Microsoft DirectX* applications and Android* OpenGL ES* applications. You can find more about it here: https://software.intel.com/en-us/articles/gpa-which-version.

You can also find a simple intro here: https://software.intel.com/en-us/android/articles/using-the-intel-gpa-system-analyzer-to-improve-android-apps

For purposes of Android optimization I prefer GPA console client. You can read about it here: https://software.intel.com/en-us/android/articles/using-intel-graphics-performance-analyzers-console-client-for-android-application

  • If you discover that your application is GPU bound, continue using GPA.
  • If your application is CPU bound, use Intel® VTune™ Amplifier for Android. You can read more here: https://software.intel.com/en-us/node/496918
  • If your app is CPU and GPU bound, use GPA Platform Analyzer.
     

    How to determine it?

    Check FPS metric. While chacking it go to “state overright” and disable “draw calls”. If you do collect FPS with disable “draw calls” it means that only CPU part is working. So, you have to analyze the difference in FPS befor and after the disabling. For more deep analysis please use GPA Frame Debugger.

Possible Problems and Their Solutions

So, how do you optimize an app that is GPU bound?

Check out the following tips to see if one will help you:

  1. Try to find a GPU module that affects the performance by simplifying the graphics workload using the System Analyzer “State Overrides” feature.
  2. Use the GPA Frame Analyzer tool to deeply analyze the specific frame and check how each draw call affects the performance. You may need to experiment -> learn -> repeat several times to find which draw call is degrading performance.
  3. Compress any large textures in your application. Read more about that here: https://software.intel.com/en-us/android/articles/android-texture-compression
  4. Simplify any complex shaders (the part of an app used to do shading) in your application. Read about shaders here: https://software.intel.com/en-us/articles/efficient-order-independent-transparency-on-android-using-fragment-shader-ordering
    or here: https://software.intel.com/en-us/articles/shadow-mapping-algorithm-for-android
  5. Writing too many pixels to the screen per second is a complex issue. One of the possible ways to improve the graphics performance is to reduce the picture resolution.
  6. Sometimes you have small texture that is reading many times chaotically. It is recommended to limit calls of problematic small textures.
  7. Too many draw calls. To be more cache friendly you need to group draw calls.
     

    The next two pictures demonstrate this idea:
    Non-optimal:

    Cache friendly:

About the Author

Stanislav Pavlov works in the Software & Service Group at Intel Corporation. He has 10+ years of experience in technologies. His main interest is optimization of performance, power consumption, and parallel programming. In his current role as a Senior Application Engineer providing technical support for Intel®-based devices, Stanislav works closely with software developers and SoC architects to help them achieve the best possible performance on Intel® platforms. Stanislav holds a Master's degree in Mathematical Economics from the National Research University Higher School of Economics. He is currently pursuing an MBA in the Moscow Business School.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>