GXSetVCacheMetric

C Specification

#include <revolution/gx.h>
void GXSetVCacheMetric( GXVCachePerf attr );

Arguments

attr Attribute used to qualify vertex cache counter updates. Accepted values are:
Name attribute
GX_VC_POS the position coordinate
GX_VC_NRM the normal
GX_VC_CLR0 vertex color 0.
GX_VC_CLR1 vertex color 1.
GX_VC_TEX0 texture coordinate 0
GX_VC_TEX1 texture coordinate 1
GX_VC_TEX2 texture coordinate 2
GX_VC_TEX3 texture coordinate 3
GX_VC_TEX4 texture coordinate 4
GX_VC_TEX5 texture coordinate 5
GX_VC_TEX6 texture coordinate 6
GX_VC_TEX7 texture coordinate 7
GX_VC_ALL All attributes.
Use GX_VC_ALL to enable the cache counters for all attributes.

Return Values

None.

Description

The graphics processor (GP) can count many internal events that give detailed information on performance. This function sets the metric the vertex cache performance counter will measure. It is possible to monitor a particular attribute or all attributes using attr.

To clear the counter cal GXClearVCacheMetric. To read the counter value, call to GXReadVCacheMetric.

Example

u32 chk, miss, stall;

GXSetVCacheMetric(GX_VC_ALL);
GXClearVCacheMetric();

// Draw Object(s)
// wait until object drawn
GXSetDrawSync(0xbeef);
while (0xbeef != GXReadDrawSync())
    ;

GXReadVCacheMetric(&chk, &miss, &stall);

OSReport("Vertex Cache miss rate:  %f\n", (f32)miss/(f32)chk);

See Also

GXReadMemMetric
GXClearMemMetric
GXReadPixMetric
GXClearPixMetric
GXReadGPMetric
GXSetGPMetric
GXClearGPMetric

Revision History

2006/03/01 Initial version.