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=utf-8">
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 &lt;revolution/gx.h&gt;
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 object drawn<BR> GXSetDrawSync(0xbeef);<BR> while (0xbeef != GXReadDrawSync())<BR> ;<BR> <BR> GXReadVCacheMetric(&amp;chk, &amp;miss, &amp;stall);<BR> <BR> OSReport(&quot;Vertex Cache miss rate:%f\n&quot;, (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><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>
56</p>
57
58<H2>Revision History</H2>
59<P>
602006/03/01 Initial version.<br>
61</P>
62
63<hr><p>CONFIDENTIAL</p></body>
64</html>