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 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 GXSetVCacheMetric( <a href="../Enumerated_Types/GXVCachePerf.html">GXVCachePerf</a> attr );</CODE></pre> 23 </dd> 24</dl> 25 26<h2>Arguments</h2> 27 28<table border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<td width="120" bgcolor="#ffffe8"><em><strong><CODE>attr</font></strong></em></td> 31<td width="520">Attribute used to qualify vertex cache counter updates. Accepted values are: 32 <table border="1" cellspacing="0.1" width="500"> 33 <tr> 34<td width="150" bgcolor="#C0C0C0">Name</td> 35<td width="350" bgcolor="#C0C0C0">attribute</td> 36 </tr> 37 <tr> 38<td width="150"><code>GX_VC_POS</code></td> 39<td width="350">the position coordinate</td> 40 </tr> 41 <tr> 42<td width="150"><code>GX_VC_NRM</code></td> 43<td width="350">the normal</td> 44 </tr> 45 <tr> 46<td width="150"><code>GX_VC_CLR0</code></td> 47<td width="350">vertex color 0.</td> 48 </tr> 49 <tr> 50<td width="150"><code>GX_VC_CLR1</code></td> 51<td width="350">vertex color 1.</td> 52 </tr> 53 <tr> 54<td width="150"><code>GX_VC_TEX0</code></td> 55<td width="350">texture coordinate 0</td> 56 </tr> 57 <tr> 58<td width="150"><code>GX_VC_TEX1</code></td> 59<td width="350">texture coordinate 1</td> 60 </tr> 61 <tr> 62<td width="150"><code>GX_VC_TEX2</code></td> 63<td width="350">texture coordinate 2</td> 64 </tr> 65 <tr> 66<td width="150"><code>GX_VC_TEX3</code></td> 67<td width="350">texture coordinate 3</td> 68 </tr> 69 <tr> 70<td width="150"><code>GX_VC_TEX4</code></td> 71<td width="350">texture coordinate 4</td> 72 </tr> 73 <tr> 74<td width="150"><code>GX_VC_TEX5</code></td> 75<td width="350">texture coordinate 5</td> 76 </tr> 77 <tr> 78<td width="150"><code>GX_VC_TEX6</code></td> 79<td width="350">texture coordinate 6</td> 80 </tr> 81 <tr> 82<td width="150"><code>GX_VC_TEX7</code></td> 83<td width="350">texture coordinate 7</td> 84 </tr> 85 <tr> 86<td width="150"><code>GX_VC_ALL</code></td> 87<td width="350">All attributes.</td> 88 </tr> 89 </table> 90Use <code>GX_VC_ALL</code> to enable the cache counters for all attributes.</td> 91 </tr> 92</table> 93<h2>Return Values</h2> 94 95<p>None.</p> 96<H2>Description</H2> 97<P>The graphics processor (GP) can count many internal events that give detailed information on performance. This function sets the metric the vertex cache performance counter will measure. It is possible to monitor a particular attribute or all attributes using <em><strong><code>attr</code></strong></em>.</P> 98<P>To clear the counter cal <a href="GXClearVCacheMetric.html"><code>GXClearVCacheMetric</code></a>. To read the counter value, call to <a href="GXSetVCacheMetric.html"><code>GXReadVCacheMetric</code></a>.</P> 99<H3>Example</H3> 100<BLOCKQUOTE><code><font size="3">u32 chk, miss, stall;<br> <br> GXSetVCacheMetric(GX_VC_ALL);<br> GXClearVCacheMetric();<br> <br> // Draw Object(s)</font></code></BLOCKQUOTE> 101<BLOCKQUOTE><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></BLOCKQUOTE> 102 103 104 105 106<h2>See Also</h2> 107 108<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> 109<H2>Revision History</H2> 110<P>03/01/2006 Initial version.</P>