1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXReadVCacheMetric</title> 10</head> 11 12<body> 13 14<h1 align="left">GXReadVCacheMetric</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20<dd><PRE><CODE>#include <revolution/gx.h></CODE></PRE> 21 </dd> 22<dd><pre><CODE>void GXReadVCacheMetric( u32* check, 23u32* miss, 24u32* stall );</CODE></pre> 25 </dd></dl> 26<h2>Arguments</h2> 27<TABLE border="1" cellpadding="3" cellspacing="0.1"> 28 <tr> 29<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>check</font></strong></em></TD> 30<TD width="520">The total number of access hits for the vertex cache.</TD> 31 </tr> 32 <tr> 33<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>miss</font></strong></em></TD> 34<TD width="520">The total number of cache misses during access to the vertex cache.</TD> 35 </tr> 36 <tr> 37<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>stall</font></strong></em></TD> 38<TD width="520">The number of GP clock units for which the vertex cache was stalled.</TD> 39 </tr> 40</TABLE> 41<h2>Return Values</h2> 42 43<p>None.</p> 44<H2>Description</H2> 45<P>The Graphics Processor (GP) can count many internal events that give detailed information on performance. This function returns Vertex Cache performance counters.</P> 46<P>Each call to <a href="GXReadVCacheMetric.html"><code>GClearVCacheMetric</code></a> resets the counter to zero. <a href="GXSetVCacheMetric.html"><code>GXSetVCacheMetric</code></a> sets the metric to be measured by the Vertex Cache performance counter.</P> 47<H3>Example</H3> 48<P><code><font size="3">u32 chk, miss, stall;<br> <br> GXSetVCacheMetric(GX_VC_ALL);<br> GXClearVCacheMetric();<br> <br> // Draw Object(s)</font></code></P> 49<P><code><font size="3">// wait until object drawn<br> GXSetDrawSync(0xbeef);<br> while (0xbeef != GXReadDrawSync())<br> ;<br> <br> GXReadVCacheMetric(&chk, &miss, &stall);<br> <br> OSReport("Vertex Cache miss rate: %f\n", (f32)miss/(f32)chk);</font></code></P> 50<P>This function reads CPU-accessible registers in the GP and so should not be called in a display list.</P> 51 52 53 54 55<h2>See Also</h2> 56 57<p><a href="GXReadMemMetric.html">GXReadMemMetric</a><br> <a href="GXClearMemMetric.html">GXClearMemMetric</a><br> <a href="GXReadPixMetric.html">GXReadPixMetric</a><br> <a href="GXClearPixMetric.html">GXClearPixMetric</a><br> <a href="GXReadGPMetric.html">GXReadGPMetric</a><br> <a href="GXSetGPMetric.html">GXSetGPMetric</a><br> <a href="GXClearGPMetric.html">GXClearGPMetric</a></p> 58<H2>Revision History</H2> 59<P>03/01/2006 Initial version</P>