aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a05295.html
blob: 7a7e835d8d47929b13a975383d34d5c9ade3ed61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: vertex_program_parse.cpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>vertex_program_parse.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
<dl compact><dt><b>Id</b></dt><dd><a class="el" href="a05295.html">vertex_program_parse.cpp</a>,v 1.4 2003/03/31 10:31:16 vizerie Exp </dd></dl>

<p>
Definition in file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
<code>#include "<a class="el" href="a06438.html">std3d.h</a>"</code><br>
<code>#include "<a class="el" href="a06719.html">vertex_program_parse.h</a>"</code><br>

<p>
<a href="a06718.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a8">dumpInstr</a> (const <a class="el" href="a03714.html">CVPInstruction</a> &amp;instr, std::string &amp;out)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a7">dumpOperand</a> (const <a class="el" href="a03715.html">CVPOperand</a> &amp;op, bool destOperand, std::string &amp;out)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a6">dumpSwizzle</a> (const <a class="el" href="a03718.html">CVPSwizzle</a> &amp;swz, std::string &amp;out)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a5">dumpWriteMask</a> (<a class="el" href="a04558.html#a15">uint</a> mask, std::string &amp;out)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a4">getStringUntilCR</a> (const char *<a class="el" href="a04223.html#a652">src</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a2">letterToSwizzleComp</a> (char letter, <a class="el" href="a03718.html#CVPSwizzlew0">CVPSwizzle::EComp</a> &amp;comp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a3">parseUInt</a> (const char *<a class="el" href="a04223.html#a652">src</a>, <a class="el" href="a04558.html#a15">uint</a> &amp;dest)</td></tr>

