nvperfhud - nvidiadownload.nvidia.com/.../2004/6800_leagues/6800_leagues_nvperfhud.pdfnvperfhud...

10
NVPerfHUD NVPerfHUD Cyril Zeller

Upload: nguyennga

Post on 13-Mar-2018

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

NVPerfHUDNVPerfHUDCyril Zeller

Page 2: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What’s the Goal?

Provide a lightweight tool

to monitor and analyze in real-time the game performance

For a pipelined architecture, performance analysis means

identifying how the various parts of the pipeline

influence the frame rate (bottleneck identification)

Page 3: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What Is It?

A graphic overlay that displays the evolution over time

of basic performance metrics for the game

Image courtesy of FutureMark Corp.

Page 4: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What Is It?

A set of controls to perform basic experiments at any time

Image courtesy of FutureMark Corp.

2x2 Texture replacement2x2 Texture replacement

Page 5: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

How Does It Work?

DirectX Driver

Metrics Values

3D Application

DirectX Runtime

GPU

NVPerfHUDDirectX metrics

through API interception

GPU metricsthrough driver instrumentation

Page 6: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What’s the Overhead?

Overlay graph and API interception can cost up to 1.3%

Driver instrumentation can cost up to 6%

Upper bound for total cost is 7%

Page 7: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What About Security?

Problem: NVPerfHUD could be used by unauthorized third parties

to analyze your application

Solution: To prevent this, NVPerfHUD won’t work by default

with your application unless you’ve modified the application to use

a device that is:

Based on the “NVIDIA NVPerfHUD” adapterThis adapter gets created when the application is started

through NVPerfHUD

And of type D3DDEVTYPE_REFThe application won’t actually used the reference rasterizer

if the “NVIDIA NVPerfHUD” adapter has been selected

Page 8: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What About Security?// Set default settingsAdapterToUse = D3DADAPTER_DEFAULTDeviceType = D3DDEVTYPE_HAL#if SHIPPING_VERSION// When building a shipping version, disable NVPerfHUD (opt-out)#else// Look for the “NVIDIA NVPerfHUD” adapterfor each Adapter

if (Adapter == "NVIDIA NVPerfHUD"){

// If it is present, override the default settings// to enable NVPerfHUD (opt-in)AdapterToUse = adapter;DeviceType = D3DDEVTYPE_REF;break;

}#endifCreateDevice(AdapterToUse, DeviceType)

Page 9: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

Demo

Page 10: NVPerfHUD - Nvidiadownload.nvidia.com/.../2004/6800_Leagues/6800_Leagues_NVPerfHUD.pdfNVPerfHUD DirectX metrics through API interception GPU metrics through driver instrumentation

What’s Next?

NVPerfHUD:Advanced bottleneck analysis

Improved GUI

NVPMAPI:An API to expose driver instrumentation to applications

(VTune, PIX for Windows, game engine, ...)

Learn more at:http://developer.nvidia.com/object/nvperfhud_home.html