Using the PowerVR SDK to Optimize your...

68
© Imagination Technologies p1 www.imgtec.com March, 2013 Using the PowerVR SDK to Optimize your Renderer

Transcript of Using the PowerVR SDK to Optimize your...

Page 1: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p1 www.imgtec.com

March, 2013

Using the PowerVR SDK to Optimize your Renderer

Page 2: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p2 www.imgtec.com

First, an Introduction

Page 3: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p3

Who are we?

Who?

Joe Davis, Developer Technology Engineer

Bob Gardner, Developer Technology Engineer

Both from Imagination Technologies

Page 4: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p4

Who are Imagination?

Leading silicon, software & cloud IP supplier

Multimedia: graphics; GPU compute; video; vision

Communications: demodulation; connectivity; sensors

Processors: applications CPUs; embedded MCUs

Cloud: device and user management; services

Targeting high volume, high growth markets

Top semis and OEMs for mobile, connected home consumer

automotive and more

Pure: our strategic product division

Digital radio, internet connected audio, home automation

Established technology powerhouse

Founded 1985; London FTSE 250 (IMG.L); ~1,500 employees

UK HQ; global operations

Comprehensive IP

portfolio for SoCs

& cloud connectivity

IP business pathfinder

Market maker/driver

Page 5: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p5 www.imgtec.com

What’s the Focus?

Page 6: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p6

The Focus

Optimisation Tools Stability, functionality and GUI of PVRTune and PVRTrace

+

A Live Demo of the new features

Page 7: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p7

The Focus

But First…

Page 8: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p8 www.imgtec.com

What is the PowerVR SDK?

Page 9: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p9

What is the PowerVR Insider SDK?

Asset creation Development Debugging and profiling

+ PVRTexTool

PVRGeoPOD

+ PVRVFrame

PVRShaman

PVRShaderEditor

+ PVRTune

PVRTrace

PVRScope

Page 10: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p10

What is the PowerVR Insider SDK?

Assists in rapid application development, debugging, and performance analysis

Educational resource for embedded graphics techniques

Develop on…

Develop for…

Windows OSX Linux

Windows OSX Linux BB10 iOS Android

Page 11: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p11 www.imgtec.com

Asset Optimization

Utilities

Page 12: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p12

PVRGeoPOD

Geometry exporter and optimizer

Provided as…

Plug-in (Blender, Maya and 3D Studio)

Standalone GUI

Standalone command-line tool

Features

Triangle sorting

Vertex sorting

Data stripping

Page 13: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p13

What is POD?

POD is the PowerVR Object Data format

Optimized deployment format for 3D geometry and animation with a public specification

De facto standard format used in successful AAA mobile games

Minigore 2: Zombies Bike Baron

Page 14: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p14

Shout out to Mountain

Sheep for the awesome

screenshots

Page 15: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p15

PVRTexTool

Texture compressor and converter

Provided as…

Stand-alone GUI & Command-line tool

PVRTexLib

Photoshop plugin

Features

Support for all core file formats for OpenGL

ES 1.x/2.0/3.0 as well as DirectX 9/10/11

Primary tool for converting to PVRTC

Page 16: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p16

What is PVRTC?

What is PVRTC?

High quality, high ratio texture compression format,

designed for PowerVR hardware

Lowest, widely available, bitrate of any texture

compression format

Two variations

4 bits and 2bits per pixel

Both variations support alpha channels

Stored in .PVR files by default

Public file format specification

Page 17: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p17 www.imgtec.com

Development

Utilities

Page 18: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p18

PVRShaderEditor

Syntax highlighted shader & kernel editor

Also useful for shader verification and profiling

Provided as…

Stand-alone GUI

Features

Error output for PowerVR hardware

Profiling with overall and per line cycle counts for

GLSL ES

Page 19: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p19

GLSL Profiling Compilers

Provided as…

Command-line tool

Exposes GLSL ES shader profiling information

Estimated per-line & total cycle counts

Compiler provided for every family of PowerVR GPU

Note: Profiling compilers don’t generate binaries

Disassembly compilers available under NDA

Built in to PVRShaderEditor

Page 20: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p20

PVRShaman

Shader Development Environment

Provided as…

Stand-alone GUI

Features

Integrated PVRShaderEditor & Profiler

Works with POD scenes and can import Collada

files

Immediate scene visualisation

Support for OpenGL and OpenGL ES graphics

APIs.

Page 21: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p21

PVRVFrame

PowerVR OpenGL ES emulator

Supports ES 1.1, 2.0, 3.0

Provided as…

Dynamic library, with control GUI

Features

IMG extensions

Hardware profiles

Debugging output

Page 22: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p22 www.imgtec.com

Debugging and Profiling

Utilities

Page 23: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p23

PVRTrace

OpenGL ES API Tracer

Provided as…