<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a0">instrToName</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05295.html#a1">outputRegisterToName</a> []</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a8" doxytag="vertex_program_parse.cpp::dumpInstr" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void dumpInstr </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03714.html">CVPInstruction</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>instr</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>out</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Dump an instruction in a string 
<p>
Definition at line <a class="el" href="a06718.html#l01091">1091</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a06719.html#l00164">CVPInstruction::Dest</a>, <a class="el" href="a06718.html#l01053">dumpOperand()</a>, <a class="el" href="a06718.html#l00108">CVPInstruction::getNumUsedSrc()</a>, <a class="el" href="a06719.html#l00169">CVPInstruction::getSrc()</a>, <a class="el" href="a06718.html#l00969">instrToName</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06719.html#l00163">CVPInstruction::Opcode</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01110">CVPParser::dump()</a>.
<p>
<div class="fragment"><pre>01092 {
01093         <a class="code" href="a04199.html#a6">nlassert</a>(instr.<a class="code" href="a03714.html#CVPInstructiono1">Opcode</a> &lt; CVPInstruction::OpcodeCount);
01094         out = <a class="code" href="a05295.html#a0">instrToName</a>[instr.<a class="code" href="a03714.html#CVPInstructiono1">Opcode</a>];
01095         <a class="code" href="a04558.html#a15">uint</a> nbOp = instr.<a class="code" href="a03714.html#CVPInstructiona0">getNumUsedSrc</a>();
01096         std::string destOperand;
01097         <a class="code" href="a05295.html#a7">dumpOperand</a>(instr.<a class="code" href="a03714.html#CVPInstructiono0">Dest</a>, <span class="keyword">true</span>, destOperand);
01098         out += destOperand;
01099         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; nbOp; ++k)
01100         {
01101                 out += <span class="stringliteral">", "</span>;
01102                 std::string srcOperand;
01103                 <a class="code" href="a05295.html#a7">dumpOperand</a>(instr.<a class="code" href="a03714.html#CVPInstructiona1">getSrc</a>(k), <span class="keyword">false</span>, srcOperand);
01104                 out += srcOperand;
01105         }
01106         out +=<span class="stringliteral">"; \n"</span>;
01107 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="vertex_program_parse.cpp::dumpOperand" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void dumpOperand </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03715.html">CVPOperand</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>op</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>destOperand</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>out</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l01053">1053</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a06718.html#l01027">dumpSwizzle()</a>, <a class="el" href="a06718.html#l01012">dumpWriteMask()</a>, <a class="el" href="a06719.html#l00129">CVPOperand::Indexed</a>, <a class="el" href="a06719.html#l00135">CVPOperand::Negate</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06718.html#l00991">outputRegisterToName</a>, <a class="el" href="a06719.html#l00136">CVPOperand::Swizzle</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, <a class="el" href="a06719.html#l00118">CVPOperand::Type</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a03715.html#CVPOperando7">CVPOperand::Value</a>, and <a class="el" href="a06719.html#l00132">CVPOperand::WriteMask</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01091">dumpInstr()</a>.
<p>
<div class="fragment"><pre>01054 {
01055         out = op.<a class="code" href="a03715.html#CVPOperando3">Negate</a> ? <span class="stringliteral">" -"</span> : <span class="stringliteral">" "</span>;
01056         <span class="keywordflow">switch</span>(op.<a class="code" href="a03715.html#CVPOperando6">Type</a>)
01057         {
01058                 <span class="keywordflow">case</span> <a class="code" href="a03715.html#CVPOperandw3CVPOperandw42">CVPOperand::Variable</a>: out += <span class="stringliteral">"R"</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(op.<a class="code" href="a03715.html#CVPOperando7">Value</a>.VariableValue); <span class="keywordflow">break</span>;
01059                 <span class="keywordflow">case</span> <a class="code" href="a03715.html#CVPOperandw3CVPOperandw1">CVPOperand::Constant</a>: 
01060                         out += <span class="stringliteral">"c["</span>;
01061                         <span class="keywordflow">if</span> (op.<a class="code" href="a03715.html#CVPOperando1">Indexed</a>)
01062                         {
01063                                 out += <span class="stringliteral">"A0.x + "</span>;
01064                         }
01065                         out += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(op.<a class="code" href="a03715.html#CVPOperando7">Value</a>.ConstantValue) + <span class="stringliteral">"]"</span>; 
01066                 <span class="keywordflow">break</span>;
01067                 <span class="keywordflow">case</span> <a class="code" href="a03715.html#CVPOperandw3CVPOperandw8">CVPOperand::InputRegister</a>: out += <span class="stringliteral">"v["</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>((<a class="code" href="a04558.html#a15">uint</a>) op.<a class="code" href="a03715.html#CVPOperando7">Value</a>.InputRegisterValue) + <span class="stringliteral">"]"</span>; <span class="keywordflow">break</span>;
01068                 <span class="keywordflow">case</span> <a class="code" href="a03715.html#CVPOperandw3CVPOperandw40">CVPOperand::OutputRegister</a>:
01069                         <a class="code" href="a04199.html#a6">nlassert</a>(op.<a class="code" href="a03715.html#CVPOperando7">Value</a>.OutputRegisterValue &lt; CVPOperand::OutputRegisterCount);
01070                         out += <span class="stringliteral">"o["</span> + std::string(outputRegisterToName[op.<a class="code" href="a03715.html#CVPOperando7">Value</a>.OutputRegisterValue]) + <span class="stringliteral">"]"</span>;
01071                 <span class="keywordflow">break</span>;
01072                 <span class="keywordflow">case</span> <a class="code" href="a03715.html#CVPOperandw3CVPOperandw0">CVPOperand::AddressRegister</a>:
01073                         out += <span class="stringliteral">"A0.x"</span>;
01074                 <span class="keywordflow">break</span>;
01075         }
01076         std::string suffix;
01077         <span class="keywordflow">if</span> (destOperand)
01078         {
01079                 <a class="code" href="a05295.html#a5">dumpWriteMask</a>(op.<a class="code" href="a03715.html#CVPOperando9">WriteMask</a>, suffix);
01080         }
01081         <span class="keywordflow">else</span>
01082         {
01083                 <a class="code" href="a05295.html#a6">dumpSwizzle</a>(op.<a class="code" href="a03715.html#CVPOperando5">Swizzle</a>, suffix);
01084         }
01085         out += suffix;
01086 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="vertex_program_parse.cpp::dumpSwizzle" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void dumpSwizzle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03718.html">CVPSwizzle</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>swz</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>out</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l01027">1027</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a06719.html#l00038">CVPSwizzle::Comp</a>, <a class="el" href="a06719.html#l00047">CVPSwizzle::isIdentity()</a>, <a class="el" href="a06719.html#l00040">CVPSwizzle::isScalar()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01053">dumpOperand()</a>.
<p>
<div class="fragment"><pre>01028 {
01029         <span class="keywordflow">if</span> (swz.<a class="code" href="a03718.html#CVPSwizzlea0">isIdentity</a>())
01030         {
01031                 out = <span class="stringliteral">""</span>;
01032                 <span class="keywordflow">return</span>;
01033         }
01034         out = <span class="stringliteral">"."</span>;
01035         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; 4; ++k)
01036         {
01037                 <span class="keywordflow">switch</span>(swz.<a class="code" href="a03718.html#CVPSwizzleo0">Comp</a>[k])
01038                 {
01039                         <span class="keywordflow">case</span> <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew2">CVPSwizzle::X</a>: out += <span class="stringliteral">"x"</span>; <span class="keywordflow">break</span>;
01040                         <span class="keywordflow">case</span> <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew3">CVPSwizzle::Y</a>: out += <span class="stringliteral">"y"</span>; <span class="keywordflow">break</span>;
01041                         <span class="keywordflow">case</span> <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew4">CVPSwizzle::Z</a>: out += <span class="stringliteral">"z"</span>; <span class="keywordflow">break</span>;
01042                         <span class="keywordflow">case</span> <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew1">CVPSwizzle::W</a>: out += <span class="stringliteral">"w"</span>; <span class="keywordflow">break</span>;
01043                         <span class="keywordflow">default</span>:
01044                                 <a class="code" href="a04199.html#a6">nlassert</a>(0);
01045                         <span class="keywordflow">break</span>;
01046                 }
01047                 <span class="keywordflow">if</span> (swz.<a class="code" href="a03718.html#CVPSwizzlea1">isScalar</a>() &amp;&amp; k == 0) <span class="keywordflow">break</span>;
01048         }
01049 
01050 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="vertex_program_parse.cpp::dumpWriteMask" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void dumpWriteMask </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>mask</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>out</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l01012">1012</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01053">dumpOperand()</a>.
<p>
<div class="fragment"><pre>01013 {
01014         <span class="keywordflow">if</span> (mask == 0xf)
01015         {
01016                 out = <span class="stringliteral">""</span>;
01017                 <span class="keywordflow">return</span>;
01018         }
01019         out = <span class="stringliteral">"."</span>;
01020         <span class="keywordflow">if</span> (mask &amp; 1) out +=<span class="stringliteral">"x"</span>;
01021         <span class="keywordflow">if</span> (mask &amp; 2) out +=<span class="stringliteral">"y"</span>;
01022         <span class="keywordflow">if</span> (mask &amp; 4) out +=<span class="stringliteral">"z"</span>;
01023         <span class="keywordflow">if</span> (mask &amp; 8) out +=<span class="stringliteral">"w"</span>;
01024 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="vertex_program_parse.cpp::getStringUntilCR" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::string getStringUntilCR </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>src</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l00908">908</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05646.html#l01124">src</a>.
<p>
Referenced by <a class="el" href="a06718.html#l00921">CVPParser::parse()</a>.
<p>
<div class="fragment"><pre>00909 {
00910         <a class="code" href="a04199.html#a6">nlassert</a>(src);
00911         std::string result;
00912         <span class="keywordflow">while</span> (*<a class="code" href="a04223.html#a652">src</a> != <span class="charliteral">'\n'</span> &amp;&amp; *<a class="code" href="a04223.html#a652">src</a> != <span class="charliteral">'\r'</span> &amp;&amp; *<a class="code" href="a04223.html#a652">src</a> != <span class="charliteral">'\0'</span>) 
00913         {
00914                 result += *<a class="code" href="a04223.html#a652">src</a>;
00915                 ++<a class="code" href="a04223.html#a652">src</a>;
00916         }
00917         <span class="keywordflow">return</span> result;
00918 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="vertex_program_parse.cpp::letterToSwizzleComp" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool letterToSwizzleComp </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap> <em>letter</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03718.html#CVPSwizzlew0">CVPSwizzle::EComp</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>comp</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l00302">302</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
Referenced by <a class="el" href="a06718.html#l00315">CVPParser::parseSwizzle()</a>.
<p>
<div class="fragment"><pre>00303 {
00304         <span class="keywordflow">switch</span> (letter)
00305         {
00306                 <span class="keywordflow">case</span> <span class="charliteral">'x'</span>: comp = <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew2">CVPSwizzle::X</a>; <span class="keywordflow">return</span> <span class="keyword">true</span>;
00307                 <span class="keywordflow">case</span> <span class="charliteral">'y'</span>: comp = <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew3">CVPSwizzle::Y</a>; <span class="keywordflow">return</span> <span class="keyword">true</span>;
00308                 <span class="keywordflow">case</span> <span class="charliteral">'z'</span>: comp = <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew4">CVPSwizzle::Z</a>; <span class="keywordflow">return</span> <span class="keyword">true</span>;
00309                 <span class="keywordflow">case</span> <span class="charliteral">'w'</span>: comp = <a class="code" href="a03718.html#CVPSwizzlew0CVPSwizzlew1">CVPSwizzle::W</a>; <span class="keywordflow">return</span> <span class="keyword">true</span>;
00310         }
00311         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00312 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="vertex_program_parse.cpp::parseUInt" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* parseUInt </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06718.html#l00428">428</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05646.html#l01124">src</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06718.html#l00442">CVPParser::parseConstantRegister()</a>, and <a class="el" href="a06718.html#l00513">CVPParser::parseVariableRegister()</a>.
<p>
<div class="fragment"><pre>00429 {
00430         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = 0;
00431         <span class="keywordflow">while</span> (isdigit(*src))
00432         {
00433                 <a class="code" href="a04223.html#a566">index</a> = 10 * <a class="code" href="a04223.html#a566">index</a> + *<a class="code" href="a04223.html#a652">src</a> - <span class="charliteral">'0'</span>;
00434                 ++ <a class="code" href="a04223.html#a652">src</a>;
00435         }
00436         dest = <a class="code" href="a04223.html#a566">index</a>;
00437         <span class="keywordflow">return</span> <a class="code" href="a04223.html#a652">src</a>;
00438 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a0" doxytag="vertex_program_parse.cpp::instrToName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* <a class="el" href="a05295.html#a0">instrToName</a>[]<code> [static]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Initial value:</b><div class="fragment"><pre>
{
        <span class="stringliteral">"MOV  "</span>,
        <span class="stringliteral">"ARL  "</span>,
        <span class="stringliteral">"MUL  "</span>,
        <span class="stringliteral">"ADD  "</span>,
        <span class="stringliteral">"MAD  "</span>,
        <span class="stringliteral">"RSQ  "</span>,
        <span class="stringliteral">"DP3  "</span>,
        <span class="stringliteral">"DP4  "</span>,
        <span class="stringliteral">"DST  "</span>,
        <span class="stringliteral">"LIT  "</span>,
        <span class="stringliteral">"MIN  "</span>,
        <span class="stringliteral">"MAX  "</span>,
        <span class="stringliteral">"SLT  "</span>,
        <span class="stringliteral">"SGE  "</span>,
        <span class="stringliteral">"EXPP "</span>,
        <span class="stringliteral">"LOG  "</span>,
        <span class="stringliteral">"RCP  "</span>
}
</pre></div>
<p>
Definition at line <a class="el" href="a06718.html#l00969">969</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01091">dumpInstr()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="vertex_program_parse.cpp::outputRegisterToName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* <a class="el" href="a05295.html#a1">outputRegisterToName</a>[]<code> [static]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Initial value:</b><div class="fragment"><pre>
{
        <span class="stringliteral">"HPOS"</span>,
        <span class="stringliteral">"COL0"</span>,
        <span class="stringliteral">"COL1"</span>,
        <span class="stringliteral">"BFC0"</span>,
        <span class="stringliteral">"BFC1"</span>,
        <span class="stringliteral">"FOGC"</span>,
        <span class="stringliteral">"PSIZ"</span>,
        <span class="stringliteral">"TEX0"</span>,
        <span class="stringliteral">"TEX1"</span>,
        <span class="stringliteral">"TEX2"</span>,
        <span class="stringliteral">"TEX3"</span>,
        <span class="stringliteral">"TEX4"</span>,
        <span class="stringliteral">"TEX5"</span>,
        <span class="stringliteral">"TEX6"</span>,
        <span class="stringliteral">"TEX7"</span>
}
</pre></div>
<p>
Definition at line <a class="el" href="a06718.html#l00991">991</a> of file <a class="el" href="a06718.html">vertex_program_parse.cpp</a>.
<p>
Referenced by <a class="el" href="a06718.html#l01053">dumpOperand()</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:43:31 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>