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>GXSetVCacheMetric</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetVCacheMetric</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXSetVCacheMetric( <a href="../Enumerated_Types/GXVCachePerf.html">GXVCachePerf</a> attr );
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<TABLE class="arguments" border="1" >
25  <tr>
26<th>attr</th>
27<td>Attribute used to qualify vertex cache counter updates. Accepted values are:
28      <TABLE class="arguments" border="1" >
29        <tr>
30<td bgcolor="#C0C0C0">Name</td>
31<td bgcolor="#C0C0C0">Attributes</td>
32        </tr>
33        <tr>
34<th>GX_VC_POS</th>
35<td>Position coordinates.</td>
36        </tr>
37        <tr>
38<th>GX_VC_NRM</th>
39<td>Normal.</td>
40        </tr>
41        <tr>
42<th>GX_VC_CLR0</th>
43<td>Vertex color 0.</td>
44        </tr>
45        <tr>
46<th>GX_VC_CLR1</th>
47<td>Vertex color 1.</td>
48        </tr>
49        <tr>
50<th>GX_VC_TEX0</th>
51<td>Texture coordinate 0.</td>
52        </tr>
53        <tr>
54<th>GX_VC_TEX1</th>
55<td>Texture coordinate 1.</td>
56        </tr>
57        <tr>
58<th>GX_VC_TEX2</th>
59<td>Texture coordinate 2.</td>
60        </tr>
61        <tr>
62<th>GX_VC_TEX3</th>
63<td>Texture coordinate 3.</td>
64        </tr>
65        <tr>
66<th>GX_VC_TEX4</th>
67<td>Texture coordinate 4.</td>
68        </tr>
69        <tr>
70<th>GX_VC_TEX5</th>
71<td>Texture coordinate 5.</td>
72        </tr>
73        <tr>
74<th>GX_VC_TEX6</th>
75<td>Texture coordinate 6.</td>
76        </tr>
77        <tr>
78<th>GX_VC_TEX7</th>
79<td>Texture coordinate 7.</td>
80        </tr>
81        <tr>
82<th>GX_VC_ALL</th>
83<td>All attributes.</td>
84        </tr>
85      </table>
86Use <CODE>GX_VC_ALL</CODE> to enable the cache counters for all attributes.</td>
87  </tr>
88</table>
89
90<h2>Return Values</h2>
91<p>None.</p>
92
93<H2>Description</H2>
94<P>The graphics processor (GP) can count many internal events that give detailed information on performance.&nbsp; 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 <SPAN class="argument">attr</SPAN>.</P>
95<P>To clear the counter, call the <A href="GXClearVCacheMetric.html"><CODE>GXClearVCacheMetric</CODE></A> function.&nbsp;To read the counter value, call the <A href="GXReadVCacheMetric.html"><CODE>GXReadVCacheMetric</CODE></A> function.</P>
96
97<H3>Example</H3>
98<DL><DD><CODE>u32 chk, miss, stall;<BR> <BR> GXSetVCacheMetric(GX_VC_ALL);<BR> GXClearVCacheMetric();<BR> <BR> // Render Object(s)</CODE></DD></DL>
99<DL><DD><CODE>// wait until objects are rendered<BR> GXSetDrawSync(0xbeef);<BR> while (0xbeef != GXReadDrawSync())<BR> &nbsp;&nbsp;&nbsp; ;<BR> <BR> GXReadVCacheMetric(&amp;chk, &amp;miss, &amp;stall);<BR> <BR> OSReport(&quot;Vertex Cache miss rate:&nbsp; %f\n&quot;, (f32)miss/(f32)chk);</CODE></DD></DL>
100
101<h2>See Also</h2>
102<P class="reference">
103<a href="GXReadMemMetric.html">GXReadMemMetric</a>,
104<a href="GXClearMemMetric.html">GXClearMemMetric</a>,
105<a href="GXReadPixMetric.html">GXReadPixMetric</a>,
106<a href="GXClearPixMetric.html">GXClearPixMetric</a>,
107<a href="GXReadGPMetric.html">GXReadGPMetric</a>,
108<a href="GXSetGPMetric.html">GXSetGPMetric</a>,
109<a href="GXClearGPMetric.html">GXClearGPMetric</a>
110</p>
111
112<H2>Revision History</H2>
113<P>
1142006/03/01 Initial version.<br>
115</P>
116
117<hr><p>CONFIDENTIAL</p></body>
118</HTML>