Optimization Under Palm's 3D hardware

15

description

Chris Tremblay discusses optimizing 3d applications for webOS hardware.

Transcript of Optimization Under Palm's 3D hardware

Page 1: Optimization Under Palm's 3D hardware
Page 2: Optimization Under Palm's 3D hardware

Optimization Under Palm’s 3D Hardware

Christopher TremblayPrincipal Engineer, Graphics &

GamingApril 23, 2010

Page 3: Optimization Under Palm's 3D hardware

Who Should Be Here?

•Hardware specs•3D vs. 2D•OpenGL-ES 1.x vs. 2.x•Feature difference between Pre & Pixi•Desktop emulation story•3D frameworks

Short: If you have on a suit today, you can probably leave.

Source: Data placeholder

Page 4: Optimization Under Palm's 3D hardware

thetheUnder Hood

Page 5: Optimization Under Palm's 3D hardware

Palm® Pre™/Palm Pre Plus

•600MHz ARM Cortex A8•Neon SIMD, VFP, ARMv7

•110MHz Imagination SGX530•256MB RAM (512MB for Plus)•8GB Flash (16GB for Plus)•320x480x24 resolution•Recognizes up to 5 fingers•3-axis (xyz) accelerometer•Wi-Fi 802.11b/g•3.2 megapixel camera

Hardware specs

Page 6: Optimization Under Palm's 3D hardware

Palm® Pixi™/Palm Pixi Plus

•600MhHz Qualcomm MSM7627•VFP, ARMv6

•192MHz Qualcomm Adreno 200•256MB RAM•8GB Flash•320x400x18 resolution•Recognizes up to 5 fingers•3-axis (xyz) accelerometer•Wi-Fi 802.11b/g (Pixi Plus)•2.0 megapixel camera

Hardware specs

Page 7: Optimization Under Palm's 3D hardware

Pre 3D Chip vs. Pixi 3D ChipComparing the details of a GPU core

Units

Source: Palm Inc

1800

1600

1400

1200

1000

800

600

400

200

0ShaderClock

Shaderops/s

MemoryBandwidth

Texture FillRate (nearest)

Texture FillRate (linear)

CPU TransferRate

textImage2Drate

PixelClock

Palm Pre

Palm Pixi

Page 8: Optimization Under Palm's 3D hardware

CPU (SDL)CPU (SDL)

High count of High count of individual blitzindividual blitz

“To Be 2D or Not to Be”When does it make sense to use OpenGL to draw 2D?

Require pixel Require pixel manipulationsmanipulations

Set of sprite Set of sprite orthogonal blitzorthogonal blitz

GPU (OpenGL-ES)GPU (OpenGL-ES)

Need a lot of CPU for Need a lot of CPU for computationscomputations

““Effect” HeavyEffect” Heavy

Fast scalable appFast scalable app

Page 9: Optimization Under Palm's 3D hardware

OpenGL-ES 1.x vs. OpenGL-ES 2.x

1.x1.x

Know nothing about Know nothing about shaders and don’t wantshaders and don’t want

Which API best suits your needs?

Save time vs. writing Save time vs. writing your own shadersyour own shaders

Porting to 1.x is a big Porting to 1.x is a big dealdeal

2.x2.x

Need the flexibility of Need the flexibility of shadersshaders

NPOT texturesNPOT textures

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, <VERSION>);

All future hardware will support All future hardware will support ≥≥ OpenGL-ES 2.x.OpenGL-ES 2.x.

Page 10: Optimization Under Palm's 3D hardware

Pre & Pixi 3D hardware featuresWhat's the difference?

Texture Compression

NPOT Support

VBO vs VBA

Shader Binary

Packed Depth/Stencil

Page 11: Optimization Under Palm's 3D hardware

Desktop SimulationGoal: 0 platform-specific line of code

DeviceDevice

OpenGL OpenGL ES ES

1.1/2.01.1/2.0

DesktopDesktop

PDLPDLSDLSDLC/C++C/C++

Hardware graphicsHardware graphicsHardware graphicsHardware graphics

ApplicationApplication ApplicationApplication

OpenGL OpenGL 3.x3.x PDLPDLSDLSDLC/C++C/C++

GLEEGLEE

Linux KernelLinux KernelWindows/Mac/LinuxWindows/Mac/Linux

ARM CPUARM CPUx86 CPUx86 CPU

Page 12: Optimization Under Palm's 3D hardware

What 3D Frameworks Can Run?Short: Pretty much any…

Unreal Tournament3 Engine (running)

Ogre

Irrlicht

Edgelib

Unity

Page 13: Optimization Under Palm's 3D hardware

developer.palm.com

Page 14: Optimization Under Palm's 3D hardware

&Q A

Page 15: Optimization Under Palm's 3D hardware