How to build scalable mobile graphics and optimize apps for PowerVR GPUs
Android currently supports a range of CPU and GPU architectures, implemented in different combinations across various chipsets. Scaling the fidelity of mobile graphics to get the most out of the underlying GPU has become a unique selling point when differentiating applications from the crowd.
Because our PowerVR Insider programme is about enabling applications and their developers to succeed, we’ve included a list of useful recommendations for app development and optimization in an article I’ve recently written for Gamasutra. There are a few factors to consider if you wish to ensure your app works across the wide range of mobile devices and gives itself every opportunity to work its way to the top of the app stores.
We’ve seen examples where apps would search for the strings being returned by the GPU driver and assume it would be a lower end core from that GPU family. This essentially meant that the same level of effects and details would be displayed for all platforms based on the lowest common denominator from that family of GPUs.
Think about the rendering potential your app might be missing out on:
- The PowerVR Series5XT MP and Series6 GPU families range anywhere from 5x to 100x in terms of performance compared to a single core Series5 GPU.
- The PowerVR Series5XT cores include an updated Unified Scalable Shader Engine (USSE v2) which extends the feature set and performance of Series5 by doubling the floating point throughput capabilities and increasing the scalability to 8 pipelines.
- The PowerVR Series6 ‘Rogue’ cores are based on our Unified Scalable Cluster (USC), with each cluster integrating up to 16 pipelines and each core scaling up to 8 clusters.
- Imagination’s PowerVR Series5XT and Series6 cores also include memory bandwidth optimizations and power-efficient technologies like advanced texture compression standards (PVRTC and PVRTC2), lossless compression (Series6 only), and a software microkernel that manages all higher level events at the GPU level.
By ignoring all of these improvements and changes in hardware specifications, games are effectively missing out on exploiting huge gains in performance.
A popular FPS running on two very similar devices, but displaying different levels of effects on different operating systems
Use GLBenchmark, device databases, and other online resources to determine relative performance
One way of making sure your app is designed to work correctly across the widest range of devices is to use a databases of devices that is stored either in the cloud or embedded within the application. This database should contain performance numbers for specific devices or computing platforms and could be updated from various websites that publish benchmark results like GLBenchmark.
A selection of GLBenchmark results for PowerVR SGX544MP-based devices like AllWinner A31/A31s, Intel ‘Clover Trail+’, MediaTek MT6589, Renesas MP6530, Samsung Exynos 5 Octa, Texas Instruments OMAP4470
Correctly query the GPU driver and the Android OS
When developing on the Android platform, there are two ways to determine specific characteristics of different devices: by querying the package manager and GPU driver (feature detection) or by checking different members of the Android.os.Build object (device detection).
Offer various performance choices to the end user
If any of the above seems too complicated to implement or requires too much development work, a simple solution is to give the user multiple choices in quality and/or performance. This would create a similar situation to that in the PC gaming market, where certain expectations must be met in terms of educating and guiding users.
Go all out: include micro-benchmarking code in the pre-loading stage
Users expect their applications to run smoothly and efficiently across any of their Android-based devices, be it a smartphone, tablet, smart TV or any other embedded device.
A simple way for developers to ensure their app is optimized to support any combination of CPU and GPU is to include a simple benchmark as part of their preloading sequence. As an example, an application could use our PowerVR Graphics SDK tools to recognise that the Series5/5XT USSE unit is maxed out during the benchmark run, so simpler shaders should be used on the device.
Using PVRScope to find performance spikes and to generate reports on overall performance while an app is executing
Another example is an embedded benchmark like the one inside Epic Citadel which allows developers to get an accurate estimation of any system’s performance. This is due to the way in which some current applications are written, where developers make certain assumptions based on a fixed list of hardware characteristics.
PVRTune can be used during benchmark development
Mobile is a fast evolving, dynamic market
Focusing only a certain Android platform might sound like a good idea at first, especially if a particular company is providing a significant financial incentive to encourage this approach. But in the long run, it is not a sustainable option, especially in a dynamic, fast-paced mobile world where things can change very quickly. Developing for a broad base can ensure longevity for your app.
The best approach is to study the market carefully and understand the advantages of all – or, at the very least, the most popular – hardware GPU and CPU architectures and products. This will help you shape your application in a more robust and flexible way that adheres to a fair and well-documented set of guidelines.