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>GXClearMemMetric</title>
10</head>
11
12<body>
13
14<h1 align="left">GXClearMemMetric</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXClearMemMetric( void  );
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<p>None.</p>
25
26<h2>Return Values</h2>
27<p>None.</p>
28
29<H2>Description</H2>
30<P>The graphics processor (GP) can count many internal events that give detailed information on performance. This function clears the memory request counters. These counters can be read by calling the <A href="GXReadMemMetric.html"><CODE>GXReadMemMetric</CODE></A> function. Since the counters are cleared by writing CPU-accessible registers, this function should <strong>not</strong> be used in a display list.</P>
31<DL><DD><CODE>u32 cp_req, tc_req, cpu_rd_req, cpu_wr_req, dsp_req, io_req, vi_req, pe_req;<BR> u32 rf_req, fi_req;<BR> <BR> GXReadClearMetric();<BR> <BR> // Draw Object(s)</CODE></DD></DL>
32<DL><DD><CODE>// wait until object drawn<BR> GXSetDrawSync(0xbeef);<BR> while (0xbeef != GXReadDrawSync())<BR> ;<BR> <BR> metric = GXReadMemMetric(&amp;cp_req,<BR>
33                        
34&amp;tc_req,<BR>
35                        
36&amp;cpu_rd_req,<BR>
37                        
38&amp;cpu_wr_req,<BR>
39                        
40&amp;dsp_req,<BR>
41                        
42&amp;io_req,<BR>
43                        
44&amp;vi_req,<BR>
45                        
46&amp;pe_req,<BR>
47                        
48&amp;rf_req,<BR>
49                        
50&amp;fi_req );   // returns request counter<BR> <BR> OSReport(&quot;Number command processor requests:%d\n&quot;, cp_req);</CODE></DD></DL>
51
52<h2>See Also</h2>
53<P class="reference">
54<a href="GXReadPixMetric.html">GXReadPixMetric</a><BR> <a href="GXClearPixMetric.html">GXClearPixMetric</a><BR> <a href="GXSetVCacheMetric.html">GXSetVCacheMetric</a><BR> <a href="GXReadVCacheMetric.html">GXReadVCacheMetric</a><BR> <a href="GXClearVCacheMetric.html">GXClearVCacheMetric</a><BR> <a href="GXSetGPMetric.html">GXSetGPMetric</a><BR><a href="GXReadGPMetric.html">GXReadGPMetric</a><BR> <a href="GXClearGPMetric.html">GXClearGPMetric</a>
55</p>
56
57<H2>Revision History</H2>
58<P>
592006/03/01 Initial version.<br>
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</html>