| |

Tips and Tricks for Imagination Processors

October 15, 2013, Imagination Developers Connection, San Francisco—To help designers make better software designs, here are some golden rules. The main idea is to reduce bottlenecks to reduce CPU loading, minimize internal bandwidth, and keep the CPU and GPU in sync.

Understand the target devices and any changes in the internal structures within the SoC.

Don’t waste GPU time, but be satisfied with a good enough implementation. For example, watch the total polygon count to keep from over doing the rendering. Determine a suitable texture resolution, because you don’t need full resolution for the background, or other areas outside of the main activity. Work to simplify shader complexity.

Promote calculations up the chain. Try to do calculations early and avoid unnecessary calculations. If a scene only needs one calculation, just do it once. If it needs it more than once, try to calculate once per vertex. Some computations can be done off line, at compile for instance.

Don’t access an active render target, because this access causes serialization and thrashing. One solution is to put the render target into a frame buffer, or use other latency periods for the access.

Avoid accessing the buffers. Usually completion is needed before the buffer can be used. The problem is that the data are in flight, so it is hard to determine when the data are stable. One solution is to use a circular buffer to hold the contents for completion. The problem is that the additional buffer space costs extra memory.

Use vertex buffers and indexed geometries to reduce duplication. For static geometries, use static buffers and just sort the geometry vertices and index buffers. These capabilities differ in the series 5 and series 6 processors, so be aware of the differences and which processor you are targeting.

Batch draw calls. Group the static objects and draw them once. Sort objects by render state and focus on textures and program state changes.

Compress the textures. Change from file compression like JPG and move to better compression algorithms that can get down to 2 bits per pixel.

Avoid alpha test and discards. The alpha test negates the hidden surface elimination efforts. A better preference is to go for a blending render order of opaque, alpha test, and blended.

Avoid frame buffer transfers. This is a high-bandwidth, compute intensive process that can be replaced with many small reused tile buffers. In addition, tell the GPU what you don’t need and clear everything at the start of a frame. Discard or invalidate everything at the end of the frame.

Adding profiling and debugging tools for trace and tune will help to identify the areas where these techniques can be applied.

Similar Posts