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<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXReadVCacheMetric( u32* check, 21 u32* miss, 22 u32* stall ); 23</pre></dd></dl> 24 25<h2>Arguments</h2> 26<TABLE class="arguments" border="1" > 27 <tr> 28<TH>check</TH> 29<TD>The total number of access hits for the vertex cache.</TD> 30 </tr> 31 <tr> 32<TH>miss</TH> 33<TD>The total number of cache misses during access to the vertex cache.</TD> 34 </tr> 35 <tr> 36<TH>stall</TH> 37<TD>The number of GP clock units for which the vertex cache was stalled.</TD> 38 </tr> 39</TABLE> 40 41<h2>Return Values</h2> 42<p>None.</p> 43 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 the <A href="GXClearVCacheMetric.html"><CODE>GXClearVCacheMetric</CODE></A> function 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 48<H3>Example</H3> 49<DL><DD><CODE>u32 chk, miss, stall;<BR> <BR> GXSetVCacheMetric(GX_VC_ALL);<BR> GXClearVCacheMetric();<BR> <BR> // Render Object(s)</CODE></DD></DL> 50<DL><DD><CODE>// wait until objects are rendered<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);</CODE></DD></DL> 51<P>This function reads CPU-accessible registers in the GP and so should not be called in a display list.</P> 52 53<h2>See Also</h2> 54<P class="reference"> 55<a href="GXReadMemMetric.html">GXReadMemMetric</a>, 56<a href="GXClearMemMetric.html">GXClearMemMetric</a>, 57<a href="GXReadPixMetric.html">GXReadPixMetric</a>, 58<a href="GXClearPixMetric.html">GXClearPixMetric</a>, 59<a href="GXReadGPMetric.html">GXReadGPMetric</a>, 60<a href="GXSetGPMetric.html">GXSetGPMetric</a>, 61<a href="GXClearGPMetric.html">GXClearGPMetric</a> 62</p> 63 64<H2>Revision History</H2> 65<P> 662006/03/01 Initial version.<br> 67</P> 68 69<hr><p>CONFIDENTIAL</p></body> 70</html>