PowerVR: Getting Great Graphics Performance with the PowerVR Insider SDK PowerVR Developer Technology Company Overview • Leading silicon, software & cloud IP supplier • • Graphics, video, comms, processor, cloud Licensing and royalty business model • Licensed to many top 20 semis & OEMs • Servicing high volume, high growth markets • Shipped by most major consumer brands • Solution Centric IP Smartphones, media players, tablets/netbooks, TVs/STBs, gaming devices, radios, connected devices, dashboards/navigation • Strategic product division: PURE • • Digital radio, internet connected audio (today) IP business pathfinder, market maker • Established technology powerhouse • • • • 22 Founded 1985; London FTSE 250 (IMG.L) Employees: 1,000+ UK HQ; operations world-wide Global customer base © 2012 Imagination Technologies © Imagination Technologies Ltd. UK Headquarters R&D Sales The PowerVR Insider SDK Overview 3 © 2012 Imagination Technologies What is the PowerVR Insider SDK? Enabling Development • Asset Optimization - Geometry; Textures • Coding - Source code, shader editors, emulation environment PVRGeoPOD & Collada2POD • Deployment PVRTexTool & PVRTexLib - Abstraction layer; example projects • Optimization - Performance analysis; API tracing PVRTrace PVRShaman & PVRUniSCoEditor PVRTune & PVRScope 4 © 2012 Imagination Technologies PVRVFrame What is the PowerVR Insider SDK? Source Code • Training Courses & Demos - Step by step guide - basics to advanced techniques - Same project structure • PVRShell abstraction layer • PVRTools helper library • General graphics knowledge • PowerVR specific optimizations 5 © 2012 Imagination Technologies What is the PowerVR Insider SDK? File Formats & Implementations • Implementation and examples provided in source code • Highly optimized, lightweight deployment formats • Well-documented • POD – Model Format - Meshes, animations - References textures, effects • PVR – Texture Container Format - Newly updated in SDK 2.10 - Cube maps, normal maps, volume textures, meta-data - OpenGL, OpenGL ES, DirectX formats • PFX – Effects format - Vertex & fragment shaders - References textures, uniforms, attributes - Render to texture support; post-processing 6 © 2012 Imagination Technologies Utilities Asset Optimization 7 © 2012 Imagination Technologies PVRGeoPOD & Collada2POD • PVRGeoPOD - POD exporter plug-in for 3D Studio Max, Maya and Blender • Collada2POD - Provides conversion from the Khronos Collada interchange format to POD - GUI and command line versions - Windows, Linux and Mac OS 8 © 2012 Imagination Technologies PVRTexTool & PVRTexLib • Processes and compresses textures - All OpenGL ES (1.x, 2.0), DirectX (9, 10) - Normal map generation, colour bleeding, border addition, high quality scaling algorithms and sky box optimization - Support for PVRTC, PVRTC2 • Command line and GUI • Plug-in for Adobe Photoshop • PVRTexLib - library for direct integration into toolchains 9 © 2012 Imagination Technologies PVRTC & PVRTC2 Texture Compression • What is PVRTC? - High quality, high ratio texture compression format, designed for PowerVR hardware - PVRTC and PVRTC2 both support: - 4 bits per pixel RGBA; 8x saving - 2 bits per pixel RGBA; 16x saving • PVRTC2 - better image quality, pre-multiplied alpha, NPOT sizes, sub-texturing 10 © 2012 Imagination Technologies Original 32bpp PVRTC 4bpp DXT/S3TC 4bpp PVRTC 2bpp PVRShaman • Integrated visual shader development environment - See visual results of changes - Instant feedback on shader cost • Prototype entire scenes & characters - POD models or import Collada files - Material editing • Integrated PVRUniSCoEditor & compiler • DirectX, OpenGL and OpenGL ES (1.1 & 2.0) support 11 © 2012 Imagination Technologies PVRUniSCo & PVRUniSCoEditor • PVRUniSCoEditor Shader Editor - Integrated shader performance information - Error reporting • PVRUniSCo - Offline command-line compiler - Profile your shaders • Updated compilers - SGX 53x - SGX 540 - SGX 543 12 © 2012 Imagination Technologies PVRVFrame • PowerVR OpenGL ES emulator - OpenGL ES (1.1 & 2.0) emulation on Windows, Linux and Mac OS • PVRVFrame features - Develop and debug without PowerVR hardware - Supports all MBX and SGX extensions - Choose a profile for a specific core 13 © 2012 Imagination Technologies Performance PVRTrace 14 © 2012 Imagination Technologies PVRTrace Overview 15 © 2012 Imagination Technologies PVRTrace Features • Trace any application - No need for special builds • Trace on multiple device platforms - Android - Linux - PVRVFrame Emulation • Analyse with desktop GUI - Windows, Linux, Mac OS 16 © 2012 Imagination Technologies PVRTrace Configuration • Host Information - PVRTrace needs to pass calls through to the underlying system Path to Driver libraries PVRTrace.cfg [host] • Recording Information - What to record - Where to put output EglLibraryPath = %SYSTEMDIR%\libEGL.dll Es1LibraryPath = %SYSTEMDIR%\libGLES_CM.dll Es2LibraryPath = %SYSTEMDIR%\libGLESv2.dll [record] - Texture and buffer data is recorded if “RecordData” is 1 TraceFile = trace-%pid.pvrt RecordData = 1 StartFrame = 0 EndFrame = 1 - TraceFile must be set to a writeable location • Please read the doc!!! 17 © 2012 Imagination Technologies Where to put output What to record Analysis Interface Frame Summary & Function Counts Frame Scrubber Render States, Textures, Shaders 18 © 2012 Imagination Technologies Data Viewer Function Calls Frame Selector Performance PVRTune & PVRScope 19 © 2012 Imagination Technologies PVRTune Overview • Client and Server applications - PVRPerfServer on device - PVRTune on development machine • Typical Use Case 1. Run PVRPerfServer application on device - PVRScopeServices must be enabled on the device 2. Run application to be analysed 3. Connect with PVRTune client from development machine 20 © 2012 Imagination Technologies PVRPerfServer • Server application that gathers data to be analysed by PVRTune - Runs from command line or application menu - Waits for client connection then sends data across standard network connection - Can also record data to file for later analysis • Enabled by default in many, already shipping devices - Negligible graphics performance overhead - Low CPU usage • PVRTune and PVRPerfServer version numbers should match 21 © 2012 Imagination Technologies PVRTune Analysis Interface Hardware Counter Groups TA/3D load visualisation Hardware Performance Counters Graph views Connection Status 22 © 2012 Imagination Technologies TA/3D Colours Transfer Tasks (Always appear grey) Block colour indicates frame 3D Inside colours indicate render target TA 23 © 2012 Imagination Technologies Outside colours indicate PID Counters Select current counter group • Software Columns can be user selected • Hardware • Real-time data collection - Counters retrieved as the application is rendering • Counters grouped by association Dynamically updating values Specific counters can be dragged from here to graph view - Click group number to activate - Inactive counters greyed out Axis per counter Description of current counter 24 © 2012 Imagination Technologies Select colour and y-axis for graphing CPU Bound Application Case Study • SGX is waiting for the CPU - Likely to be indicated by gaps between TA and 3D activity blocks CPU may be at or near 100% • Example causes - “Stalling” operation required by CPU - CPU must process and submit draw calls - CPU may simply not be keeping up • Example developer actions - CPU-profiling and optimizations - Better batching of draw calls - Examine API calls for “stalling” operations and reduce these 25 © 2012 Imagination Technologies Gaps between TA and 3D tasks Vertex Bound Application Case Study • The amount of vertex processing is limiting application frame rate “USSE load: vertex” and “TA load” may be high • Example counters to examine: - ‘USSE clock cycles per vertex’ ‘USSE load: vertex’ ‘on-screen vertices per frame’ ‘TA load’ ‘ISP load’ • Example developer actions - Optimize vertex shaders - Reduce number of vertices passed to SGX by using more CPU culling, level of detail algorithms or low-poly, bumpmapping techniques 26 © 2012 Imagination Technologies Gaps between 3D tasks No gaps between TA tasks Pixel/Fragment Bound Application Case Study • Fragment processing is limiting frame rate • Example counters to examine: “USSE load: pixel” and “USSE clock cycles per pixel” may be high - “USSE clock cycles per pixel” - “USSE load: pixel” - “texture unit(s) load” • Example developer actions - Optimize pixel shaders - Examine how much blending or alpha testing is in the scene - Examine textures - Texture formats (PVRTC vs. uncompressed) - MIP-map use - Filtering modes 27 © 2012 Imagination Technologies No gaps between 3D tasks Large gaps between TA tasks V-Sync Limited Application • Easy to spot TA & 3D serialised • TA and 3D blocks will appear serialised. • SGX sleeps intermittently • Frame rate will appear to sit at a cap. • V-Sync makes profiling hard - Interferes with bottleneck identification - Disable V-Sync if you can 28 © 2012 Imagination Technologies Frame rate hovering around a fixed number. SGX sleeping unpredictably Bandwidth Limited Application • Most difficult bottleneck to spot - Fragment bound but low USSE Load: Pixel - Vertex bound but low USSE Load: Vertex - High TSP Load • In SoCs bandwidth is shared among the whole system. • Example developer actions - Use texture compression - Avoid unnecessary texture reads – read once and reuse - Especially dependent texture reads - Optimize meshes - Consider using non-float data types • Always assume bandwidth is limited 29 © 2012 Imagination Technologies PVRScope Library • In your own applications: - Access SGX hardware counters - Pass custom counters to PVRTune - Receive data from PVRTune 30 © 2012 Imagination Technologies PowerVR Insider SDK Summary • Source Code - Example Projects - Training Courses - Demos - Abstraction Layer - PVRShell - Helper Library - PVRTools • Asset Optimisation - Geometry - PVRGeoPOD & Collada2POD - Textures - PVRTexTool & PVRTexLib • Prototyping - Shaders - PVRShaman - PVRUniSCo & PVRUniSCoEditor - Emulation - PVRVFrame • Performance - API tracing - PVRTrace - Real time, hardware counters - PVRTune - PVRScope • And more: • Documentation, example renderer, navigation data tools… 31 © 2012 Imagination Technologies PowerVR Insider Program • http://www.powervrinsider.com Email/Tel Support Website • Free to join FAQs Knowledge Base • Benefits of being a PowerVR Insider Forums Eco System Blogs/ Social Media Training SDK Virtual Demo Room Developer Days - PowerVR Insider SDK downloads - Open developer forums - Direct email contact with engineers from PowerVR Developer Technology - [email protected] - Documentation - FAQs - Training (web based and onsite) • PowerVR: Masterclass in Graphics Technology and Optimization - Tomorrow 2:30-3:30 - Room 2014, West Hall, 2nd Floor • See you there 32 © 2012 Imagination Technologies
© Copyright 2024 ExpyDoc