Analysis GUI with Recording Libraries and Control

APK

Features:

Records GL Calls, data, and render state for any

number of frames

Playback whole traces, frames, ranges of calls, or

single calls

Edit traces, and playback the newly edited traces on

device

Page 24: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p24

PVRTune

PowerVR GPU Performance Analyser

Provided as…

Analysis GUI with Server on device

Features:

Real-time hardware data using hardware level

registers and counter

Negligible impact on performance

Counters are enabled by default on most devices

No special builds of application required to do

performance analysis

Page 25: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p25

PVRScope

Interface to the performance analysis stats

found in PowerVR hardware

Provided as…

Static library

Features

Provides access in any application to

PVRTunes statistics

OR:

Can be used to send custom counters &

custom markers to PVRTune

Page 26: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p26 www.imgtec.com

Source Code

Page 27: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p27

PVRShell

Graphics-focused OS abstraction framework

Allows application development without worrying

about the platform underneath

Enables quick and easy application porting with

a consistent implementation across each API

and OS

Supports all PowerVR platform configurations

Page 28: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p28

PVRTools

Tackles common functionality required during

graphics development

Texture, model and shader runtimes

Vector, matrix, and Quaternion maths

3D text display functions

Extension retrieval

Etc.

Cross platform tools library

Tested to work on all PowerVR platforms

Consistent implementation across APIs

Page 29: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p29

Examples

Step by step guide from the basics of computer

graphics to advanced effects tailored for mobile

devices

PVRShell and PVRTools used consistently

across all the examples

Same examples across all APIs (OpenGL,

OGLES 1.1, 2.0 and 3.0)

Page 30: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p30

Documentation

Wide range of documentation to support

development

Architecture Guide

Performance recommendations

User Manuals

Etc.

Whitepapers for specific technologies &

techniques

Water effects

UI Render

Etc.

Page 31: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p31 www.imgtec.com

What’s New in SDK 3.1

Page 32: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p32

Just A Reminder

Focus on Optimisation Tools Stability, functionality and GUI of PVRTune and PVRTrace

Page 33: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p33 www.imgtec.com

PVRTune

Page 34: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p34

Initial Rogue Support

Initial Series6 support

Series6 specific counters

Series6 specific timing data

Timing data colouration coming soon

Also includes better compute support

Page 35: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p35

Render State Override

PVRTune now includes render state

override capability

See the effect on performance, in real

time of disabling and changing various

states.

Makes it much easier to test hypotheses

quickly

Even more so if you’re using PVRScope to

remotely edit your app

Page 36: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p36

Improved GUI

SDK 3.0 ported all our applications to Qt

SDK 3.1 includes considerable GUI improvements

Improved counter description panel

Improved group selection

Improved state saving

Many more

Page 37: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p37

Improved Counter Descriptions

… they will tell you:

What the counter represents

What a high value of the counter means

How you can try to solve the problem

Page 38: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p38 www.imgtec.com

PVRTrace

Page 39: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p39

OpenGL ES 3.0 Tracing

SDK 3.0 allowed ES 3.0 recording but

could only display the call list

SDK 3.1 now includes full functionality

for ES 3.0

…and any IMG extensions

Page 40: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p40

Pixel Picker

User can select a pixel from the Image

Analysis panel

See what shaders affected that pixel

Double click a shader to open it in the

shaders tab

…then edit it…more on this later

Page 41: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p41

Shader Analysis

Displays the following for the current frame:

Fragment Cost

Num. times shader is ran * cycle count of shader returned by profiling compiler

Fragment Count

Num. times shader is ran

Fragment Texture Reads

Num. times shader is ran * num. texture reads

Page 42: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p42

Editing & Splitting

Trace files can be edited & saved

Shaders changed

Calls disabled

Quickly see if something fixes a bug

before committing a change

Trace files can be split

Save sub-sections of traces

Useful for repeatedly playing back or

examining traces

Page 43: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p43

Playback

Play a trace file, even one that has been edited

Record calls on one platform, play them back on another

Change things in the PVRTrace GUI, play them back on platform

Identify problems, find solutions, test them, all without having to touch your code

First public iteration

Find it in the PVRTrace package in the SDK

Page 44: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p44

Time for a demo

Let’s see how it all works

Page 45: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p45 www.imgtec.com

Using PVRTune – A Practical Approach

Page 46: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p46

What is PVRTune?

PowerVR GPU Performance Analyser

Provided as…

Analysis GUI with Server on device

Features:

Real-time hardware data using hardware level

registers and counter

Negligible impact in performance

Counters are enabled by default on most devices

No special builds of application required to do

performance analysis

Page 47: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p47

Installing & Running PVRTune

Install the PVRPerfServer

adb install

PVRPerfServerDeveloper.apk

Using ADB on Android

Forward the 6520 port

