#include <revolution/gx.h> void GXSetVCacheMetric( GXVCachePerf attr );
| attr | Attribute used to qualify vertex cache counter updates. Accepted values are:
GX_VC_ALL to enable the cache counters for all attributes. |
|---|
None.
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.
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);GXReadMemMetric, GXClearMemMetric, GXReadPixMetric, GXClearPixMetric, GXReadGPMetric, GXSetGPMetric, GXClearGPMetric
2006/03/01 Initial version.
CONFIDENTIAL