1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
4<head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta http-equiv="Content-Style-Type" content="text/css" />
7    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
8</head>
9
10<body>
11<h1>gx - Gd - ProfilingSample Demo</h1>
12
13<h2>Description</h2>
14
15<div class="section">
16    <p>Displays profile results of rendering using the GD library with the <CODE>nngx</CODE> API.</p>
17</div>
18
19<h2>Required Environment</h2>
20
21<div class="section">
22    <p>None.</p>
23</div>
24
25<h2>How to Use</h2>
26
27<div class="section">
28    <p>None.</p>
29</div>
30
31<h2>Notes</h2>
32
33<div class="section">
34    <p>This uses the GD library to implement <CODE>DrawPrimitive</CODE>, which is a sample demo for the GR library.</p>
35</div>
36
37<h2>Execution Procedure</h2>
38
39<div class="section">
40    <p>The following macros are defined in the source code. By specifying these for <CODE>PACKET_RECORDING_MODE</CODE>, you can switch to an implementation that uses the <CODE>gd::System::StartRecordingPackets</CODE> function.
41    </p>
42    <table>
43        <tr>
44            <th><CODE>USE_PACKET_RECORDING_NONE</CODE></th>
45            <td>Do not use the <CODE>StartRecordingPackets</CODE> function.</td>
46        </tr>
47        <tr>
48            <th><CODE>USE_PACKET_RECORDING_COPY</CODE></th>
49            <td>Use the <CODE>StartRecordingPackets</CODE> function (specify <CODE>RECORD_COMMAND_LIST_COPY</CODE> to the <SPAN class="argument">usage</SPAN> parameter).</td>
50        </tr>
51        <tr>
52            <th><CODE>USE_PACKET_RECORDING_NOCPY</CODE></th>
53            <td>Use the <CODE>StartRecordingPackets</CODE> function (specify <CODE>RECORD_COMMAND_LIST_NO_COPY</CODE> to the <SPAN class="argument">usage</SPAN> parameter).</td>
54        </tr>
55    </table>
56
57    <p>The demo displays the following screens when run. Adjust the stereoscopic image with the 3D depth slider.</p>
58
59    <p><img src="Fig/DrawPrimitiveScene.PNG"></p>
60
61    <p>The following type of profile results are periodically output to the debugger.</p>
62
63<pre>
64Profiling counter: Busy
65Shader processor 0: 4008
66Command buffer and vertex array load module: 27834
67Rasterization module: 1860
68Triangle setup: 9992
69Fragment lighting: 971
70Texture unit: 0
71Per-fragment operations module: 390
72Texture combiner: 0
73
74Profiling counter: Vertex cache: 43
75
76Profiling counter: Vertex Shader 0
77Program counter transition count: 235983
78Cycles stalled due to command dependencies: 210181
79Cycles stalled due to address register updates (mova): 0
80Cycles stalled due to status register updates (cmp): 19167
81Cycles stalled due to program pre-fetch misses: 16154
82
83Profiling counter: Vertex Shader 1
84Program counter transition count: 235983
85Cycles stalled due to command dependencies: 210181
86Cycles stalled due to address register updates (mova): 0
87Cycles stalled due to status register updates (cmp): 19167
88Cycles stalled due to program pre-fetch misses: 16167
89
90Profiling counter: Vertex Shader 2
91Program counter transition count: 236188
92Cycles stalled due to command dependencies: 210509
93Cycles stalled due to address register updates (mova): 0
94Cycles stalled due to status register updates (cmp): 19167
95Cycles stalled due to program pre-fetch misses: 16097
96
97Profiling counter: Vertex Shader 3
98Program counter transition count: 236188
99Cycles stalled due to command dependencies: 210509
100Cycles stalled due to address register updates (mova): 0
101Cycles stalled due to status register updates (cmp): 19167
102Cycles stalled due to program pre-fetch misses: 16125
103
104Profiling counter: Polygon
105Number of vertices input into triangle setup: 41796
106Number of polygons input into triangle setup: 39692
107Number of polygons output from triangle setup: 4724
108
109Profiling counter: Fragment
110number of fragments input into the per-fragment operations module: 71067
111
112Profiling counter: Memory Access
113PICA reads to the VRAM A channel: 24000
114PICA writes to the VRAM A channel: 60088
115PICA reads to the VRAM B channel: 21320
116PICA writes to the VRAM B channel: 45320
117Reads of command buffers, vertex arrays, and index arrays: 99210
118Texture memory reads by the texture unit: 0
119Depth and stencil buffer reads by the perfragment operation module: 21320
120Depth and stencil buffer writes by the perfragment operation module: 21320
121Color buffer reads by the per-fragment operations module: 0
122Color buffer writes by the per-fragment operations module: 36088
123Display buffer reads by the LCD upper screen controller: 12336
124Display buffer reads by the LCD lower screen controller: 3696
125Reads by the post-transfer module: 24000
126Writes by the post-transfer module: 18000
127Channel 0 buffer writes by the memory fill module: 24000
128Channel 1 buffer writes by the memory fill module: 24000
129VRAM reads by the CPU: 0
130VRAM writes by the CPU: 0
131</pre>
132
133</div>
134
135<h2>Revision History</h2>
136
137<div class="section">
138    <dl class="history">
139        <dt>2012/02/17</dt>
140        <dd>Initial version.</dd>
141    </dl>
142</div>
143
144
145<hr><p>CONFIDENTIAL</p></body>
146</html>