1<html>
2
3<head>
4<!-- Inserted by TRADOS: --><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=windows-1252">
5
6<title>GX Vertex Performance Calculator</title>
7<meta NAME="Author" Confiltered="Rob Moore (NTD), based on data from Eric Demers (ArtX).">
8<meta NAME="Description" Confiltered="vertex performance calculator.">
9<meta NAME="KeyWords" Confiltered="Java, JavaScript, Calculators">
10<meta NAME="Classification" Confiltered="Revolution Tools">
11<script LANGUAGE="JavaScript1.2">
12<!-- hide this script tag's contents from old browsers --->
13//
14//  Compute peak vertex performance
15//
16function VtxPerf( f )
17{
18    var geo_perf;
19    var lit_perf;
20    var in_perf;
21    var out_perf;
22    var perf;
23    var tg_stq = parseInt(f.n_texgen_stq[f.n_texgen_stq.selectedIndex].value);
24    var tg_st  = parseInt(f.n_texgen_st[f.n_texgen_st.selectedIndex].value);
25    var bmap   = parseInt(f.n_bm[f.n_bm.selectedIndex].value);
26    var srtg   = parseInt(f.n_srtg[f.n_srtg.selectedIndex].value);
27    var nchan  = parseInt(f.n_chans[f.n_chans.selectedIndex].value);
28    var alltg  = tg_stq + tg_st + bmap + srtg;
29    var en_ch0 = ((nchan > 0) || (srtg > 0));
30    var en_ch1 = ((nchan > 1) || (srtg > 1));
31    var lit_c0 = parseInt(f.n_clr0[f.n_clr0.selectedIndex].value);
32    var lit_a0 = parseInt(f.n_a0[f.n_a0.selectedIndex].value);
33    var lit_c1 = parseInt(f.n_clr1[f.n_clr1.selectedIndex].value);
34    var lit_a1 = parseInt(f.n_a1[f.n_a1.selectedIndex].value);
35    var lits   = lit_c0*en_ch0 + lit_a0*en_ch0 +
36                 lit_c1*en_ch1 + lit_a1*en_ch1;
37    var texin  = parseInt(f.gx_va_tex[f.gx_va_tex.selectedIndex].value);
38    var nrmin  = parseInt(f.gx_va_nrm[f.gx_va_nrm.selectedIndex].value);
39    var clrin  = parseInt(f.gx_va_clr[f.gx_va_clr.selectedIndex].value);
40    var posi   = parseInt(f.gx_va_pnmtxidx[f.gx_va_pnmtxidx.selectedIndex].value);
41    var texi   = 0;
42    var idxin  = 0;
43    var i;
44
45    //
46    //  geometry performance
47    //
48    if (alltg > 8) {
49        alert("Error: The sum total of tex coords generated must be <= 8");
50    }
51
52    if (tg_stq == 0 && tg_st == 1) {
53        geo_perf = 4 + 2 + nchan; // fast texture case
54    } else {
55        geo_perf = 4 + 3*(tg_stq + tg_st) + nchan;
56    }
57
58    //
59    //  lighting performance
60    //
61    if (!en_ch0 && (lit_c0 || lit_a0)) {
62        alert("Warning: Channel 0 is not output, although lights for channel 0 are enabled.");
63    }
64
65    if (!en_ch1 && (lit_c1 || lit_a1)) {
66        alert("Warning: Channel 1 is not output, although lights for channel 1 are enabled.");
67    }
68
69    if (nchan == 0 && bmap == 0 && srtg == 0) {
70        lit_perf = 0;
71    }
72
73    if (!lits && !clrin && (nchan || srtg)) {
74        alert("Warning: Lighting is on, but no lights are enabled (output color = register or vertex color).");
75
76        lit_perf = 4 + 8*bmap + 1;
77    } else {
78        lit_perf = 4*lits + 8*bmap + 1;
79    }
80
81
82    //
83    //  Input data performance
84    //
85    for (i = 1; i < 9; i++) {
86        if (f.gx_va_texmtxidx.options[i].selected) {
87            texi = texi | (1 << (i-1));
88        }
89    }
90
91    if (posi || (texi & 0xf)) {
92        idxin = 1;
93    }
94
95    if (texi & 0xf0) {
96        idxin++;
97    }
98
99    in_perf = 3 + 2*texin + 3*nrmin + clrin + idxin;
100
101    //
102    //  Output data performance
103    //
104    out_perf = 3 + 3*alltg + nchan;
105    if (out_perf < 5) {
106        out_perf = 5;
107    }
108
109    if (!alltg && !nchan) {
110        alert("Warning: No color channels output and no tex coords generated (output color = constant).");
111    }
112
113    //
114    //  Total performance = max cycles
115    //
116    if (lit_perf < geo_perf) {
117        if (in_perf < geo_perf) {
118            if (out_perf < geo_perf) {
119                perf = geo_perf;
120            } else {
121                perf = out_perf;
122            }
123        } else {
124            if (out_perf < in_perf) {
125                perf = in_perf;
126            } else {
127                perf = out_perf;
128            }
129        }
130    } else {
131        if (in_perf < lit_perf) {
132            if (out_perf < lit_perf) {
133                perf = lit_perf;
134            } else {
135                perf = out_perf;
136            }
137        } else {
138            if (out_perf < in_perf) {
139                perf = in_perf;
140            } else {
141                perf = out_perf;
142            }
143        }
144    }
145    // write output values
146    f.texgencyc.value = geo_perf;
147    f.litcyc.value    = lit_perf;
148    f.incyc.value     = in_perf;
149    f.outcyc.value    = out_perf;
150    f.n_cyc_vtx.value = perf;
151    f.n_vtx_sec.value = Math.round(243 * 100 / perf) / 100;
152}
153
154<!-- done hiding from old browsers -->
155</script>
156</head>
157
158<body BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#551A8B" ALINK="#0000FF">
159
160<h5 align="center">This JavaScript calculator was tested to work with Microsoft Internet Explorer 4 and 5, and Netscape Navigator 4.04 </h5>
161
162<h1 ALIGN="CENTER">Vertex Performance Calculator</h1>
163<b>
164
165<p align="center">This calculator will estimate the peak vertex performance of the Graphics Processor. </b></p>
166
167<p align="center">Please enter data for the three categories of information below.<br> Press "Compute Performance" to see the results further below.<br> Warnings may appear, but the results will still be computed.</p>
168
169<hr>
170
171<p align="center">Input Data </p>
172
173<hr>
174
175<form name="myform">
176  <table border="0">
177    <tr>
178<td colspan="2"><b>Vertex Descriptor</b></td>
179      <td></td>
180    </tr>
181    <tr>
182<td>Position</td>
183      <td><select NAME="gx_va_pos" size="1">
184<option selected VALUE="1">(x,y,z) </option>
185      </select> </td>
186    </tr>
187    <tr>
188<td>Normals</td>
189      <td><select NAME="gx_va_nrm" size="1">
190<option selected VALUE="0">None </option>
191        <option VALUE="1">1 </option>
192        <option VALUE="3">3 </option>
193      </select> </td>
194    </tr>
195    <tr>
196<td>Colors</td>
197      <td><select NAME="gx_va_clr" size="1">
198<option selected VALUE="0">None </option>
199        <option VALUE="1">1 </option>
200        <option VALUE="2">2 </option>
201      </select> </td>
202    </tr>
203    <tr>
204<td>Texture Coordinates</td>
205      <td><select NAME="gx_va_tex" size="1">
206<option selected VALUE="0">None </option>
207        <option VALUE="1">1 </option>
208        <option VALUE="2">2 </option>
209        <option VALUE="3">3 </option>
210        <option VALUE="4">4 </option>
211        <option VALUE="5">5 </option>
212        <option VALUE="6">6 </option>
213        <option VALUE="7">7 </option>
214        <option VALUE="8">8 </option>
215      </select> </td>
216    </tr>
217    <tr>
218<td>Pos/Norm Matrix Index</td>
219      <td><select NAME="gx_va_pnmtxidx" size="1">
220<option selected VALUE="0">None </option>
221        <option VALUE="1">1 </option>
222      </select> </td>
223    </tr>
224    <tr>
225<td>Texture Matrix Indices</td>
226      <td><select NAME="gx_va_texmtxidx" MULTIPLE SIZE="9">
227<option selected>None </option>
228        <option>1 </option>
229        <option>2 </option>
230        <option>3 </option>
231        <option>4 </option>
232        <option>5 </option>
233        <option>6 </option>
234        <option>7 </option>
235        <option>8 </option>
236      </select> </td>
237    </tr>
238    <tr>
239<td colspan="2"><b>Texture Coordinate Generation</b></td>
240    </tr>
241    <tr>
242<td>GX_TG_MTX2x4</td>
243      <td><select NAME="n_texgen_st" size="1">
244<option selected VALUE="0">None </option>
245        <option VALUE="1">1 </option>
246        <option VALUE="2">2 </option>
247        <option VALUE="3">3 </option>
248        <option VALUE="4">4 </option>
249        <option VALUE="5">5 </option>
250        <option VALUE="6">6 </option>
251        <option VALUE="7">7 </option>
252        <option VALUE="8">8 </option>
253      </select> </td>
254    </tr>
255    <tr>
256<td>GX_TG_MTX3x4</td>
257      <td><select NAME="n_texgen_stq" size="1">
258<option selected VALUE="0">None </option>
259        <option VALUE="1">1 </option>
260        <option VALUE="2">2 </option>
261        <option VALUE="3">3 </option>
262        <option VALUE="4">4 </option>
263        <option VALUE="5">5 </option>
264        <option VALUE="6">6 </option>
265        <option VALUE="7">7 </option>
266        <option VALUE="8">8 </option>
267      </select> </td>
268    </tr>
269    <tr>
270<td>GX_TG_BUMP*</td>
271      <td><select NAME="n_bm" size="1">
272<option selected VALUE="0">None </option>
273        <option VALUE="1">1 </option>
274        <option VALUE="2">2 </option>
275        <option VALUE="3">3 </option>
276        <option VALUE="4">4 </option>
277      </select> </td>
278    </tr>
279    <tr>
280<td>GX_TG_SRTG</td>
281      <td><select NAME="n_srtg" size="1">
282<option selected VALUE="0">None </option>
283        <option VALUE="1">1 </option>
284        <option VALUE="2">2 </option>
285      </select> </td>
286    </tr>
287    <tr>
288<td colspan="2"><b>Lighting</b></td>
289    </tr>
290    <tr>
291<td>Lights GX_COLOR0</td>
292      <td><select NAME="n_clr0" size="1">
293<option selected VALUE="0">None </option>
294        <option VALUE="1">1 </option>
295        <option VALUE="2">2 </option>
296        <option VALUE="3">3 </option>
297        <option VALUE="4">4 </option>
298        <option VALUE="5">5 </option>
299        <option VALUE="6">6 </option>
300        <option VALUE="7">7 </option>
301        <option VALUE="8">8 </option>
302      </select> </td>
303    </tr>
304    <tr>
305<td>Lights GX_ALPHA0</td>
306      <td><select NAME="n_a0" size="1">
307<option selected VALUE="0">None </option>
308        <option VALUE="1">1 </option>
309        <option VALUE="2">2 </option>
310        <option VALUE="3">3 </option>
311        <option VALUE="4">4 </option>
312        <option VALUE="5">5 </option>
313        <option VALUE="6">6 </option>
314        <option VALUE="7">7 </option>
315        <option VALUE="8">8 </option>
316      </select> </td>
317    </tr>
318    <tr>
319<td>Lights GX_COLOR1</td>
320      <td><select NAME="n_clr1" size="1">
321<option selected VALUE="0">None </option>
322        <option VALUE="1">1 </option>
323        <option VALUE="2">2 </option>
324        <option VALUE="3">3 </option>
325        <option VALUE="4">4 </option>
326        <option VALUE="5">5 </option>
327        <option VALUE="6">6 </option>
328        <option VALUE="7">7 </option>
329        <option VALUE="8">8 </option>
330      </select> </td>
331    </tr>
332    <tr>
333<td>Lights GX_ALPHA1</td>
334      <td><select NAME="n_a1" size="1">
335<option selected VALUE="0">None </option>
336        <option VALUE="1">1 </option>
337        <option VALUE="2">2 </option>
338        <option VALUE="3">3 </option>
339        <option VALUE="4">4 </option>
340        <option VALUE="5">5 </option>
341        <option VALUE="6">6 </option>
342        <option VALUE="7">7 </option>
343        <option VALUE="8">8 </option>
344      </select> </td>
345    </tr>
346    <tr>
347<td>Light Channels Output</td>
348      <td><select NAME="n_chans" size="1">
349<option selected VALUE="0">None </option>
350        <option VALUE="1">1 </option>
351        <option VALUE="2">2 </option>
352      </select> </td>
353    </tr>
354  </table>
355  <p><br>
356  </p>
357  <hr>
358<div align="center"><center><p>Computed Data </p>
359  </center></div><hr>
360<p><input TYPE="BUTTON" NAME="calc" VALUE="Compute Performance"
361  ONCLICK="VtxPerf(this.form)"><br>
362  </p>
363  <table border="0">
364    <tr>
365<td>Tex Gen:</td>
366      <td><input TYPE="TEXT" NAME="texgencyc" MAXLENGTH="5" size="20"></td>
367<td>cycles/vtx</td>
368    </tr>
369    <tr>
370<td>Lighting:</td>
371      <td><input TYPE="TEXT" NAME="litcyc" MAXLENGTH="5" size="20"></td>
372<td>cycles/vtx</td>
373    </tr>
374    <tr>
375<td>Input:</td>
376      <td><input TYPE="TEXT" NAME="incyc" MAXLENGTH="5" size="20"></td>
377<td>cycles/vtx</td>
378    </tr>
379    <tr>
380<td>Output:</td>
381      <td><input TYPE="TEXT" NAME="outcyc" MAXLENGTH="5" size="20"></td>
382<td>cycles/vtx</td>
383    </tr>
384    <tr>
385<td>Max:</td>
386      <td><input TYPE="TEXT" NAME="n_cyc_vtx" MAXLENGTH="5" size="20"></td>
387<td>cycles/vtx</td>
388    </tr>
389    <tr>
390<td>Peak rate:</td>
391      <td><input TYPE="TEXT" NAME="n_vtx_sec" MAXLENGTH="5" size="20"></td>
392<td>M vtx/sec</td>
393    </tr>
394  </table>
395</form>
396<noscript>
397
398<p>No JavaScript? Turn it on, or upgrade to Communicator.</p>
399<hr>
400<P>CONFIDENTIAL</p>
401</BODY>
402</HTML>
403