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