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