adb forward tcp:6520 tcp:6520

Run PVRTune

Connect to ‘localhost’

Page 48: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p48

The PVRTune GUI What does it all mean?

Counter List

Renderstate

Override

Counter

Description

Remote

Editor

Active Counter List

Counter Graphs

Timing Data

Page 49: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p49 www.imgtec.com

The Five Basic Bottlenecks

Reading PVRTune

Page 50: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p50

Identifying Bottlenecks

Bottlenecks usually fall into one of five categories:

CPU limited,

Vertex limited,

V-Sync limited,

Fragment limited, or

Bandwidth limited.

We’ll show you how to spot these

For everything else…

A.K.A. Why is my application running so slow?

Page 51: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p51

Identifying Bottlenecks

…read the counter descriptions…

A.K.A. Why is my application running so slow?

Page 52: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p52

Identifying Bottlenecks

… they will tell you:

What the counter represents

What a high value of the counter means

How you can try to solve the problem

A.K.A. Why is my application running so slow?

Page 53: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p53

CPU Limited

Gaps between TA & 3D Blocks

Gaps in the USSE Load

One or more

CPUs at max

load

Page 54: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p54

Vertex Limited

High TA Load

Very little gap between TA Tasks

Gaps between

3D tasks

High USSE Load: Vertex

Page 55: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p55

Fragment Limited

High USSE Load: Pixel

Very large gaps between TA Tasks

No gaps

between 3D

tasks

High USSE clock cycles per pixel

Page 56: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p56

Bandwidth Limited

No direct way for PVRTune to show bandwidth information

Will often appear as other bottlenecks but with illogical data

There are two main giveaways that you are bandwidth limited:

‘TA/3D’ shows the application to be fragment limited but the ‘USSE Load: Pixel’ is low

‘TA/3D’ shows the application to be vertex limited but the ‘USSE Load: Vertex’ and ‘TA load’

are low

As a rule of thumb, whenever possible, optimise for bandwidth usage

Page 57: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p57

V-Sync Limited

Easy to determine…you’ll probably have turned it on

If you haven’t, look out for the following:

GPU goes to sleep intermittently

Frame rate hovers around a set number

Turn it off to profile, or it’ll add noise to your readings

Page 58: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p58 www.imgtec.com

Using PVRTrace – A Practical Approach

Page 59: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p59

What is PVRTrace?

OpenGL ES API Tracer

Provided as…

Analysis GUI with Recording Libraries and Control

APK

Features:

Records GL Calls, data, and render state for any

number of frames

Playback whole traces, frames, ranges of calls, or

single calls

Edit traces, and playback the newly edited traces on

device

Page 60: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p60

Installing & Running PVRTrace

Install the PVRTrace Installer

adb install PVRTraceApp.apk

Using ADB on Android on a rooted device

Install the recording libraries

Set up the recording libraries

Trace the application

Page 61: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p61

The PVRTune GUI What does it all mean?

Call Summary &

Frame Summary

Trace modification

information, search

output, emulator

output

Render state

information Pixel Analysis

Texture Viewer

and Shader

Viewer

Image Analysis

& Playback

Function Call List

Frame Scrubber

Page 62: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p62 www.imgtec.com

Using PVRTrace – Without Root

Page 63: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p63

Tracing without Root on Android

It is possible to run PVRTrace without rooting the device

1. Tell the Native Activity to

load the recording libraries

2. Tell the Android.mk to point

to the correct libraries

3. Perform an NDK Build then copy the recording libraries to

‘<build_output>/libs/armeabi-v7a/’

Page 64: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p64

Tracing without Root on Android

4. Install your application

5. Create ‘pvrtrace.cfg’ in the root of /sdcard

6. Make sure ‘pvrtrace.cfg’ points to the Android

‘shim’ drivers, not the actual drivers

7. Run the application, and analyse the trace

pvrtrace.cfg example:

Page 65: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p65 www.imgtec.com

March, 2013

Getting the SDK

Page 66: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p66

Download it now! How to get it?

http://bit.ly/PVR_SDK

Download the installer

Next, next, next…

Done!

Or grab a DVD

Booth 512

We also have T-Shirts

Page 67: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p67

PowerVR Insider

http://bit.ly/PVR_SDK

Benefits of being a PowerVR Insider

PowerVR Insider SDK downloads

Open developer forums

Email support from our Dev. Tech. team

[email protected]

Documentation & FAQs

Training (web based, our site, or your site)

Early access

NDA only tools (on request)

Page 68: Using the PowerVR SDK to Optimize your Renderercdn.imgtec.com/...UsingThePowerVRSDKToOptimizeYourRenderer.pdf · Using the PowerVR SDK to Optimize your Renderer ... Windows OSX Linux

© Imagination Technologies p68 www.imgtec.com

March, 2013

What’s New in SDK 3.1