#include <revolution/gx.h>
u32 GXReadClksPerVtx( void );
None
The clock number for each vertex needed for conversion and writing processes.
The Graphics Processor (GP) can count many internal events that give detailed information on performance. This function returns the minimum number of clocks the Transform and Lighting Engine (also called the XF) will take to process a vertex. This number is returned from the GP based on the current texture coordinate generation, lighting, and vertex state. Make sure that all such states have been flushed from the GP before calling GXReadClksPerVtx. Also, the value returned does not take into account the time required for input or output. In certain configurations, this time may limit the peak geometry rate. The Vertex Performance spreadsheet provided does take into account input and output data and so may generate more accurate results.
u32 cpv;
// Set Draw State
// wait until object drawn
GXSetDrawSync(0xbeef);
while (0xbeef != GXReadDrawSync())
;
cpv = GXReadClksPerVtx(); // returns request counter
OSReport("Number of clocks per vtx: %d\n", cpv);
This function reads CPU-accessible registers in the GP and so should not be called in a display list.
GXReadMemMetric
GXReadVCacheMetric
GXReadPixMetric
GXReadGPMetric
GXReadGP0Metric
GXReadGP1Metric
03/01/2006 Initial version