GXSetVCacheMetric

Syntax

#include <revolution/gx.h>

void GXSetVCacheMetric( GXVCachePerf attr );

Arguments

attr Attribute used to qualify vertex cache counter updates. Accepted values are:
Name Attributes
GX_VC_POS Position coordinates.
GX_VC_NRM 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 that the vertex cache performance counter will measure. It is possible to monitor a particular attribute or all attributes using attr.

To clear the counter, call the GXClearVCacheMetric function. To read the counter value, call the GXReadVCacheMetric function.

Example

u32 chk, miss, stall;

GXSetVCacheMetric(GX_VC_ALL);
GXClearVCacheMetric();

// Render Object(s)
// wait until objects are rendered
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.


CONFIDENTIAL