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