PowerVR Graphics SDK tools explained: PVRTraceGUI basics

PVRTraceGUI makes OpenGL ES debugging easy. In this post, I’ll detail the core features of the tool and explain how they can be used to optimize and debug the API calls made by your application.

The Call List

PVRTrace

The ‘Call List’ is the core of PVRTraceGUI – it allows you to see how the graphics API was used during recording. The buttons along the top of this widget allow you to collapse the view to draw calls only, configure and apply a filter to hide specific calls, or search for a call name, parameter value or any other string tracked by the tool. Right click options allow you to quickly apply a filter or highlight to the selected call, or open the documentation for the function in your web browser.

PVRTrace_CallView

Frame Statistics

This widget gives a high-level overview of how much data has been submitted to the graphics driver in the selected frame. ‘Frame Summary’ shows the number of triangles, texture uploads, etc. that have been submitted, and the ‘Calls Summary’ lists the number of API calls that have been made (from most called to least called).

PVRTrace_Statistics

This data makes it easy to identify calls that are erroneously made too often (for example, redundantly calling glGetError() hundreds of times per-frame in release builds).

States

PVRTrace_States States -> State

This tab shows the active renderstate for the currently selected function. Red text indicates that the renderstate has changed since the previous draw call.

Paired with stepping through draw calls in the ‘Image Analysis’ window, the data in this tab makes the process of hunting down incorrect bindings (textures, FBOs, VBOs etc.) and states trivial.

States -> Textures

This tab lists all textures that were captured during recording. Each texture is paired with a thumbnail preview and some information about it, such as resolution, texture format, etc. Clicking on a texture gives it focus in the ‘Data Viewer’ widget.

States ->Shaders

All captured shaders are listed by the shader program they are used in. Clicking on a shader gives it focus in the ‘Data Viewer’ widget.

Data Viewer

PVRTrace_DataViewer

The ‘Data Viewer’ allows you to inspect captured data, such as textures and shaders. The Shaders tab integrates PVRShaderEditor for full syntax highlighting and per-line cycle count estimates.

The ‘Pixel Analysis’ tab displays stats and graphs that highlight the most expensive shaders in your render so you know exactly where you should focus your optimization (I’ll cover this in more detail in the next post).

Image Analysis

PVRTrace_ImageAnalysis

This widget allows you to play back entire frames, ranges of draw calls or individual draws. The frame scrubber in the bottom-right hand corner of PVRTraceGUI allows you to step or jump between recorded frames.

The drop-down box at the top-left of the widget changes the rendering mode. Available modes are: Normal (standard render), Wireframe, Wireframe (No Shaders), Depth Complexity, PowerVR Depth Complexity (estimation of the GPUs Hidden Surface Removal) and Pixel Heatmap (green-to-red render of the scene to highlight the most costly fragment shaders).

Tools

And, finally, we have the Tools widget which includes ‘Search’ results, ‘Output’ (PVRTrace’s log) and ‘Trace Modifications’.

PVRTrace_Tools

Trace Modifications is particularly interesting – the tab lists any changes you’ve made to the original recording, such as any calls you have disabled or any shaders you have modified. The functionality here is quite extensive, so I’ll cover it in a later post.

Conclusion

This concludes my swift overview of PVRTraceGUI. Please checkout the tool here if you haven’t already done so, contact us on our forum if you have any questions and follow us on Twitter (@ImaginationPR and @PowerVRInsider) to stay in the news on the latest releases from PowerVR and the Developer Technology team.

, , , ,