#include <revolution/gx.h>
void GXReadVCacheMetric( u32* check,
u32* miss,
u32* stall );
| check | The total number of access hits for the vertex cache. |
|---|---|
| miss | The total number of cache misses during access to the vertex cache. |
| stall | The number of GP clock units for which the vertex cache was stalled. |
None.
The graphics processor (GP) can count many internal events that give detailed information on performance. This function returns Vertex Cache performance counters.
Each call to the GXClearVCacheMetric function resets the counter to zero. GXSetVCacheMetric sets the metric to be measured by the vertex cache performance counter.
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);This function reads CPU-accessible registers in the GP and so should not be called in a display list.
GXReadMemMetric, GXClearMemMetric, GXReadPixMetric, GXClearPixMetric, GXReadGPMetric, GXSetGPMetric, GXClearGPMetric
2006/03/01 Initial version.
CONFIDENTIAL