set table size to 1023 and use new HASH_FUNC() macro
[mesa.git] / src / mesa / main / vtxfmt_tmp.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 6.3
4 *
5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors:
25 * Gareth Hughes
26 */
27
28 #ifndef PRE_LOOPBACK
29 #define PRE_LOOPBACK( FUNC )
30 #endif
31
32 static void GLAPIENTRY TAG(ArrayElement)( GLint i )
33 {
34 PRE_LOOPBACK( ArrayElement );
35 GL_CALL(ArrayElement)( i );
36 }
37
38 static void GLAPIENTRY TAG(Color3f)( GLfloat r, GLfloat g, GLfloat b )
39 {
40 PRE_LOOPBACK( Color3f );
41 GL_CALL(Color3f)( r, g, b );
42 }
43
44 static void GLAPIENTRY TAG(Color3fv)( const GLfloat *v )
45 {
46 PRE_LOOPBACK( Color3fv );
47 GL_CALL(Color3fv)( v );
48 }
49
50 static void GLAPIENTRY TAG(Color4f)( GLfloat r, GLfloat g, GLfloat b, GLfloat a )
51 {
52 PRE_LOOPBACK( Color4f );
53 GL_CALL(Color4f)( r, g, b, a );
54 }
55
56 static void GLAPIENTRY TAG(Color4fv)( const GLfloat *v )
57 {
58 PRE_LOOPBACK( Color4fv );
59 GL_CALL(Color4fv)( v );
60 }
61
62 static void GLAPIENTRY TAG(EdgeFlag)( GLboolean e )
63 {
64 PRE_LOOPBACK( EdgeFlag );
65 GL_CALL(EdgeFlag)( e );
66 }
67
68 static void GLAPIENTRY TAG(EdgeFlagv)( const GLboolean *v )
69 {
70 PRE_LOOPBACK( EdgeFlagv );
71 GL_CALL(EdgeFlagv)( v );
72 }
73
74 static void GLAPIENTRY TAG(EvalCoord1f)( GLfloat s )
75 {
76 PRE_LOOPBACK( EvalCoord1f );
77 GL_CALL(EvalCoord1f)( s );
78 }
79
80 static void GLAPIENTRY TAG(EvalCoord1fv)( const GLfloat *v )
81 {
82 PRE_LOOPBACK( EvalCoord1fv );
83 GL_CALL(EvalCoord1fv)( v );
84 }
85
86 static void GLAPIENTRY TAG(EvalCoord2f)( GLfloat s, GLfloat t )
87 {
88 PRE_LOOPBACK( EvalCoord2f );
89 GL_CALL(EvalCoord2f)( s, t );
90 }
91
92 static void GLAPIENTRY TAG(EvalCoord2fv)( const GLfloat *v )
93 {
94 PRE_LOOPBACK( EvalCoord2fv );
95 GL_CALL(EvalCoord2fv)( v );
96 }
97
98 static void GLAPIENTRY TAG(EvalPoint1)( GLint i )
99 {
100 PRE_LOOPBACK( EvalPoint1 );
101 GL_CALL(EvalPoint1)( i );
102 }
103
104 static void GLAPIENTRY TAG(EvalPoint2)( GLint i, GLint j )
105 {
106 PRE_LOOPBACK( EvalPoint2 );
107 GL_CALL(EvalPoint2)( i, j );
108 }
109
110 static void GLAPIENTRY TAG(FogCoordfEXT)( GLfloat f )
111 {
112 PRE_LOOPBACK( FogCoordfEXT );
113 GL_CALL(FogCoordfEXT)( f );
114 }
115
116 static void GLAPIENTRY TAG(FogCoordfvEXT)( const GLfloat *v )
117 {
118 PRE_LOOPBACK( FogCoordfvEXT );
119 GL_CALL(FogCoordfvEXT)( v );
120 }
121
122 static void GLAPIENTRY TAG(Indexf)( GLfloat f )
123 {
124 PRE_LOOPBACK( Indexf );
125 GL_CALL(Indexf)( f );
126 }
127
128 static void GLAPIENTRY TAG(Indexfv)( const GLfloat *v )
129 {
130 PRE_LOOPBACK( Indexfv );
131 GL_CALL(Indexfv)( v );
132 }
133
134 static void GLAPIENTRY TAG(Materialfv)( GLenum face, GLenum pname, const GLfloat *v )
135 {
136 PRE_LOOPBACK( Materialfv );
137 GL_CALL(Materialfv)( face, pname, v );
138 }
139
140 static void GLAPIENTRY TAG(MultiTexCoord1fARB)( GLenum target, GLfloat a )
141 {
142 PRE_LOOPBACK( MultiTexCoord1fARB );
143 GL_CALL(MultiTexCoord1fARB)( target, a );
144 }
145
146 static void GLAPIENTRY TAG(MultiTexCoord1fvARB)( GLenum target, const GLfloat *tc )
147 {
148 PRE_LOOPBACK( MultiTexCoord1fvARB );
149 GL_CALL(MultiTexCoord1fvARB)( target, tc );
150 }
151
152 static void GLAPIENTRY TAG(MultiTexCoord2fARB)( GLenum target, GLfloat s, GLfloat t )
153 {
154 PRE_LOOPBACK( MultiTexCoord2fARB );
155 GL_CALL(MultiTexCoord2fARB)( target, s, t );
156 }
157
158 static void GLAPIENTRY TAG(MultiTexCoord2fvARB)( GLenum target, const GLfloat *tc )
159 {
160 PRE_LOOPBACK( MultiTexCoord2fvARB );
161 GL_CALL(MultiTexCoord2fvARB)( target, tc );
162 }
163
164 static void GLAPIENTRY TAG(MultiTexCoord3fARB)( GLenum target, GLfloat s,
165 GLfloat t, GLfloat r )
166 {
167 PRE_LOOPBACK( MultiTexCoord3fARB );
168 GL_CALL(MultiTexCoord3fARB)( target, s, t, r );
169 }
170
171 static void GLAPIENTRY TAG(MultiTexCoord3fvARB)( GLenum target, const GLfloat *tc )
172 {
173 PRE_LOOPBACK( MultiTexCoord3fvARB );
174 GL_CALL(MultiTexCoord3fvARB)( target, tc );
175 }
176
177 static void GLAPIENTRY TAG(MultiTexCoord4fARB)( GLenum target, GLfloat s,
178 GLfloat t, GLfloat r, GLfloat q )
179 {
180 PRE_LOOPBACK( MultiTexCoord4fARB );
181 GL_CALL(MultiTexCoord4fARB)( target, s, t, r, q );
182 }
183
184 static void GLAPIENTRY TAG(MultiTexCoord4fvARB)( GLenum target, const GLfloat *tc )
185 {
186 PRE_LOOPBACK( MultiTexCoord4fvARB );
187 GL_CALL(MultiTexCoord4fvARB)( target, tc );
188 }
189
190 static void GLAPIENTRY TAG(Normal3f)( GLfloat x, GLfloat y, GLfloat z )
191 {
192 PRE_LOOPBACK( Normal3f );
193 GL_CALL(Normal3f)( x, y, z );
194 }
195
196 static void GLAPIENTRY TAG(Normal3fv)( const GLfloat *v )
197 {
198 PRE_LOOPBACK( Normal3fv );
199 GL_CALL(Normal3fv)( v );
200 }
201
202 static void GLAPIENTRY TAG(SecondaryColor3fEXT)( GLfloat r, GLfloat g, GLfloat b )
203 {
204 PRE_LOOPBACK( SecondaryColor3fEXT );
205 GL_CALL(SecondaryColor3fEXT)( r, g, b );
206 }
207
208 static void GLAPIENTRY TAG(SecondaryColor3fvEXT)( const GLfloat *v )
209 {
210 PRE_LOOPBACK( SecondaryColor3fvEXT );
211 GL_CALL(SecondaryColor3fvEXT)( v );
212 }
213
214 static void GLAPIENTRY TAG(TexCoord1f)( GLfloat s )
215 {
216 PRE_LOOPBACK( TexCoord1f );
217 GL_CALL(TexCoord1f)( s );
218 }
219
220 static void GLAPIENTRY TAG(TexCoord1fv)( const GLfloat *tc )
221 {
222 PRE_LOOPBACK( TexCoord1fv );
223 GL_CALL(TexCoord1fv)( tc );
224 }
225
226 static void GLAPIENTRY TAG(TexCoord2f)( GLfloat s, GLfloat t )
227 {
228 PRE_LOOPBACK( TexCoord2f );
229 GL_CALL(TexCoord2f)( s, t );
230 }
231
232 static void GLAPIENTRY TAG(TexCoord2fv)( const GLfloat *tc )
233 {
234 PRE_LOOPBACK( TexCoord2fv );
235 GL_CALL(TexCoord2fv)( tc );
236 }
237
238 static void GLAPIENTRY TAG(TexCoord3f)( GLfloat s, GLfloat t, GLfloat r )
239 {
240 PRE_LOOPBACK( TexCoord3f );
241 GL_CALL(TexCoord3f)( s, t, r );
242 }
243
244 static void GLAPIENTRY TAG(TexCoord3fv)( const GLfloat *tc )
245 {
246 PRE_LOOPBACK( TexCoord3fv );
247 GL_CALL(TexCoord3fv)( tc );
248 }
249
250 static void GLAPIENTRY TAG(TexCoord4f)( GLfloat s, GLfloat t, GLfloat r, GLfloat q )
251 {
252 PRE_LOOPBACK( TexCoord4f );
253 GL_CALL(TexCoord4f)( s, t, r, q );
254 }
255
256 static void GLAPIENTRY TAG(TexCoord4fv)( const GLfloat *tc )
257 {
258 PRE_LOOPBACK( TexCoord4fv );
259 GL_CALL(TexCoord4fv)( tc );
260 }
261
262 static void GLAPIENTRY TAG(Vertex2f)( GLfloat x, GLfloat y )
263 {
264 PRE_LOOPBACK( Vertex2f );
265 GL_CALL(Vertex2f)( x, y );
266 }
267
268 static void GLAPIENTRY TAG(Vertex2fv)( const GLfloat *v )
269 {
270 PRE_LOOPBACK( Vertex2fv );
271 GL_CALL(Vertex2fv)( v );
272 }
273
274 static void GLAPIENTRY TAG(Vertex3f)( GLfloat x, GLfloat y, GLfloat z )
275 {
276 PRE_LOOPBACK( Vertex3f );
277 GL_CALL(Vertex3f)( x, y, z );
278 }
279
280 static void GLAPIENTRY TAG(Vertex3fv)( const GLfloat *v )
281 {
282 PRE_LOOPBACK( Vertex3fv );
283 GL_CALL(Vertex3fv)( v );
284 }
285
286 static void GLAPIENTRY TAG(Vertex4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
287 {
288 PRE_LOOPBACK( Vertex4f );
289 GL_CALL(Vertex4f)( x, y, z, w );
290 }
291
292 static void GLAPIENTRY TAG(Vertex4fv)( const GLfloat *v )
293 {
294 PRE_LOOPBACK( Vertex4fv );
295 GL_CALL(Vertex4fv)( v );
296 }
297
298 static void GLAPIENTRY TAG(CallList)( GLuint i )
299 {
300 PRE_LOOPBACK( CallList );
301 GL_CALL(CallList)( i );
302 }
303
304 static void GLAPIENTRY TAG(CallLists)( GLsizei sz, GLenum type, const GLvoid *v )
305 {
306 PRE_LOOPBACK( CallLists );
307 GL_CALL(CallLists)( sz, type, v );
308 }
309
310 static void GLAPIENTRY TAG(Begin)( GLenum mode )
311 {
312 PRE_LOOPBACK( Begin );
313 GL_CALL(Begin)( mode );
314 }
315
316 static void GLAPIENTRY TAG(End)( void )
317 {
318 PRE_LOOPBACK( End );
319 GL_CALL(End)();
320 }
321
322 static void GLAPIENTRY TAG(Rectf)( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
323 {
324 PRE_LOOPBACK( Rectf );
325 GL_CALL(Rectf)( x1, y1, x2, y2 );
326 }
327
328 static void GLAPIENTRY TAG(DrawArrays)( GLenum mode, GLint start, GLsizei count )
329 {
330 PRE_LOOPBACK( DrawArrays );
331 GL_CALL(DrawArrays)( mode, start, count );
332 }
333
334 static void GLAPIENTRY TAG(DrawElements)( GLenum mode, GLsizei count, GLenum type,
335 const GLvoid *indices )
336 {
337 PRE_LOOPBACK( DrawElements );
338 GL_CALL(DrawElements)( mode, count, type, indices );
339 }
340
341 static void GLAPIENTRY TAG(DrawRangeElements)( GLenum mode, GLuint start,
342 GLuint end, GLsizei count,
343 GLenum type, const GLvoid *indices )
344 {
345 PRE_LOOPBACK( DrawRangeElements );
346 GL_CALL(DrawRangeElements)( mode, start, end, count, type, indices );
347 }
348
349 static void GLAPIENTRY TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 )
350 {
351 PRE_LOOPBACK( EvalMesh1 );
352 GL_CALL(EvalMesh1)( mode, i1, i2 );
353 }
354
355 static void GLAPIENTRY TAG(EvalMesh2)( GLenum mode, GLint i1, GLint i2,
356 GLint j1, GLint j2 )
357 {
358 PRE_LOOPBACK( EvalMesh2 );
359 GL_CALL(EvalMesh2)( mode, i1, i2, j1, j2 );
360 }
361
362 static void GLAPIENTRY TAG(VertexAttrib1fNV)( GLuint index, GLfloat x )
363 {
364 PRE_LOOPBACK( VertexAttrib1fNV );
365 GL_CALL(VertexAttrib1fNV)( index, x );
366 }
367
368 static void GLAPIENTRY TAG(VertexAttrib1fvNV)( GLuint index, const GLfloat *v )
369 {
370 PRE_LOOPBACK( VertexAttrib1fvNV );
371 GL_CALL(VertexAttrib1fvNV)( index, v );
372 }
373
374 static void GLAPIENTRY TAG(VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y )
375 {
376 PRE_LOOPBACK( VertexAttrib2fNV );
377 GL_CALL(VertexAttrib2fNV)( index, x, y );
378 }
379
380 static void GLAPIENTRY TAG(VertexAttrib2fvNV)( GLuint index, const GLfloat *v )
381 {
382 PRE_LOOPBACK( VertexAttrib2fvNV );
383 GL_CALL(VertexAttrib2fvNV)( index, v );
384 }
385
386 static void GLAPIENTRY TAG(VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z )
387 {
388 PRE_LOOPBACK( VertexAttrib3fNV );
389 GL_CALL(VertexAttrib3fNV)( index, x, y, z );
390 }
391
392 static void GLAPIENTRY TAG(VertexAttrib3fvNV)( GLuint index, const GLfloat *v )
393 {
394 PRE_LOOPBACK( VertexAttrib3fvNV );
395 GL_CALL(VertexAttrib3fvNV)( index, v );
396 }
397
398 static void GLAPIENTRY TAG(VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
399 {
400 PRE_LOOPBACK( VertexAttrib4fNV );
401 GL_CALL(VertexAttrib4fNV)( index, x, y, z, w );
402 }
403
404 static void GLAPIENTRY TAG(VertexAttrib4fvNV)( GLuint index, const GLfloat *v )
405 {
406 PRE_LOOPBACK( VertexAttrib4fvNV );
407 GL_CALL(VertexAttrib4fvNV)( index, v );
408 }
409
410
411 static void GLAPIENTRY TAG(VertexAttrib1fARB)( GLuint index, GLfloat x )
412 {
413 PRE_LOOPBACK( VertexAttrib1fARB );
414 GL_CALL(VertexAttrib1fARB)( index, x );
415 }
416
417 static void GLAPIENTRY TAG(VertexAttrib1fvARB)( GLuint index, const GLfloat *v )
418 {
419 PRE_LOOPBACK( VertexAttrib1fvARB );
420 GL_CALL(VertexAttrib1fvARB)( index, v );
421 }
422
423 static void GLAPIENTRY TAG(VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y )
424 {
425 PRE_LOOPBACK( VertexAttrib2fARB );
426 GL_CALL(VertexAttrib2fARB)( index, x, y );
427 }
428
429 static void GLAPIENTRY TAG(VertexAttrib2fvARB)( GLuint index, const GLfloat *v )
430 {
431 PRE_LOOPBACK( VertexAttrib2fvARB );
432 GL_CALL(VertexAttrib2fvARB)( index, v );
433 }
434
435 static void GLAPIENTRY TAG(VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z )
436 {
437 PRE_LOOPBACK( VertexAttrib3fARB );
438 GL_CALL(VertexAttrib3fARB)( index, x, y, z );
439 }
440
441 static void GLAPIENTRY TAG(VertexAttrib3fvARB)( GLuint index, const GLfloat *v )
442 {
443 PRE_LOOPBACK( VertexAttrib3fvARB );
444 GL_CALL(VertexAttrib3fvARB)( index, v );
445 }
446
447 static void GLAPIENTRY TAG(VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
448 {
449 PRE_LOOPBACK( VertexAttrib4fARB );
450 GL_CALL(VertexAttrib4fARB)( index, x, y, z, w );
451 }
452
453 static void GLAPIENTRY TAG(VertexAttrib4fvARB)( GLuint index, const GLfloat *v )
454 {
455 PRE_LOOPBACK( VertexAttrib4fvARB );
456 GL_CALL(VertexAttrib4fvARB)( index, v );
457 }
458
459
460 static GLvertexformat TAG(vtxfmt) = {
461 TAG(ArrayElement),
462 TAG(Color3f),
463 TAG(Color3fv),
464 TAG(Color4f),
465 TAG(Color4fv),
466 TAG(EdgeFlag),
467 TAG(EdgeFlagv),
468 TAG(EvalCoord1f),
469 TAG(EvalCoord1fv),
470 TAG(EvalCoord2f),
471 TAG(EvalCoord2fv),
472 TAG(EvalPoint1),
473 TAG(EvalPoint2),
474 TAG(FogCoordfEXT),
475 TAG(FogCoordfvEXT),
476 TAG(Indexf),
477 TAG(Indexfv),
478 TAG(Materialfv),
479 TAG(MultiTexCoord1fARB),
480 TAG(MultiTexCoord1fvARB),
481 TAG(MultiTexCoord2fARB),
482 TAG(MultiTexCoord2fvARB),
483 TAG(MultiTexCoord3fARB),
484 TAG(MultiTexCoord3fvARB),
485 TAG(MultiTexCoord4fARB),
486 TAG(MultiTexCoord4fvARB),
487 TAG(Normal3f),
488 TAG(Normal3fv),
489 TAG(SecondaryColor3fEXT),
490 TAG(SecondaryColor3fvEXT),
491 TAG(TexCoord1f),
492 TAG(TexCoord1fv),
493 TAG(TexCoord2f),
494 TAG(TexCoord2fv),
495 TAG(TexCoord3f),
496 TAG(TexCoord3fv),
497 TAG(TexCoord4f),
498 TAG(TexCoord4fv),
499 TAG(Vertex2f),
500 TAG(Vertex2fv),
501 TAG(Vertex3f),
502 TAG(Vertex3fv),
503 TAG(Vertex4f),
504 TAG(Vertex4fv),
505 TAG(CallList),
506 TAG(CallLists),
507 TAG(Begin),
508 TAG(End),
509 TAG(VertexAttrib1fNV),
510 TAG(VertexAttrib1fvNV),
511 TAG(VertexAttrib2fNV),
512 TAG(VertexAttrib2fvNV),
513 TAG(VertexAttrib3fNV),
514 TAG(VertexAttrib3fvNV),
515 TAG(VertexAttrib4fNV),
516 TAG(VertexAttrib4fvNV),
517 TAG(VertexAttrib1fARB),
518 TAG(VertexAttrib1fvARB),
519 TAG(VertexAttrib2fARB),
520 TAG(VertexAttrib2fvARB),
521 TAG(VertexAttrib3fARB),
522 TAG(VertexAttrib3fvARB),
523 TAG(VertexAttrib4fARB),
524 TAG(VertexAttrib4fvARB),
525 TAG(Rectf),
526 TAG(DrawArrays),
527 TAG(DrawElements),
528 TAG(DrawRangeElements),
529 TAG(EvalMesh1),
530 TAG(EvalMesh2)
531 };
532
533 #undef TAG
534 #undef PRE_LOOPBACK