mesa: remove empty glthread.h file
[mesa.git] / src / mesa / main / api_loopback.c
1 /**
2 * \file api_loopback.c
3 *
4 * \author Keith Whitwell <keithw@vmware.com>
5 */
6
7 /*
8 * Mesa 3-D graphics library
9 *
10 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 * OTHER DEALINGS IN THE SOFTWARE.
29 */
30
31
32 #include "glheader.h"
33 #include "macros.h"
34 #include "api_loopback.h"
35 #include "mtypes.h"
36 #include "glapi/glapi.h"
37 #include "main/dispatch.h"
38 #include "main/context.h"
39
40 /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
41 * calls to a smaller set of driver-provided formats. Currently just
42 * go back to dispatch to find these (eg. call glNormal3f directly),
43 * hence 'loopback'.
44 *
45 * The driver must supply all of the remaining entry points, which are
46 * listed in dd.h. The easiest way for a driver to do this is to
47 * install the supplied software t&l module.
48 */
49 #define COLORF(r,g,b,a) CALL_Color4f(GET_DISPATCH(), (r,g,b,a))
50 #define VERTEX2(x,y) CALL_Vertex2f(GET_DISPATCH(), (x,y))
51 #define VERTEX3(x,y,z) CALL_Vertex3f(GET_DISPATCH(), (x,y,z))
52 #define VERTEX4(x,y,z,w) CALL_Vertex4f(GET_DISPATCH(), (x,y,z,w))
53 #define NORMAL(x,y,z) CALL_Normal3f(GET_DISPATCH(), (x,y,z))
54 #define TEXCOORD1(s) CALL_TexCoord1f(GET_DISPATCH(), (s))
55 #define TEXCOORD2(s,t) CALL_TexCoord2f(GET_DISPATCH(), (s,t))
56 #define TEXCOORD3(s,t,u) CALL_TexCoord3f(GET_DISPATCH(), (s,t,u))
57 #define TEXCOORD4(s,t,u,v) CALL_TexCoord4f(GET_DISPATCH(), (s,t,u,v))
58 #define INDEX(c) CALL_Indexf(GET_DISPATCH(), (c))
59 #define MULTI_TEXCOORD1(z,s) CALL_MultiTexCoord1fARB(GET_DISPATCH(), (z,s))
60 #define MULTI_TEXCOORD2(z,s,t) CALL_MultiTexCoord2fARB(GET_DISPATCH(), (z,s,t))
61 #define MULTI_TEXCOORD3(z,s,t,u) CALL_MultiTexCoord3fARB(GET_DISPATCH(), (z,s,t,u))
62 #define MULTI_TEXCOORD4(z,s,t,u,v) CALL_MultiTexCoord4fARB(GET_DISPATCH(), (z,s,t,u,v))
63 #define EVALCOORD1(x) CALL_EvalCoord1f(GET_DISPATCH(), (x))
64 #define EVALCOORD2(x,y) CALL_EvalCoord2f(GET_DISPATCH(), (x,y))
65 #define MATERIALFV(a,b,c) CALL_Materialfv(GET_DISPATCH(), (a,b,c))
66 #define RECTF(a,b,c,d) CALL_Rectf(GET_DISPATCH(), (a,b,c,d))
67
68 #define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
69 #define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
70
71 #define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
72 #define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
73 #define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z))
74 #define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w))
75
76 #define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x))
77 #define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y))
78 #define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z))
79 #define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w))
80
81 #define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x))
82 #define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x))
83 #define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w))
84
85 #define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w))
86
87
88 void GLAPIENTRY
89 _mesa_Color3b( GLbyte red, GLbyte green, GLbyte blue )
90 {
91 COLORF( BYTE_TO_FLOAT(red),
92 BYTE_TO_FLOAT(green),
93 BYTE_TO_FLOAT(blue),
94 1.0 );
95 }
96
97 void GLAPIENTRY
98 _mesa_Color3d( GLdouble red, GLdouble green, GLdouble blue )
99 {
100 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 );
101 }
102
103 void GLAPIENTRY
104 _mesa_Color3i( GLint red, GLint green, GLint blue )
105 {
106 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
107 INT_TO_FLOAT(blue), 1.0);
108 }
109
110 void GLAPIENTRY
111 _mesa_Color3s( GLshort red, GLshort green, GLshort blue )
112 {
113 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
114 SHORT_TO_FLOAT(blue), 1.0);
115 }
116
117 void GLAPIENTRY
118 _mesa_Color3ui( GLuint red, GLuint green, GLuint blue )
119 {
120 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
121 UINT_TO_FLOAT(blue), 1.0 );
122 }
123
124 void GLAPIENTRY
125 _mesa_Color3us( GLushort red, GLushort green, GLushort blue )
126 {
127 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
128 USHORT_TO_FLOAT(blue), 1.0 );
129 }
130
131 void GLAPIENTRY
132 _mesa_Color3ub( GLubyte red, GLubyte green, GLubyte blue )
133 {
134 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
135 UBYTE_TO_FLOAT(blue), 1.0 );
136 }
137
138
139 void GLAPIENTRY
140 _mesa_Color3bv( const GLbyte *v )
141 {
142 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
143 BYTE_TO_FLOAT(v[2]), 1.0 );
144 }
145
146 void GLAPIENTRY
147 _mesa_Color3dv( const GLdouble *v )
148 {
149 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 );
150 }
151
152 void GLAPIENTRY
153 _mesa_Color3iv( const GLint *v )
154 {
155 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
156 INT_TO_FLOAT(v[2]), 1.0 );
157 }
158
159 void GLAPIENTRY
160 _mesa_Color3sv( const GLshort *v )
161 {
162 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
163 SHORT_TO_FLOAT(v[2]), 1.0 );
164 }
165
166 void GLAPIENTRY
167 _mesa_Color3uiv( const GLuint *v )
168 {
169 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
170 UINT_TO_FLOAT(v[2]), 1.0 );
171 }
172
173 void GLAPIENTRY
174 _mesa_Color3usv( const GLushort *v )
175 {
176 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
177 USHORT_TO_FLOAT(v[2]), 1.0 );
178 }
179
180 void GLAPIENTRY
181 _mesa_Color3ubv( const GLubyte *v )
182 {
183 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
184 UBYTE_TO_FLOAT(v[2]), 1.0 );
185 }
186
187
188 void GLAPIENTRY
189 _mesa_Color4b( GLbyte red, GLbyte green, GLbyte blue,
190 GLbyte alpha )
191 {
192 COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
193 BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) );
194 }
195
196 void GLAPIENTRY
197 _mesa_Color4d( GLdouble red, GLdouble green, GLdouble blue,
198 GLdouble alpha )
199 {
200 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha );
201 }
202
203 void GLAPIENTRY
204 _mesa_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
205 {
206 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
207 INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) );
208 }
209
210 void GLAPIENTRY
211 _mesa_Color4s( GLshort red, GLshort green, GLshort blue,
212 GLshort alpha )
213 {
214 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
215 SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) );
216 }
217
218 void GLAPIENTRY
219 _mesa_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
220 {
221 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
222 UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) );
223 }
224
225 void GLAPIENTRY
226 _mesa_Color4us( GLushort red, GLushort green, GLushort blue, GLushort alpha )
227 {
228 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
229 USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) );
230 }
231
232 void GLAPIENTRY
233 _mesa_Color4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
234 {
235 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
236 UBYTE_TO_FLOAT(blue), UBYTE_TO_FLOAT(alpha) );
237 }
238
239
240 void GLAPIENTRY
241 _mesa_Color4iv( const GLint *v )
242 {
243 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
244 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
245 }
246
247
248 void GLAPIENTRY
249 _mesa_Color4bv( const GLbyte *v )
250 {
251 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
252 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) );
253 }
254
255 void GLAPIENTRY
256 _mesa_Color4dv( const GLdouble *v )
257 {
258 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] );
259 }
260
261
262 void GLAPIENTRY
263 _mesa_Color4sv( const GLshort *v)
264 {
265 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
266 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) );
267 }
268
269
270 void GLAPIENTRY
271 _mesa_Color4uiv( const GLuint *v)
272 {
273 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
274 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) );
275 }
276
277 void GLAPIENTRY
278 _mesa_Color4usv( const GLushort *v)
279 {
280 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
281 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) );
282 }
283
284 void GLAPIENTRY
285 _mesa_Color4ubv( const GLubyte *v)
286 {
287 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
288 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]) );
289 }
290
291
292 void GLAPIENTRY
293 _mesa_FogCoordd( GLdouble d )
294 {
295 FOGCOORDF( (GLfloat) d );
296 }
297
298 void GLAPIENTRY
299 _mesa_FogCoorddv( const GLdouble *v )
300 {
301 FOGCOORDF( (GLfloat) *v );
302 }
303
304
305 void GLAPIENTRY
306 _mesa_Indexd( GLdouble c )
307 {
308 INDEX( (GLfloat) c );
309 }
310
311 void GLAPIENTRY
312 _mesa_Indexi( GLint c )
313 {
314 INDEX( (GLfloat) c );
315 }
316
317 void GLAPIENTRY
318 _mesa_Indexs( GLshort c )
319 {
320 INDEX( (GLfloat) c );
321 }
322
323 void GLAPIENTRY
324 _mesa_Indexub( GLubyte c )
325 {
326 INDEX( (GLfloat) c );
327 }
328
329 void GLAPIENTRY
330 _mesa_Indexdv( const GLdouble *c )
331 {
332 INDEX( (GLfloat) *c );
333 }
334
335 void GLAPIENTRY
336 _mesa_Indexiv( const GLint *c )
337 {
338 INDEX( (GLfloat) *c );
339 }
340
341 void GLAPIENTRY
342 _mesa_Indexsv( const GLshort *c )
343 {
344 INDEX( (GLfloat) *c );
345 }
346
347 void GLAPIENTRY
348 _mesa_Indexubv( const GLubyte *c )
349 {
350 INDEX( (GLfloat) *c );
351 }
352
353
354 void GLAPIENTRY
355 _mesa_EdgeFlagv(const GLboolean *flag)
356 {
357 CALL_EdgeFlag(GET_DISPATCH(), (*flag));
358 }
359
360
361 void GLAPIENTRY
362 _mesa_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
363 {
364 NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
365 }
366
367 void GLAPIENTRY
368 _mesa_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
369 {
370 NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
371 }
372
373 void GLAPIENTRY
374 _mesa_Normal3i( GLint nx, GLint ny, GLint nz )
375 {
376 NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
377 }
378
379 void GLAPIENTRY
380 _mesa_Normal3s( GLshort nx, GLshort ny, GLshort nz )
381 {
382 NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
383 }
384
385 void GLAPIENTRY
386 _mesa_Normal3bv( const GLbyte *v )
387 {
388 NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
389 }
390
391 void GLAPIENTRY
392 _mesa_Normal3dv( const GLdouble *v )
393 {
394 NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
395 }
396
397 void GLAPIENTRY
398 _mesa_Normal3iv( const GLint *v )
399 {
400 NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
401 }
402
403 void GLAPIENTRY
404 _mesa_Normal3sv( const GLshort *v )
405 {
406 NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
407 }
408
409 void GLAPIENTRY
410 _mesa_TexCoord1d( GLdouble s )
411 {
412 TEXCOORD1((GLfloat) s);
413 }
414
415 void GLAPIENTRY
416 _mesa_TexCoord1i( GLint s )
417 {
418 TEXCOORD1((GLfloat) s);
419 }
420
421 void GLAPIENTRY
422 _mesa_TexCoord1s( GLshort s )
423 {
424 TEXCOORD1((GLfloat) s);
425 }
426
427 void GLAPIENTRY
428 _mesa_TexCoord2d( GLdouble s, GLdouble t )
429 {
430 TEXCOORD2((GLfloat) s,(GLfloat) t);
431 }
432
433 void GLAPIENTRY
434 _mesa_TexCoord2s( GLshort s, GLshort t )
435 {
436 TEXCOORD2((GLfloat) s,(GLfloat) t);
437 }
438
439 void GLAPIENTRY
440 _mesa_TexCoord2i( GLint s, GLint t )
441 {
442 TEXCOORD2((GLfloat) s,(GLfloat) t);
443 }
444
445 void GLAPIENTRY
446 _mesa_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
447 {
448 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
449 }
450
451 void GLAPIENTRY
452 _mesa_TexCoord3i( GLint s, GLint t, GLint r )
453 {
454 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
455 }
456
457 void GLAPIENTRY
458 _mesa_TexCoord3s( GLshort s, GLshort t, GLshort r )
459 {
460 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
461 }
462
463 void GLAPIENTRY
464 _mesa_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
465 {
466 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
467 }
468
469 void GLAPIENTRY
470 _mesa_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
471 {
472 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
473 }
474
475 void GLAPIENTRY
476 _mesa_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
477 {
478 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
479 }
480
481 void GLAPIENTRY
482 _mesa_TexCoord1dv( const GLdouble *v )
483 {
484 TEXCOORD1((GLfloat) v[0]);
485 }
486
487 void GLAPIENTRY
488 _mesa_TexCoord1iv( const GLint *v )
489 {
490 TEXCOORD1((GLfloat) v[0]);
491 }
492
493 void GLAPIENTRY
494 _mesa_TexCoord1sv( const GLshort *v )
495 {
496 TEXCOORD1((GLfloat) v[0]);
497 }
498
499 void GLAPIENTRY
500 _mesa_TexCoord2dv( const GLdouble *v )
501 {
502 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
503 }
504
505 void GLAPIENTRY
506 _mesa_TexCoord2iv( const GLint *v )
507 {
508 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
509 }
510
511 void GLAPIENTRY
512 _mesa_TexCoord2sv( const GLshort *v )
513 {
514 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
515 }
516
517 void GLAPIENTRY
518 _mesa_TexCoord3dv( const GLdouble *v )
519 {
520 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
521 }
522
523 void GLAPIENTRY
524 _mesa_TexCoord3iv( const GLint *v )
525 {
526 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
527 }
528
529 void GLAPIENTRY
530 _mesa_TexCoord3sv( const GLshort *v )
531 {
532 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
533 }
534
535 void GLAPIENTRY
536 _mesa_TexCoord4dv( const GLdouble *v )
537 {
538 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
539 }
540
541 void GLAPIENTRY
542 _mesa_TexCoord4iv( const GLint *v )
543 {
544 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
545 }
546
547 void GLAPIENTRY
548 _mesa_TexCoord4sv( const GLshort *v )
549 {
550 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
551 }
552
553 void GLAPIENTRY
554 _mesa_Vertex2d( GLdouble x, GLdouble y )
555 {
556 VERTEX2( (GLfloat) x, (GLfloat) y );
557 }
558
559 void GLAPIENTRY
560 _mesa_Vertex2i( GLint x, GLint y )
561 {
562 VERTEX2( (GLfloat) x, (GLfloat) y );
563 }
564
565 void GLAPIENTRY
566 _mesa_Vertex2s( GLshort x, GLshort y )
567 {
568 VERTEX2( (GLfloat) x, (GLfloat) y );
569 }
570
571 void GLAPIENTRY
572 _mesa_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
573 {
574 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
575 }
576
577 void GLAPIENTRY
578 _mesa_Vertex3i( GLint x, GLint y, GLint z )
579 {
580 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
581 }
582
583 void GLAPIENTRY
584 _mesa_Vertex3s( GLshort x, GLshort y, GLshort z )
585 {
586 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
587 }
588
589 void GLAPIENTRY
590 _mesa_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
591 {
592 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
593 }
594
595 void GLAPIENTRY
596 _mesa_Vertex4i( GLint x, GLint y, GLint z, GLint w )
597 {
598 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
599 }
600
601 void GLAPIENTRY
602 _mesa_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
603 {
604 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
605 }
606
607 void GLAPIENTRY
608 _mesa_Vertex2dv( const GLdouble *v )
609 {
610 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
611 }
612
613 void GLAPIENTRY
614 _mesa_Vertex2iv( const GLint *v )
615 {
616 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
617 }
618
619 void GLAPIENTRY
620 _mesa_Vertex2sv( const GLshort *v )
621 {
622 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
623 }
624
625 void GLAPIENTRY
626 _mesa_Vertex3dv( const GLdouble *v )
627 {
628 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
629 }
630
631 void GLAPIENTRY
632 _mesa_Vertex3iv( const GLint *v )
633 {
634 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
635 }
636
637 void GLAPIENTRY
638 _mesa_Vertex3sv( const GLshort *v )
639 {
640 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
641 }
642
643 void GLAPIENTRY
644 _mesa_Vertex4dv( const GLdouble *v )
645 {
646 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
647 (GLfloat) v[2], (GLfloat) v[3] );
648 }
649
650 void GLAPIENTRY
651 _mesa_Vertex4iv( const GLint *v )
652 {
653 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
654 (GLfloat) v[2], (GLfloat) v[3] );
655 }
656
657 void GLAPIENTRY
658 _mesa_Vertex4sv( const GLshort *v )
659 {
660 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
661 (GLfloat) v[2], (GLfloat) v[3] );
662 }
663
664 void GLAPIENTRY
665 _mesa_MultiTexCoord1d(GLenum target, GLdouble s)
666 {
667 MULTI_TEXCOORD1( target, (GLfloat) s );
668 }
669
670 void GLAPIENTRY
671 _mesa_MultiTexCoord1dv(GLenum target, const GLdouble *v)
672 {
673 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
674 }
675
676 void GLAPIENTRY
677 _mesa_MultiTexCoord1i(GLenum target, GLint s)
678 {
679 MULTI_TEXCOORD1( target, (GLfloat) s );
680 }
681
682 void GLAPIENTRY
683 _mesa_MultiTexCoord1iv(GLenum target, const GLint *v)
684 {
685 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
686 }
687
688 void GLAPIENTRY
689 _mesa_MultiTexCoord1s(GLenum target, GLshort s)
690 {
691 MULTI_TEXCOORD1( target, (GLfloat) s );
692 }
693
694 void GLAPIENTRY
695 _mesa_MultiTexCoord1sv(GLenum target, const GLshort *v)
696 {
697 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
698 }
699
700 void GLAPIENTRY
701 _mesa_MultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
702 {
703 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
704 }
705
706 void GLAPIENTRY
707 _mesa_MultiTexCoord2dv(GLenum target, const GLdouble *v)
708 {
709 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
710 }
711
712 void GLAPIENTRY
713 _mesa_MultiTexCoord2i(GLenum target, GLint s, GLint t)
714 {
715 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
716 }
717
718 void GLAPIENTRY
719 _mesa_MultiTexCoord2iv(GLenum target, const GLint *v)
720 {
721 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
722 }
723
724 void GLAPIENTRY
725 _mesa_MultiTexCoord2s(GLenum target, GLshort s, GLshort t)
726 {
727 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
728 }
729
730 void GLAPIENTRY
731 _mesa_MultiTexCoord2sv(GLenum target, const GLshort *v)
732 {
733 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
734 }
735
736 void GLAPIENTRY
737 _mesa_MultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
738 {
739 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
740 }
741
742 void GLAPIENTRY
743 _mesa_MultiTexCoord3dv(GLenum target, const GLdouble *v)
744 {
745 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
746 }
747
748 void GLAPIENTRY
749 _mesa_MultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
750 {
751 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
752 }
753
754 void GLAPIENTRY
755 _mesa_MultiTexCoord3iv(GLenum target, const GLint *v)
756 {
757 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
758 }
759
760 void GLAPIENTRY
761 _mesa_MultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
762 {
763 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
764 }
765
766 void GLAPIENTRY
767 _mesa_MultiTexCoord3sv(GLenum target, const GLshort *v)
768 {
769 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
770 }
771
772 void GLAPIENTRY
773 _mesa_MultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
774 {
775 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
776 (GLfloat) r, (GLfloat) q );
777 }
778
779 void GLAPIENTRY
780 _mesa_MultiTexCoord4dv(GLenum target, const GLdouble *v)
781 {
782 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
783 (GLfloat) v[2], (GLfloat) v[3] );
784 }
785
786 void GLAPIENTRY
787 _mesa_MultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
788 {
789 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
790 (GLfloat) r, (GLfloat) q );
791 }
792
793 void GLAPIENTRY
794 _mesa_MultiTexCoord4iv(GLenum target, const GLint *v)
795 {
796 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
797 (GLfloat) v[2], (GLfloat) v[3] );
798 }
799
800 void GLAPIENTRY
801 _mesa_MultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
802 {
803 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
804 (GLfloat) r, (GLfloat) q );
805 }
806
807 void GLAPIENTRY
808 _mesa_MultiTexCoord4sv(GLenum target, const GLshort *v)
809 {
810 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
811 (GLfloat) v[2], (GLfloat) v[3] );
812 }
813
814 void GLAPIENTRY
815 _mesa_EvalCoord2dv( const GLdouble *u )
816 {
817 EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
818 }
819
820 void GLAPIENTRY
821 _mesa_EvalCoord2fv( const GLfloat *u )
822 {
823 EVALCOORD2( u[0], u[1] );
824 }
825
826 void GLAPIENTRY
827 _mesa_EvalCoord2d( GLdouble u, GLdouble v )
828 {
829 EVALCOORD2( (GLfloat) u, (GLfloat) v );
830 }
831
832 void GLAPIENTRY
833 _mesa_EvalCoord1dv( const GLdouble *u )
834 {
835 EVALCOORD1( (GLfloat) *u );
836 }
837
838 void GLAPIENTRY
839 _mesa_EvalCoord1fv( const GLfloat *u )
840 {
841 EVALCOORD1( (GLfloat) *u );
842 }
843
844 void GLAPIENTRY
845 _mesa_EvalCoord1d( GLdouble u )
846 {
847 EVALCOORD1( (GLfloat) u );
848 }
849
850 void GLAPIENTRY
851 _mesa_Materialf( GLenum face, GLenum pname, GLfloat param )
852 {
853 GLfloat fparam[4];
854 fparam[0] = param;
855 MATERIALFV( face, pname, fparam );
856 }
857
858 void GLAPIENTRY
859 _mesa_Materiali(GLenum face, GLenum pname, GLint param )
860 {
861 GLfloat p = (GLfloat) param;
862 MATERIALFV(face, pname, &p);
863 }
864
865 void GLAPIENTRY
866 _mesa_Materialiv(GLenum face, GLenum pname, const GLint *params )
867 {
868 GLfloat fparam[4];
869 switch (pname) {
870 case GL_AMBIENT:
871 case GL_DIFFUSE:
872 case GL_SPECULAR:
873 case GL_EMISSION:
874 case GL_AMBIENT_AND_DIFFUSE:
875 fparam[0] = INT_TO_FLOAT( params[0] );
876 fparam[1] = INT_TO_FLOAT( params[1] );
877 fparam[2] = INT_TO_FLOAT( params[2] );
878 fparam[3] = INT_TO_FLOAT( params[3] );
879 break;
880 case GL_SHININESS:
881 fparam[0] = (GLfloat) params[0];
882 break;
883 case GL_COLOR_INDEXES:
884 fparam[0] = (GLfloat) params[0];
885 fparam[1] = (GLfloat) params[1];
886 fparam[2] = (GLfloat) params[2];
887 break;
888 default:
889 ;
890 }
891 MATERIALFV(face, pname, fparam);
892 }
893
894
895 void GLAPIENTRY
896 _mesa_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
897 {
898 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
899 }
900
901 void GLAPIENTRY
902 _mesa_Rectdv(const GLdouble *v1, const GLdouble *v2)
903 {
904 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
905 }
906
907 void GLAPIENTRY
908 _mesa_Rectfv(const GLfloat *v1, const GLfloat *v2)
909 {
910 RECTF(v1[0], v1[1], v2[0], v2[1]);
911 }
912
913 void GLAPIENTRY
914 _mesa_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
915 {
916 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
917 }
918
919 void GLAPIENTRY
920 _mesa_Rectiv(const GLint *v1, const GLint *v2)
921 {
922 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
923 }
924
925 void GLAPIENTRY
926 _mesa_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
927 {
928 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
929 }
930
931 void GLAPIENTRY
932 _mesa_Rectsv(const GLshort *v1, const GLshort *v2)
933 {
934 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
935 }
936
937 void GLAPIENTRY
938 _mesa_SecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue )
939 {
940 SECONDARYCOLORF( BYTE_TO_FLOAT(red),
941 BYTE_TO_FLOAT(green),
942 BYTE_TO_FLOAT(blue) );
943 }
944
945 void GLAPIENTRY
946 _mesa_SecondaryColor3d( GLdouble red, GLdouble green, GLdouble blue )
947 {
948 SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
949 }
950
951 void GLAPIENTRY
952 _mesa_SecondaryColor3i( GLint red, GLint green, GLint blue )
953 {
954 SECONDARYCOLORF( INT_TO_FLOAT(red),
955 INT_TO_FLOAT(green),
956 INT_TO_FLOAT(blue));
957 }
958
959 void GLAPIENTRY
960 _mesa_SecondaryColor3s( GLshort red, GLshort green, GLshort blue )
961 {
962 SECONDARYCOLORF(SHORT_TO_FLOAT(red),
963 SHORT_TO_FLOAT(green),
964 SHORT_TO_FLOAT(blue));
965 }
966
967 void GLAPIENTRY
968 _mesa_SecondaryColor3ui( GLuint red, GLuint green, GLuint blue )
969 {
970 SECONDARYCOLORF(UINT_TO_FLOAT(red),
971 UINT_TO_FLOAT(green),
972 UINT_TO_FLOAT(blue));
973 }
974
975 void GLAPIENTRY
976 _mesa_SecondaryColor3us( GLushort red, GLushort green, GLushort blue )
977 {
978 SECONDARYCOLORF(USHORT_TO_FLOAT(red),
979 USHORT_TO_FLOAT(green),
980 USHORT_TO_FLOAT(blue));
981 }
982
983 void GLAPIENTRY
984 _mesa_SecondaryColor3ub( GLubyte red, GLubyte green, GLubyte blue )
985 {
986 SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
987 UBYTE_TO_FLOAT(green),
988 UBYTE_TO_FLOAT(blue));
989 }
990
991 void GLAPIENTRY
992 _mesa_SecondaryColor3bv( const GLbyte *v )
993 {
994 SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
995 BYTE_TO_FLOAT(v[1]),
996 BYTE_TO_FLOAT(v[2]));
997 }
998
999 void GLAPIENTRY
1000 _mesa_SecondaryColor3dv( const GLdouble *v )
1001 {
1002 SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1003 }
1004 void GLAPIENTRY
1005 _mesa_SecondaryColor3iv( const GLint *v )
1006 {
1007 SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
1008 INT_TO_FLOAT(v[1]),
1009 INT_TO_FLOAT(v[2]));
1010 }
1011
1012 void GLAPIENTRY
1013 _mesa_SecondaryColor3sv( const GLshort *v )
1014 {
1015 SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
1016 SHORT_TO_FLOAT(v[1]),
1017 SHORT_TO_FLOAT(v[2]));
1018 }
1019
1020 void GLAPIENTRY
1021 _mesa_SecondaryColor3uiv( const GLuint *v )
1022 {
1023 SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
1024 UINT_TO_FLOAT(v[1]),
1025 UINT_TO_FLOAT(v[2]));
1026 }
1027
1028 void GLAPIENTRY
1029 _mesa_SecondaryColor3usv( const GLushort *v )
1030 {
1031 SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
1032 USHORT_TO_FLOAT(v[1]),
1033 USHORT_TO_FLOAT(v[2]));
1034 }
1035
1036 void GLAPIENTRY
1037 _mesa_SecondaryColor3ubv( const GLubyte *v )
1038 {
1039 SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
1040 UBYTE_TO_FLOAT(v[1]),
1041 UBYTE_TO_FLOAT(v[2]));
1042 }
1043
1044
1045 /*
1046 * GL_NV_vertex_program:
1047 * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
1048 * Note that attribute indexes DO alias conventional vertex attributes.
1049 */
1050
1051 void GLAPIENTRY
1052 _mesa_VertexAttrib1sNV(GLuint index, GLshort x)
1053 {
1054 ATTRIB1NV(index, (GLfloat) x);
1055 }
1056
1057 void GLAPIENTRY
1058 _mesa_VertexAttrib1dNV(GLuint index, GLdouble x)
1059 {
1060 ATTRIB1NV(index, (GLfloat) x);
1061 }
1062
1063 void GLAPIENTRY
1064 _mesa_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
1065 {
1066 ATTRIB2NV(index, (GLfloat) x, y);
1067 }
1068
1069 void GLAPIENTRY
1070 _mesa_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
1071 {
1072 ATTRIB2NV(index, (GLfloat) x, (GLfloat) y);
1073 }
1074
1075 void GLAPIENTRY
1076 _mesa_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
1077 {
1078 ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1079 }
1080
1081 void GLAPIENTRY
1082 _mesa_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1083 {
1084 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1085 }
1086
1087 void GLAPIENTRY
1088 _mesa_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1089 {
1090 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1091 }
1092
1093 void GLAPIENTRY
1094 _mesa_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1095 {
1096 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1097 }
1098
1099 void GLAPIENTRY
1100 _mesa_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1101 {
1102 ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1103 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1104 }
1105
1106 void GLAPIENTRY
1107 _mesa_VertexAttrib1svNV(GLuint index, const GLshort *v)
1108 {
1109 ATTRIB1NV(index, (GLfloat) v[0]);
1110 }
1111
1112 void GLAPIENTRY
1113 _mesa_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
1114 {
1115 ATTRIB1NV(index, (GLfloat) v[0]);
1116 }
1117
1118 void GLAPIENTRY
1119 _mesa_VertexAttrib2svNV(GLuint index, const GLshort *v)
1120 {
1121 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
1122 }
1123
1124 void GLAPIENTRY
1125 _mesa_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
1126 {
1127 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
1128 }
1129
1130 void GLAPIENTRY
1131 _mesa_VertexAttrib3svNV(GLuint index, const GLshort *v)
1132 {
1133 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1134 }
1135
1136 void GLAPIENTRY
1137 _mesa_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
1138 {
1139 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1140 }
1141
1142 void GLAPIENTRY
1143 _mesa_VertexAttrib4svNV(GLuint index, const GLshort *v)
1144 {
1145 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1146 (GLfloat)v[3]);
1147 }
1148
1149 void GLAPIENTRY
1150 _mesa_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
1151 {
1152 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1153 }
1154
1155 void GLAPIENTRY
1156 _mesa_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
1157 {
1158 ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1159 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1160 }
1161
1162
1163 void GLAPIENTRY
1164 _mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
1165 {
1166 GLint i;
1167 for (i = n - 1; i >= 0; i--)
1168 _mesa_VertexAttrib1svNV(index + i, v + i);
1169 }
1170
1171 void GLAPIENTRY
1172 _mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
1173 {
1174 GLint i;
1175 for (i = n - 1; i >= 0; i--)
1176 ATTRIB1NV(index + i, v[i]);
1177 }
1178
1179 void GLAPIENTRY
1180 _mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
1181 {
1182 GLint i;
1183 for (i = n - 1; i >= 0; i--)
1184 _mesa_VertexAttrib1dvNV(index + i, v + i);
1185 }
1186
1187 void GLAPIENTRY
1188 _mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
1189 {
1190 GLint i;
1191 for (i = n - 1; i >= 0; i--)
1192 _mesa_VertexAttrib2svNV(index + i, v + 2 * i);
1193 }
1194
1195 void GLAPIENTRY
1196 _mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
1197 {
1198 GLint i;
1199 for (i = n - 1; i >= 0; i--)
1200 ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
1201 }
1202
1203 void GLAPIENTRY
1204 _mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
1205 {
1206 GLint i;
1207 for (i = n - 1; i >= 0; i--)
1208 _mesa_VertexAttrib2dvNV(index + i, v + 2 * i);
1209 }
1210
1211 void GLAPIENTRY
1212 _mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
1213 {
1214 GLint i;
1215 for (i = n - 1; i >= 0; i--)
1216 _mesa_VertexAttrib3svNV(index + i, v + 3 * i);
1217 }
1218
1219 void GLAPIENTRY
1220 _mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
1221 {
1222 GLint i;
1223 for (i = n - 1; i >= 0; i--)
1224 ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
1225 }
1226
1227 void GLAPIENTRY
1228 _mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
1229 {
1230 GLint i;
1231 for (i = n - 1; i >= 0; i--)
1232 _mesa_VertexAttrib3dvNV(index + i, v + 3 * i);
1233 }
1234
1235 void GLAPIENTRY
1236 _mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
1237 {
1238 GLint i;
1239 for (i = n - 1; i >= 0; i--)
1240 _mesa_VertexAttrib4svNV(index + i, v + 4 * i);
1241 }
1242
1243 void GLAPIENTRY
1244 _mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
1245 {
1246 GLint i;
1247 for (i = n - 1; i >= 0; i--)
1248 ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
1249 }
1250
1251 void GLAPIENTRY
1252 _mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
1253 {
1254 GLint i;
1255 for (i = n - 1; i >= 0; i--)
1256 _mesa_VertexAttrib4dvNV(index + i, v + 4 * i);
1257 }
1258
1259 void GLAPIENTRY
1260 _mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
1261 {
1262 GLint i;
1263 for (i = n - 1; i >= 0; i--)
1264 _mesa_VertexAttrib4ubvNV(index + i, v + 4 * i);
1265 }
1266
1267
1268 /*
1269 * GL_ARB_vertex_program
1270 * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
1271 * Note that attribute indexes do NOT alias conventional attributes.
1272 */
1273
1274 void GLAPIENTRY
1275 _mesa_VertexAttrib1s(GLuint index, GLshort x)
1276 {
1277 ATTRIB1ARB(index, (GLfloat) x);
1278 }
1279
1280 void GLAPIENTRY
1281 _mesa_VertexAttrib1d(GLuint index, GLdouble x)
1282 {
1283 ATTRIB1ARB(index, (GLfloat) x);
1284 }
1285
1286 void GLAPIENTRY
1287 _mesa_VertexAttrib2s(GLuint index, GLshort x, GLshort y)
1288 {
1289 ATTRIB2ARB(index, (GLfloat) x, y);
1290 }
1291
1292 void GLAPIENTRY
1293 _mesa_VertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
1294 {
1295 ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
1296 }
1297
1298 void GLAPIENTRY
1299 _mesa_VertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
1300 {
1301 ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1302 }
1303
1304 void GLAPIENTRY
1305 _mesa_VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1306 {
1307 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1308 }
1309
1310 void GLAPIENTRY
1311 _mesa_VertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1312 {
1313 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1314 }
1315
1316 void GLAPIENTRY
1317 _mesa_VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1318 {
1319 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1320 }
1321
1322 void GLAPIENTRY
1323 _mesa_VertexAttrib1sv(GLuint index, const GLshort *v)
1324 {
1325 ATTRIB1ARB(index, (GLfloat) v[0]);
1326 }
1327
1328 void GLAPIENTRY
1329 _mesa_VertexAttrib1dv(GLuint index, const GLdouble *v)
1330 {
1331 ATTRIB1ARB(index, (GLfloat) v[0]);
1332 }
1333
1334 void GLAPIENTRY
1335 _mesa_VertexAttrib2sv(GLuint index, const GLshort *v)
1336 {
1337 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1338 }
1339
1340 void GLAPIENTRY
1341 _mesa_VertexAttrib2dv(GLuint index, const GLdouble *v)
1342 {
1343 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1344 }
1345
1346 void GLAPIENTRY
1347 _mesa_VertexAttrib3sv(GLuint index, const GLshort *v)
1348 {
1349 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1350 }
1351
1352 void GLAPIENTRY
1353 _mesa_VertexAttrib3dv(GLuint index, const GLdouble *v)
1354 {
1355 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1356 }
1357
1358 void GLAPIENTRY
1359 _mesa_VertexAttrib4sv(GLuint index, const GLshort *v)
1360 {
1361 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1362 (GLfloat)v[3]);
1363 }
1364
1365 void GLAPIENTRY
1366 _mesa_VertexAttrib4dv(GLuint index, const GLdouble *v)
1367 {
1368 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1369 }
1370
1371 void GLAPIENTRY
1372 _mesa_VertexAttrib4bv(GLuint index, const GLbyte * v)
1373 {
1374 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1375 }
1376
1377 void GLAPIENTRY
1378 _mesa_VertexAttrib4iv(GLuint index, const GLint * v)
1379 {
1380 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1381 }
1382
1383 void GLAPIENTRY
1384 _mesa_VertexAttrib4ubv(GLuint index, const GLubyte * v)
1385 {
1386 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1387 }
1388
1389 void GLAPIENTRY
1390 _mesa_VertexAttrib4usv(GLuint index, const GLushort * v)
1391 {
1392 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1393 }
1394
1395 void GLAPIENTRY
1396 _mesa_VertexAttrib4uiv(GLuint index, const GLuint * v)
1397 {
1398 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1399 }
1400
1401 void GLAPIENTRY
1402 _mesa_VertexAttrib4Nbv(GLuint index, const GLbyte * v)
1403 {
1404 ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
1405 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
1406 }
1407
1408 void GLAPIENTRY
1409 _mesa_VertexAttrib4Nsv(GLuint index, const GLshort * v)
1410 {
1411 ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
1412 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
1413 }
1414
1415 void GLAPIENTRY
1416 _mesa_VertexAttrib4Niv(GLuint index, const GLint * v)
1417 {
1418 ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
1419 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
1420 }
1421
1422 void GLAPIENTRY
1423 _mesa_VertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1424 {
1425 ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1426 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1427 }
1428
1429 void GLAPIENTRY
1430 _mesa_VertexAttrib4Nubv(GLuint index, const GLubyte * v)
1431 {
1432 ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1433 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1434 }
1435
1436 void GLAPIENTRY
1437 _mesa_VertexAttrib4Nusv(GLuint index, const GLushort * v)
1438 {
1439 ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
1440 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
1441 }
1442
1443 void GLAPIENTRY
1444 _mesa_VertexAttrib4Nuiv(GLuint index, const GLuint * v)
1445 {
1446 ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
1447 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
1448 }
1449
1450
1451
1452 /**
1453 * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes.
1454 * Note that attribute indexes do NOT alias conventional attributes.
1455 */
1456
1457 void GLAPIENTRY
1458 _mesa_VertexAttribI1iv(GLuint index, const GLint *v)
1459 {
1460 ATTRIBI_1I(index, v[0]);
1461 }
1462
1463 void GLAPIENTRY
1464 _mesa_VertexAttribI1uiv(GLuint index, const GLuint *v)
1465 {
1466 ATTRIBI_1UI(index, v[0]);
1467 }
1468
1469 void GLAPIENTRY
1470 _mesa_VertexAttribI4bv(GLuint index, const GLbyte *v)
1471 {
1472 ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
1473 }
1474
1475 void GLAPIENTRY
1476 _mesa_VertexAttribI4sv(GLuint index, const GLshort *v)
1477 {
1478 ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
1479 }
1480
1481 void GLAPIENTRY
1482 _mesa_VertexAttribI4ubv(GLuint index, const GLubyte *v)
1483 {
1484 ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
1485 }
1486
1487 void GLAPIENTRY
1488 _mesa_VertexAttribI4usv(GLuint index, const GLushort *v)
1489 {
1490 ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
1491 }
1492
1493
1494
1495
1496 /*
1497 * This code never registers handlers for any of the entry points
1498 * listed in vtxfmt.h.
1499 */
1500 void
1501 _mesa_loopback_init_api_table(const struct gl_context *ctx,
1502 struct _glapi_table *dest)
1503 {
1504 if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
1505 SET_Color4ub(dest, _mesa_Color4ub);
1506 SET_Materialf(dest, _mesa_Materialf);
1507 }
1508 if (ctx->API == API_OPENGL_COMPAT) {
1509 SET_Color3b(dest, _mesa_Color3b);
1510 SET_Color3d(dest, _mesa_Color3d);
1511 SET_Color3i(dest, _mesa_Color3i);
1512 SET_Color3s(dest, _mesa_Color3s);
1513 SET_Color3ui(dest, _mesa_Color3ui);
1514 SET_Color3us(dest, _mesa_Color3us);
1515 SET_Color3ub(dest, _mesa_Color3ub);
1516 SET_Color4b(dest, _mesa_Color4b);
1517 SET_Color4d(dest, _mesa_Color4d);
1518 SET_Color4i(dest, _mesa_Color4i);
1519 SET_Color4s(dest, _mesa_Color4s);
1520 SET_Color4ui(dest, _mesa_Color4ui);
1521 SET_Color4us(dest, _mesa_Color4us);
1522 SET_Color3bv(dest, _mesa_Color3bv);
1523 SET_Color3dv(dest, _mesa_Color3dv);
1524 SET_Color3iv(dest, _mesa_Color3iv);
1525 SET_Color3sv(dest, _mesa_Color3sv);
1526 SET_Color3uiv(dest, _mesa_Color3uiv);
1527 SET_Color3usv(dest, _mesa_Color3usv);
1528 SET_Color3ubv(dest, _mesa_Color3ubv);
1529 SET_Color4bv(dest, _mesa_Color4bv);
1530 SET_Color4dv(dest, _mesa_Color4dv);
1531 SET_Color4iv(dest, _mesa_Color4iv);
1532 SET_Color4sv(dest, _mesa_Color4sv);
1533 SET_Color4uiv(dest, _mesa_Color4uiv);
1534 SET_Color4usv(dest, _mesa_Color4usv);
1535 SET_Color4ubv(dest, _mesa_Color4ubv);
1536
1537 SET_SecondaryColor3b(dest, _mesa_SecondaryColor3b);
1538 SET_SecondaryColor3d(dest, _mesa_SecondaryColor3d);
1539 SET_SecondaryColor3i(dest, _mesa_SecondaryColor3i);
1540 SET_SecondaryColor3s(dest, _mesa_SecondaryColor3s);
1541 SET_SecondaryColor3ui(dest, _mesa_SecondaryColor3ui);
1542 SET_SecondaryColor3us(dest, _mesa_SecondaryColor3us);
1543 SET_SecondaryColor3ub(dest, _mesa_SecondaryColor3ub);
1544 SET_SecondaryColor3bv(dest, _mesa_SecondaryColor3bv);
1545 SET_SecondaryColor3dv(dest, _mesa_SecondaryColor3dv);
1546 SET_SecondaryColor3iv(dest, _mesa_SecondaryColor3iv);
1547 SET_SecondaryColor3sv(dest, _mesa_SecondaryColor3sv);
1548 SET_SecondaryColor3uiv(dest, _mesa_SecondaryColor3uiv);
1549 SET_SecondaryColor3usv(dest, _mesa_SecondaryColor3usv);
1550 SET_SecondaryColor3ubv(dest, _mesa_SecondaryColor3ubv);
1551
1552 SET_EdgeFlagv(dest, _mesa_EdgeFlagv);
1553
1554 SET_Indexd(dest, _mesa_Indexd);
1555 SET_Indexi(dest, _mesa_Indexi);
1556 SET_Indexs(dest, _mesa_Indexs);
1557 SET_Indexub(dest, _mesa_Indexub);
1558 SET_Indexdv(dest, _mesa_Indexdv);
1559 SET_Indexiv(dest, _mesa_Indexiv);
1560 SET_Indexsv(dest, _mesa_Indexsv);
1561 SET_Indexubv(dest, _mesa_Indexubv);
1562 SET_Normal3b(dest, _mesa_Normal3b);
1563 SET_Normal3d(dest, _mesa_Normal3d);
1564 SET_Normal3i(dest, _mesa_Normal3i);
1565 SET_Normal3s(dest, _mesa_Normal3s);
1566 SET_Normal3bv(dest, _mesa_Normal3bv);
1567 SET_Normal3dv(dest, _mesa_Normal3dv);
1568 SET_Normal3iv(dest, _mesa_Normal3iv);
1569 SET_Normal3sv(dest, _mesa_Normal3sv);
1570 SET_TexCoord1d(dest, _mesa_TexCoord1d);
1571 SET_TexCoord1i(dest, _mesa_TexCoord1i);
1572 SET_TexCoord1s(dest, _mesa_TexCoord1s);
1573 SET_TexCoord2d(dest, _mesa_TexCoord2d);
1574 SET_TexCoord2s(dest, _mesa_TexCoord2s);
1575 SET_TexCoord2i(dest, _mesa_TexCoord2i);
1576 SET_TexCoord3d(dest, _mesa_TexCoord3d);
1577 SET_TexCoord3i(dest, _mesa_TexCoord3i);
1578 SET_TexCoord3s(dest, _mesa_TexCoord3s);
1579 SET_TexCoord4d(dest, _mesa_TexCoord4d);
1580 SET_TexCoord4i(dest, _mesa_TexCoord4i);
1581 SET_TexCoord4s(dest, _mesa_TexCoord4s);
1582 SET_TexCoord1dv(dest, _mesa_TexCoord1dv);
1583 SET_TexCoord1iv(dest, _mesa_TexCoord1iv);
1584 SET_TexCoord1sv(dest, _mesa_TexCoord1sv);
1585 SET_TexCoord2dv(dest, _mesa_TexCoord2dv);
1586 SET_TexCoord2iv(dest, _mesa_TexCoord2iv);
1587 SET_TexCoord2sv(dest, _mesa_TexCoord2sv);
1588 SET_TexCoord3dv(dest, _mesa_TexCoord3dv);
1589 SET_TexCoord3iv(dest, _mesa_TexCoord3iv);
1590 SET_TexCoord3sv(dest, _mesa_TexCoord3sv);
1591 SET_TexCoord4dv(dest, _mesa_TexCoord4dv);
1592 SET_TexCoord4iv(dest, _mesa_TexCoord4iv);
1593 SET_TexCoord4sv(dest, _mesa_TexCoord4sv);
1594 SET_Vertex2d(dest, _mesa_Vertex2d);
1595 SET_Vertex2i(dest, _mesa_Vertex2i);
1596 SET_Vertex2s(dest, _mesa_Vertex2s);
1597 SET_Vertex3d(dest, _mesa_Vertex3d);
1598 SET_Vertex3i(dest, _mesa_Vertex3i);
1599 SET_Vertex3s(dest, _mesa_Vertex3s);
1600 SET_Vertex4d(dest, _mesa_Vertex4d);
1601 SET_Vertex4i(dest, _mesa_Vertex4i);
1602 SET_Vertex4s(dest, _mesa_Vertex4s);
1603 SET_Vertex2dv(dest, _mesa_Vertex2dv);
1604 SET_Vertex2iv(dest, _mesa_Vertex2iv);
1605 SET_Vertex2sv(dest, _mesa_Vertex2sv);
1606 SET_Vertex3dv(dest, _mesa_Vertex3dv);
1607 SET_Vertex3iv(dest, _mesa_Vertex3iv);
1608 SET_Vertex3sv(dest, _mesa_Vertex3sv);
1609 SET_Vertex4dv(dest, _mesa_Vertex4dv);
1610 SET_Vertex4iv(dest, _mesa_Vertex4iv);
1611 SET_Vertex4sv(dest, _mesa_Vertex4sv);
1612 SET_MultiTexCoord1d(dest, _mesa_MultiTexCoord1d);
1613 SET_MultiTexCoord1dv(dest, _mesa_MultiTexCoord1dv);
1614 SET_MultiTexCoord1i(dest, _mesa_MultiTexCoord1i);
1615 SET_MultiTexCoord1iv(dest, _mesa_MultiTexCoord1iv);
1616 SET_MultiTexCoord1s(dest, _mesa_MultiTexCoord1s);
1617 SET_MultiTexCoord1sv(dest, _mesa_MultiTexCoord1sv);
1618 SET_MultiTexCoord2d(dest, _mesa_MultiTexCoord2d);
1619 SET_MultiTexCoord2dv(dest, _mesa_MultiTexCoord2dv);
1620 SET_MultiTexCoord2i(dest, _mesa_MultiTexCoord2i);
1621 SET_MultiTexCoord2iv(dest, _mesa_MultiTexCoord2iv);
1622 SET_MultiTexCoord2s(dest, _mesa_MultiTexCoord2s);
1623 SET_MultiTexCoord2sv(dest, _mesa_MultiTexCoord2sv);
1624 SET_MultiTexCoord3d(dest, _mesa_MultiTexCoord3d);
1625 SET_MultiTexCoord3dv(dest, _mesa_MultiTexCoord3dv);
1626 SET_MultiTexCoord3i(dest, _mesa_MultiTexCoord3i);
1627 SET_MultiTexCoord3iv(dest, _mesa_MultiTexCoord3iv);
1628 SET_MultiTexCoord3s(dest, _mesa_MultiTexCoord3s);
1629 SET_MultiTexCoord3sv(dest, _mesa_MultiTexCoord3sv);
1630 SET_MultiTexCoord4d(dest, _mesa_MultiTexCoord4d);
1631 SET_MultiTexCoord4dv(dest, _mesa_MultiTexCoord4dv);
1632 SET_MultiTexCoord4i(dest, _mesa_MultiTexCoord4i);
1633 SET_MultiTexCoord4iv(dest, _mesa_MultiTexCoord4iv);
1634 SET_MultiTexCoord4s(dest, _mesa_MultiTexCoord4s);
1635 SET_MultiTexCoord4sv(dest, _mesa_MultiTexCoord4sv);
1636 SET_EvalCoord2dv(dest, _mesa_EvalCoord2dv);
1637 SET_EvalCoord2fv(dest, _mesa_EvalCoord2fv);
1638 SET_EvalCoord2d(dest, _mesa_EvalCoord2d);
1639 SET_EvalCoord1dv(dest, _mesa_EvalCoord1dv);
1640 SET_EvalCoord1fv(dest, _mesa_EvalCoord1fv);
1641 SET_EvalCoord1d(dest, _mesa_EvalCoord1d);
1642 SET_Materiali(dest, _mesa_Materiali);
1643 SET_Materialiv(dest, _mesa_Materialiv);
1644 SET_Rectd(dest, _mesa_Rectd);
1645 SET_Rectdv(dest, _mesa_Rectdv);
1646 SET_Rectfv(dest, _mesa_Rectfv);
1647 SET_Recti(dest, _mesa_Recti);
1648 SET_Rectiv(dest, _mesa_Rectiv);
1649 SET_Rects(dest, _mesa_Rects);
1650 SET_Rectsv(dest, _mesa_Rectsv);
1651 SET_FogCoordd(dest, _mesa_FogCoordd);
1652 SET_FogCoorddv(dest, _mesa_FogCoorddv);
1653 }
1654
1655 if (ctx->API == API_OPENGL_COMPAT) {
1656 SET_VertexAttrib1sNV(dest, _mesa_VertexAttrib1sNV);
1657 SET_VertexAttrib1dNV(dest, _mesa_VertexAttrib1dNV);
1658 SET_VertexAttrib2sNV(dest, _mesa_VertexAttrib2sNV);
1659 SET_VertexAttrib2dNV(dest, _mesa_VertexAttrib2dNV);
1660 SET_VertexAttrib3sNV(dest, _mesa_VertexAttrib3sNV);
1661 SET_VertexAttrib3dNV(dest, _mesa_VertexAttrib3dNV);
1662 SET_VertexAttrib4sNV(dest, _mesa_VertexAttrib4sNV);
1663 SET_VertexAttrib4dNV(dest, _mesa_VertexAttrib4dNV);
1664 SET_VertexAttrib4ubNV(dest, _mesa_VertexAttrib4ubNV);
1665 SET_VertexAttrib1svNV(dest, _mesa_VertexAttrib1svNV);
1666 SET_VertexAttrib1dvNV(dest, _mesa_VertexAttrib1dvNV);
1667 SET_VertexAttrib2svNV(dest, _mesa_VertexAttrib2svNV);
1668 SET_VertexAttrib2dvNV(dest, _mesa_VertexAttrib2dvNV);
1669 SET_VertexAttrib3svNV(dest, _mesa_VertexAttrib3svNV);
1670 SET_VertexAttrib3dvNV(dest, _mesa_VertexAttrib3dvNV);
1671 SET_VertexAttrib4svNV(dest, _mesa_VertexAttrib4svNV);
1672 SET_VertexAttrib4dvNV(dest, _mesa_VertexAttrib4dvNV);
1673 SET_VertexAttrib4ubvNV(dest, _mesa_VertexAttrib4ubvNV);
1674 SET_VertexAttribs1svNV(dest, _mesa_VertexAttribs1svNV);
1675 SET_VertexAttribs1fvNV(dest, _mesa_VertexAttribs1fvNV);
1676 SET_VertexAttribs1dvNV(dest, _mesa_VertexAttribs1dvNV);
1677 SET_VertexAttribs2svNV(dest, _mesa_VertexAttribs2svNV);
1678 SET_VertexAttribs2fvNV(dest, _mesa_VertexAttribs2fvNV);
1679 SET_VertexAttribs2dvNV(dest, _mesa_VertexAttribs2dvNV);
1680 SET_VertexAttribs3svNV(dest, _mesa_VertexAttribs3svNV);
1681 SET_VertexAttribs3fvNV(dest, _mesa_VertexAttribs3fvNV);
1682 SET_VertexAttribs3dvNV(dest, _mesa_VertexAttribs3dvNV);
1683 SET_VertexAttribs4svNV(dest, _mesa_VertexAttribs4svNV);
1684 SET_VertexAttribs4fvNV(dest, _mesa_VertexAttribs4fvNV);
1685 SET_VertexAttribs4dvNV(dest, _mesa_VertexAttribs4dvNV);
1686 SET_VertexAttribs4ubvNV(dest, _mesa_VertexAttribs4ubvNV);
1687 }
1688
1689 if (_mesa_is_desktop_gl(ctx)) {
1690 SET_VertexAttrib1s(dest, _mesa_VertexAttrib1s);
1691 SET_VertexAttrib1d(dest, _mesa_VertexAttrib1d);
1692 SET_VertexAttrib2s(dest, _mesa_VertexAttrib2s);
1693 SET_VertexAttrib2d(dest, _mesa_VertexAttrib2d);
1694 SET_VertexAttrib3s(dest, _mesa_VertexAttrib3s);
1695 SET_VertexAttrib3d(dest, _mesa_VertexAttrib3d);
1696 SET_VertexAttrib4s(dest, _mesa_VertexAttrib4s);
1697 SET_VertexAttrib4d(dest, _mesa_VertexAttrib4d);
1698 SET_VertexAttrib1sv(dest, _mesa_VertexAttrib1sv);
1699 SET_VertexAttrib1dv(dest, _mesa_VertexAttrib1dv);
1700 SET_VertexAttrib2sv(dest, _mesa_VertexAttrib2sv);
1701 SET_VertexAttrib2dv(dest, _mesa_VertexAttrib2dv);
1702 SET_VertexAttrib3sv(dest, _mesa_VertexAttrib3sv);
1703 SET_VertexAttrib3dv(dest, _mesa_VertexAttrib3dv);
1704 SET_VertexAttrib4sv(dest, _mesa_VertexAttrib4sv);
1705 SET_VertexAttrib4dv(dest, _mesa_VertexAttrib4dv);
1706 SET_VertexAttrib4Nub(dest, _mesa_VertexAttrib4Nub);
1707 SET_VertexAttrib4Nubv(dest, _mesa_VertexAttrib4Nubv);
1708 SET_VertexAttrib4bv(dest, _mesa_VertexAttrib4bv);
1709 SET_VertexAttrib4iv(dest, _mesa_VertexAttrib4iv);
1710 SET_VertexAttrib4ubv(dest, _mesa_VertexAttrib4ubv);
1711 SET_VertexAttrib4usv(dest, _mesa_VertexAttrib4usv);
1712 SET_VertexAttrib4uiv(dest, _mesa_VertexAttrib4uiv);
1713 SET_VertexAttrib4Nbv(dest, _mesa_VertexAttrib4Nbv);
1714 SET_VertexAttrib4Nsv(dest, _mesa_VertexAttrib4Nsv);
1715 SET_VertexAttrib4Nusv(dest, _mesa_VertexAttrib4Nusv);
1716 SET_VertexAttrib4Niv(dest, _mesa_VertexAttrib4Niv);
1717 SET_VertexAttrib4Nuiv(dest, _mesa_VertexAttrib4Nuiv);
1718
1719 /* GL_EXT_gpu_shader4, GL 3.0 */
1720 SET_VertexAttribI1iv(dest, _mesa_VertexAttribI1iv);
1721 SET_VertexAttribI1uiv(dest, _mesa_VertexAttribI1uiv);
1722 SET_VertexAttribI4bv(dest, _mesa_VertexAttribI4bv);
1723 SET_VertexAttribI4sv(dest, _mesa_VertexAttribI4sv);
1724 SET_VertexAttribI4ubv(dest, _mesa_VertexAttribI4ubv);
1725 SET_VertexAttribI4usv(dest, _mesa_VertexAttribI4usv);
1726 }
1727 }