perf-sync

Description

This program shows a simple method to measure drawing performance per model included in an entire frame that consists of many models. To measure performance for rendering a target, first you should know when the graphics processor starts/finishes rendering the target. Since the CPU and GP are processing data asynchronously, you should use a synchronization mechanism like the GXDrawDone function to discern the timing.

If your target contains some objects, and if you want to measure performance for each object, using a draw-sync callback (GXSetDrawSyncCallback) is a simple solution. This demo assigns a different token to each model, and detects the change of current token by using a draw-sync callback. The callback routine keeps track of current GP performance metric values, which is considered as lap-time per object. In this demo, it counts the number of GP clocks used to render each object.

Coverage

Functions Parameters Description
GXSetGP0Metric perf0 GX_PERF0_CLOCKS
GXReadGP0Metric (No parameter)  
GXSetDrawSyncCallback cb User callback.

Using the Demo

A Button — Outputs performance information (number of clocks per object) on the debug console.

Required Data Files

None.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL