1 /**************************************************************************
3 Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
4 Copyright 2011 Dave Airlie (ARB_vertex_type_2_10_10_10_rev support)
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the "Software"),
9 to deal in the Software without restriction, including without limitation
10 on the rights to use, copy, modify, merge, publish, distribute, sub
11 license, and/or sell copies of the Software, and to permit persons to whom
12 the Software is furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice (including the next
15 paragraph) shall be included in all copies or substantial portions of the
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
22 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24 USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #define ATTR1FV( A, V ) ATTR( A, 1, GL_FLOAT, (V)[0], 0, 0, 1 )
30 #define ATTR2FV( A, V ) ATTR( A, 2, GL_FLOAT, (V)[0], (V)[1], 0, 1 )
31 #define ATTR3FV( A, V ) ATTR( A, 3, GL_FLOAT, (V)[0], (V)[1], (V)[2], 1 )
32 #define ATTR4FV( A, V ) ATTR( A, 4, GL_FLOAT, (V)[0], (V)[1], (V)[2], (V)[3] )
34 #define ATTR1F( A, X ) ATTR( A, 1, GL_FLOAT, X, 0, 0, 1 )
35 #define ATTR2F( A, X, Y ) ATTR( A, 2, GL_FLOAT, X, Y, 0, 1 )
36 #define ATTR3F( A, X, Y, Z ) ATTR( A, 3, GL_FLOAT, X, Y, Z, 1 )
37 #define ATTR4F( A, X, Y, Z, W ) ATTR( A, 4, GL_FLOAT, X, Y, Z, W )
40 #define ATTRI( A, N, X, Y, Z, W) ATTR( A, N, GL_INT, \
41 INT_AS_FLT(X), INT_AS_FLT(Y), \
42 INT_AS_FLT(Z), INT_AS_FLT(W) )
44 #define ATTR2IV( A, V ) ATTRI( A, 2, (V)[0], (V)[1], 0, 1 )
45 #define ATTR3IV( A, V ) ATTRI( A, 3, (V)[0], (V)[1], (V)[2], 1 )
46 #define ATTR4IV( A, V ) ATTRI( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
48 #define ATTR1I( A, X ) ATTRI( A, 1, X, 0, 0, 1 )
49 #define ATTR2I( A, X, Y ) ATTRI( A, 2, X, Y, 0, 1 )
50 #define ATTR3I( A, X, Y, Z ) ATTRI( A, 3, X, Y, Z, 1 )
51 #define ATTR4I( A, X, Y, Z, W ) ATTRI( A, 4, X, Y, Z, W )
55 #define ATTRUI( A, N, X, Y, Z, W) ATTR( A, N, GL_UNSIGNED_INT, \
56 UINT_AS_FLT(X), UINT_AS_FLT(Y), \
57 UINT_AS_FLT(Z), UINT_AS_FLT(W) )
59 #define ATTR2UIV( A, V ) ATTRUI( A, 2, (V)[0], (V)[1], 0, 1 )
60 #define ATTR3UIV( A, V ) ATTRUI( A, 3, (V)[0], (V)[1], (V)[2], 1 )
61 #define ATTR4UIV( A, V ) ATTRUI( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
63 #define ATTR1UI( A, X ) ATTRUI( A, 1, X, 0, 0, 1 )
64 #define ATTR2UI( A, X, Y ) ATTRUI( A, 2, X, Y, 0, 1 )
65 #define ATTR3UI( A, X, Y, Z ) ATTRUI( A, 3, X, Y, Z, 1 )
66 #define ATTR4UI( A, X, Y, Z, W ) ATTRUI( A, 4, X, Y, Z, W )
68 #define MAT_ATTR( A, N, V ) ATTR( A, N, GL_FLOAT, (V)[0], (V)[1], (V)[2], (V)[3] )
70 static inline float conv_ui10_to_norm_float(unsigned ui10
)
72 return ui10
/ 1023.0f
;
75 static inline float conv_ui2_to_norm_float(unsigned ui2
)
80 #define ATTRUI10_1( A, UI ) ATTR( A, 1, GL_FLOAT, (UI) & 0x3ff, 0, 0, 1 )
81 #define ATTRUI10_2( A, UI ) ATTR( A, 2, GL_FLOAT, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 0, 1 )
82 #define ATTRUI10_3( A, UI ) ATTR( A, 3, GL_FLOAT, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, 1 )
83 #define ATTRUI10_4( A, UI ) ATTR( A, 4, GL_FLOAT, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, ((UI) >> 30) & 0x3 )
85 #define ATTRUI10N_1( A, UI ) ATTR( A, 1, GL_FLOAT, conv_ui10_to_norm_float((UI) & 0x3ff), 0, 0, 1 )
86 #define ATTRUI10N_2( A, UI ) ATTR( A, 2, GL_FLOAT, \
87 conv_ui10_to_norm_float((UI) & 0x3ff), \
88 conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), 0, 1 )
89 #define ATTRUI10N_3( A, UI ) ATTR( A, 3, GL_FLOAT, \
90 conv_ui10_to_norm_float((UI) & 0x3ff), \
91 conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
92 conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), 1 )
93 #define ATTRUI10N_4( A, UI ) ATTR( A, 4, GL_FLOAT, \
94 conv_ui10_to_norm_float((UI) & 0x3ff), \
95 conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
96 conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), \
97 conv_ui2_to_norm_float(((UI) >> 30) & 0x3) )
99 struct attr_bits_10
{signed int x
:10;};
100 struct attr_bits_2
{signed int x
:2;};
102 static inline float conv_i10_to_i(int i10
)
104 struct attr_bits_10 val
;
109 static inline float conv_i2_to_i(int i2
)
111 struct attr_bits_2 val
;
116 static inline float conv_i10_to_norm_float(const struct gl_context
*ctx
, int i10
)
118 struct attr_bits_10 val
;
121 /* Traditionally, OpenGL has had two equations for converting from
122 * normalized fixed-point data to floating-point data. In the OpenGL 3.2
123 * specification, these are equations 2.2 and 2.3, respectively:
125 * f = (2c + 1)/(2^b - 1). (2.2)
127 * Comments below this equation state: "In general, this representation is
128 * used for signed normalized fixed-point parameters in GL commands, such
129 * as vertex attribute values." Which is what we're doing here.
131 * f = max{c/(2^(b-1) - 1), -1.0} (2.3)
133 * Comments below this equation state: "In general, this representation is
134 * used for signed normalized fixed-point texture or floating point values."
136 * OpenGL 4.2+ and ES 3.0 remedy this and state that equation 2.3 (above)
137 * is used in every case. They remove equation 2.2 completely.
139 if (_mesa_is_gles3(ctx
) ||
140 (ctx
->API
== API_OPENGL_CORE
&& ctx
->Version
>= 42)) {
141 /* Equation 2.3 above. */
142 float f
= ((float) val
.x
) / 511.0F
;
143 return MAX2(f
, -1.0);
145 /* Equation 2.2 above. */
146 return (2.0F
* (float)val
.x
+ 1.0F
) * (1.0F
/ 1023.0F
);
150 static inline float conv_i2_to_norm_float(const struct gl_context
*ctx
, int i2
)
152 struct attr_bits_2 val
;
155 if (_mesa_is_gles3(ctx
) ||
156 (ctx
->API
== API_OPENGL_CORE
&& ctx
->Version
>= 42)) {
157 /* Equation 2.3 above. */
158 float f
= (float) val
.x
;
159 return MAX2(f
, -1.0);
161 /* Equation 2.2 above. */
162 return (2.0F
* (float)val
.x
+ 1.0F
) * (1.0F
/ 3.0F
);
166 #define ATTRI10_1( A, I10 ) ATTR( A, 1, GL_FLOAT, conv_i10_to_i((I10) & 0x3ff), 0, 0, 1 )
167 #define ATTRI10_2( A, I10 ) ATTR( A, 2, GL_FLOAT, \
168 conv_i10_to_i((I10) & 0x3ff), \
169 conv_i10_to_i(((I10) >> 10) & 0x3ff), 0, 1 )
170 #define ATTRI10_3( A, I10 ) ATTR( A, 3, GL_FLOAT, \
171 conv_i10_to_i((I10) & 0x3ff), \
172 conv_i10_to_i(((I10) >> 10) & 0x3ff), \
173 conv_i10_to_i(((I10) >> 20) & 0x3ff), 1 )
174 #define ATTRI10_4( A, I10 ) ATTR( A, 4, GL_FLOAT, \
175 conv_i10_to_i((I10) & 0x3ff), \
176 conv_i10_to_i(((I10) >> 10) & 0x3ff), \
177 conv_i10_to_i(((I10) >> 20) & 0x3ff), \
178 conv_i2_to_i(((I10) >> 30) & 0x3))
181 #define ATTRI10N_1(ctx, A, I10) ATTR(A, 1, GL_FLOAT, conv_i10_to_norm_float(ctx, (I10) & 0x3ff), 0, 0, 1 )
182 #define ATTRI10N_2(ctx, A, I10) ATTR(A, 2, GL_FLOAT, \
183 conv_i10_to_norm_float(ctx, (I10) & 0x3ff), \
184 conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), 0, 1 )
185 #define ATTRI10N_3(ctx, A, I10) ATTR(A, 3, GL_FLOAT, \
186 conv_i10_to_norm_float(ctx, (I10) & 0x3ff), \
187 conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), \
188 conv_i10_to_norm_float(ctx, ((I10) >> 20) & 0x3ff), 1 )
189 #define ATTRI10N_4(ctx, A, I10) ATTR(A, 4, GL_FLOAT, \
190 conv_i10_to_norm_float(ctx, (I10) & 0x3ff), \
191 conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), \
192 conv_i10_to_norm_float(ctx, ((I10) >> 20) & 0x3ff), \
193 conv_i2_to_norm_float(ctx, ((I10) >> 30) & 0x3))
195 #define ATTR_UI(ctx, val, type, normalized, attr, arg) do { \
196 if ((type) == GL_UNSIGNED_INT_2_10_10_10_REV) { \
198 ATTRUI10N_##val((attr), (arg)); \
200 ATTRUI10_##val((attr), (arg)); \
202 } else if ((type) == GL_INT_2_10_10_10_REV) { \
204 ATTRI10N_##val(ctx, (attr), (arg)); \
206 ATTRI10_##val((attr), (arg)); \
209 ERROR(GL_INVALID_VALUE); \
212 #define ATTR_UI_INDEX(ctx, val, type, normalized, index, arg) do { \
213 if ((index) == 0) { \
214 ATTR_UI(ctx, val, (type), normalized, 0, (arg)); \
215 } else if ((index) < MAX_VERTEX_GENERIC_ATTRIBS) { \
216 ATTR_UI(ctx, val, (type), normalized, VBO_ATTRIB_GENERIC0 + (index), (arg)); \
218 ERROR(GL_INVALID_VALUE); \
221 static void GLAPIENTRY
222 TAG(Vertex2f
)(GLfloat x
, GLfloat y
)
224 GET_CURRENT_CONTEXT(ctx
);
225 ATTR2F(VBO_ATTRIB_POS
, x
, y
);
228 static void GLAPIENTRY
229 TAG(Vertex2fv
)(const GLfloat
* v
)
231 GET_CURRENT_CONTEXT(ctx
);
232 ATTR2FV(VBO_ATTRIB_POS
, v
);
235 static void GLAPIENTRY
236 TAG(Vertex3f
)(GLfloat x
, GLfloat y
, GLfloat z
)
238 GET_CURRENT_CONTEXT(ctx
);
239 ATTR3F(VBO_ATTRIB_POS
, x
, y
, z
);
242 static void GLAPIENTRY
243 TAG(Vertex3fv
)(const GLfloat
* v
)
245 GET_CURRENT_CONTEXT(ctx
);
246 ATTR3FV(VBO_ATTRIB_POS
, v
);
249 static void GLAPIENTRY
250 TAG(Vertex4f
)(GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
252 GET_CURRENT_CONTEXT(ctx
);
253 ATTR4F(VBO_ATTRIB_POS
, x
, y
, z
, w
);
256 static void GLAPIENTRY
257 TAG(Vertex4fv
)(const GLfloat
* v
)
259 GET_CURRENT_CONTEXT(ctx
);
260 ATTR4FV(VBO_ATTRIB_POS
, v
);
265 static void GLAPIENTRY
266 TAG(TexCoord1f
)(GLfloat x
)
268 GET_CURRENT_CONTEXT(ctx
);
269 ATTR1F(VBO_ATTRIB_TEX0
, x
);
272 static void GLAPIENTRY
273 TAG(TexCoord1fv
)(const GLfloat
* v
)
275 GET_CURRENT_CONTEXT(ctx
);
276 ATTR1FV(VBO_ATTRIB_TEX0
, v
);
279 static void GLAPIENTRY
280 TAG(TexCoord2f
)(GLfloat x
, GLfloat y
)
282 GET_CURRENT_CONTEXT(ctx
);
283 ATTR2F(VBO_ATTRIB_TEX0
, x
, y
);
286 static void GLAPIENTRY
287 TAG(TexCoord2fv
)(const GLfloat
* v
)
289 GET_CURRENT_CONTEXT(ctx
);
290 ATTR2FV(VBO_ATTRIB_TEX0
, v
);
293 static void GLAPIENTRY
294 TAG(TexCoord3f
)(GLfloat x
, GLfloat y
, GLfloat z
)
296 GET_CURRENT_CONTEXT(ctx
);
297 ATTR3F(VBO_ATTRIB_TEX0
, x
, y
, z
);
300 static void GLAPIENTRY
301 TAG(TexCoord3fv
)(const GLfloat
* v
)
303 GET_CURRENT_CONTEXT(ctx
);
304 ATTR3FV(VBO_ATTRIB_TEX0
, v
);
307 static void GLAPIENTRY
308 TAG(TexCoord4f
)(GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
310 GET_CURRENT_CONTEXT(ctx
);
311 ATTR4F(VBO_ATTRIB_TEX0
, x
, y
, z
, w
);
314 static void GLAPIENTRY
315 TAG(TexCoord4fv
)(const GLfloat
* v
)
317 GET_CURRENT_CONTEXT(ctx
);
318 ATTR4FV(VBO_ATTRIB_TEX0
, v
);
323 static void GLAPIENTRY
324 TAG(Normal3f
)(GLfloat x
, GLfloat y
, GLfloat z
)
326 GET_CURRENT_CONTEXT(ctx
);
327 ATTR3F(VBO_ATTRIB_NORMAL
, x
, y
, z
);
330 static void GLAPIENTRY
331 TAG(Normal3fv
)(const GLfloat
* v
)
333 GET_CURRENT_CONTEXT(ctx
);
334 ATTR3FV(VBO_ATTRIB_NORMAL
, v
);
339 static void GLAPIENTRY
340 TAG(FogCoordfEXT
)(GLfloat x
)
342 GET_CURRENT_CONTEXT(ctx
);
343 ATTR1F(VBO_ATTRIB_FOG
, x
);
348 static void GLAPIENTRY
349 TAG(FogCoordfvEXT
)(const GLfloat
* v
)
351 GET_CURRENT_CONTEXT(ctx
);
352 ATTR1FV(VBO_ATTRIB_FOG
, v
);
355 static void GLAPIENTRY
356 TAG(Color3f
)(GLfloat x
, GLfloat y
, GLfloat z
)
358 GET_CURRENT_CONTEXT(ctx
);
359 ATTR3F(VBO_ATTRIB_COLOR0
, x
, y
, z
);
362 static void GLAPIENTRY
363 TAG(Color3fv
)(const GLfloat
* v
)
365 GET_CURRENT_CONTEXT(ctx
);
366 ATTR3FV(VBO_ATTRIB_COLOR0
, v
);
369 static void GLAPIENTRY
370 TAG(Color4f
)(GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
372 GET_CURRENT_CONTEXT(ctx
);
373 ATTR4F(VBO_ATTRIB_COLOR0
, x
, y
, z
, w
);
376 static void GLAPIENTRY
377 TAG(Color4fv
)(const GLfloat
* v
)
379 GET_CURRENT_CONTEXT(ctx
);
380 ATTR4FV(VBO_ATTRIB_COLOR0
, v
);
385 static void GLAPIENTRY
386 TAG(SecondaryColor3fEXT
)(GLfloat x
, GLfloat y
, GLfloat z
)
388 GET_CURRENT_CONTEXT(ctx
);
389 ATTR3F(VBO_ATTRIB_COLOR1
, x
, y
, z
);
392 static void GLAPIENTRY
393 TAG(SecondaryColor3fvEXT
)(const GLfloat
* v
)
395 GET_CURRENT_CONTEXT(ctx
);
396 ATTR3FV(VBO_ATTRIB_COLOR1
, v
);
401 static void GLAPIENTRY
402 TAG(EdgeFlag
)(GLboolean b
)
404 GET_CURRENT_CONTEXT(ctx
);
405 ATTR1F(VBO_ATTRIB_EDGEFLAG
, (GLfloat
) b
);
410 static void GLAPIENTRY
411 TAG(Indexf
)(GLfloat f
)
413 GET_CURRENT_CONTEXT(ctx
);
414 ATTR1F(VBO_ATTRIB_INDEX
, f
);
417 static void GLAPIENTRY
418 TAG(Indexfv
)(const GLfloat
* f
)
420 GET_CURRENT_CONTEXT(ctx
);
421 ATTR1FV(VBO_ATTRIB_INDEX
, f
);
426 static void GLAPIENTRY
427 TAG(MultiTexCoord1f
)(GLenum target
, GLfloat x
)
429 GET_CURRENT_CONTEXT(ctx
);
430 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
434 static void GLAPIENTRY
435 TAG(MultiTexCoord1fv
)(GLenum target
, const GLfloat
* v
)
437 GET_CURRENT_CONTEXT(ctx
);
438 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
442 static void GLAPIENTRY
443 TAG(MultiTexCoord2f
)(GLenum target
, GLfloat x
, GLfloat y
)
445 GET_CURRENT_CONTEXT(ctx
);
446 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
450 static void GLAPIENTRY
451 TAG(MultiTexCoord2fv
)(GLenum target
, const GLfloat
* v
)
453 GET_CURRENT_CONTEXT(ctx
);
454 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
458 static void GLAPIENTRY
459 TAG(MultiTexCoord3f
)(GLenum target
, GLfloat x
, GLfloat y
, GLfloat z
)
461 GET_CURRENT_CONTEXT(ctx
);
462 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
463 ATTR3F(attr
, x
, y
, z
);
466 static void GLAPIENTRY
467 TAG(MultiTexCoord3fv
)(GLenum target
, const GLfloat
* v
)
469 GET_CURRENT_CONTEXT(ctx
);
470 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
474 static void GLAPIENTRY
475 TAG(MultiTexCoord4f
)(GLenum target
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
477 GET_CURRENT_CONTEXT(ctx
);
478 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
479 ATTR4F(attr
, x
, y
, z
, w
);
482 static void GLAPIENTRY
483 TAG(MultiTexCoord4fv
)(GLenum target
, const GLfloat
* v
)
485 GET_CURRENT_CONTEXT(ctx
);
486 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
492 static void GLAPIENTRY
493 TAG(VertexAttrib1fARB
)(GLuint index
, GLfloat x
)
495 GET_CURRENT_CONTEXT(ctx
);
498 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
499 ATTR1F(VBO_ATTRIB_GENERIC0
+ index
, x
);
501 ERROR(GL_INVALID_VALUE
);
504 static void GLAPIENTRY
505 TAG(VertexAttrib1fvARB
)(GLuint index
, const GLfloat
* v
)
507 GET_CURRENT_CONTEXT(ctx
);
510 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
511 ATTR1FV(VBO_ATTRIB_GENERIC0
+ index
, v
);
513 ERROR(GL_INVALID_VALUE
);
516 static void GLAPIENTRY
517 TAG(VertexAttrib2fARB
)(GLuint index
, GLfloat x
, GLfloat y
)
519 GET_CURRENT_CONTEXT(ctx
);
522 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
523 ATTR2F(VBO_ATTRIB_GENERIC0
+ index
, x
, y
);
525 ERROR(GL_INVALID_VALUE
);
528 static void GLAPIENTRY
529 TAG(VertexAttrib2fvARB
)(GLuint index
, const GLfloat
* v
)
531 GET_CURRENT_CONTEXT(ctx
);
534 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
535 ATTR2FV(VBO_ATTRIB_GENERIC0
+ index
, v
);
537 ERROR(GL_INVALID_VALUE
);
540 static void GLAPIENTRY
541 TAG(VertexAttrib3fARB
)(GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
543 GET_CURRENT_CONTEXT(ctx
);
546 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
547 ATTR3F(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
);
549 ERROR(GL_INVALID_VALUE
);
552 static void GLAPIENTRY
553 TAG(VertexAttrib3fvARB
)(GLuint index
, const GLfloat
* v
)
555 GET_CURRENT_CONTEXT(ctx
);
558 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
559 ATTR3FV(VBO_ATTRIB_GENERIC0
+ index
, v
);
561 ERROR(GL_INVALID_VALUE
);
564 static void GLAPIENTRY
565 TAG(VertexAttrib4fARB
)(GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
567 GET_CURRENT_CONTEXT(ctx
);
569 ATTR4F(0, x
, y
, z
, w
);
570 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
571 ATTR4F(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
, w
);
573 ERROR(GL_INVALID_VALUE
);
576 static void GLAPIENTRY
577 TAG(VertexAttrib4fvARB
)(GLuint index
, const GLfloat
* v
)
579 GET_CURRENT_CONTEXT(ctx
);
582 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
583 ATTR4FV(VBO_ATTRIB_GENERIC0
+ index
, v
);
585 ERROR(GL_INVALID_VALUE
);
590 /* Integer-valued generic attributes.
591 * XXX: the integers just get converted to floats at this time
593 static void GLAPIENTRY
594 TAG(VertexAttribI1i
)(GLuint index
, GLint x
)
596 GET_CURRENT_CONTEXT(ctx
);
599 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
600 ATTR1I(VBO_ATTRIB_GENERIC0
+ index
, x
);
602 ERROR(GL_INVALID_VALUE
);
605 static void GLAPIENTRY
606 TAG(VertexAttribI2i
)(GLuint index
, GLint x
, GLint y
)
608 GET_CURRENT_CONTEXT(ctx
);
611 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
612 ATTR2I(VBO_ATTRIB_GENERIC0
+ index
, x
, y
);
614 ERROR(GL_INVALID_VALUE
);
617 static void GLAPIENTRY
618 TAG(VertexAttribI3i
)(GLuint index
, GLint x
, GLint y
, GLint z
)
620 GET_CURRENT_CONTEXT(ctx
);
623 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
624 ATTR3I(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
);
626 ERROR(GL_INVALID_VALUE
);
629 static void GLAPIENTRY
630 TAG(VertexAttribI4i
)(GLuint index
, GLint x
, GLint y
, GLint z
, GLint w
)
632 GET_CURRENT_CONTEXT(ctx
);
634 ATTR4I(0, x
, y
, z
, w
);
635 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
636 ATTR4I(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
, w
);
638 ERROR(GL_INVALID_VALUE
);
641 static void GLAPIENTRY
642 TAG(VertexAttribI2iv
)(GLuint index
, const GLint
*v
)
644 GET_CURRENT_CONTEXT(ctx
);
647 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
648 ATTR2IV(VBO_ATTRIB_GENERIC0
+ index
, v
);
650 ERROR(GL_INVALID_VALUE
);
653 static void GLAPIENTRY
654 TAG(VertexAttribI3iv
)(GLuint index
, const GLint
*v
)
656 GET_CURRENT_CONTEXT(ctx
);
659 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
660 ATTR3IV(VBO_ATTRIB_GENERIC0
+ index
, v
);
662 ERROR(GL_INVALID_VALUE
);
665 static void GLAPIENTRY
666 TAG(VertexAttribI4iv
)(GLuint index
, const GLint
*v
)
668 GET_CURRENT_CONTEXT(ctx
);
671 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
672 ATTR4IV(VBO_ATTRIB_GENERIC0
+ index
, v
);
674 ERROR(GL_INVALID_VALUE
);
679 /* Unsigned integer-valued generic attributes.
680 * XXX: the integers just get converted to floats at this time
682 static void GLAPIENTRY
683 TAG(VertexAttribI1ui
)(GLuint index
, GLuint x
)
685 GET_CURRENT_CONTEXT(ctx
);
688 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
689 ATTR1UI(VBO_ATTRIB_GENERIC0
+ index
, x
);
691 ERROR(GL_INVALID_VALUE
);
694 static void GLAPIENTRY
695 TAG(VertexAttribI2ui
)(GLuint index
, GLuint x
, GLuint y
)
697 GET_CURRENT_CONTEXT(ctx
);
700 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
701 ATTR2UI(VBO_ATTRIB_GENERIC0
+ index
, x
, y
);
703 ERROR(GL_INVALID_VALUE
);
706 static void GLAPIENTRY
707 TAG(VertexAttribI3ui
)(GLuint index
, GLuint x
, GLuint y
, GLuint z
)
709 GET_CURRENT_CONTEXT(ctx
);
712 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
713 ATTR3UI(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
);
715 ERROR(GL_INVALID_VALUE
);
718 static void GLAPIENTRY
719 TAG(VertexAttribI4ui
)(GLuint index
, GLuint x
, GLuint y
, GLuint z
, GLuint w
)
721 GET_CURRENT_CONTEXT(ctx
);
723 ATTR4UI(0, x
, y
, z
, w
);
724 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
725 ATTR4UI(VBO_ATTRIB_GENERIC0
+ index
, x
, y
, z
, w
);
727 ERROR(GL_INVALID_VALUE
);
730 static void GLAPIENTRY
731 TAG(VertexAttribI2uiv
)(GLuint index
, const GLuint
*v
)
733 GET_CURRENT_CONTEXT(ctx
);
736 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
737 ATTR2UIV(VBO_ATTRIB_GENERIC0
+ index
, v
);
739 ERROR(GL_INVALID_VALUE
);
742 static void GLAPIENTRY
743 TAG(VertexAttribI3uiv
)(GLuint index
, const GLuint
*v
)
745 GET_CURRENT_CONTEXT(ctx
);
748 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
749 ATTR3UIV(VBO_ATTRIB_GENERIC0
+ index
, v
);
751 ERROR(GL_INVALID_VALUE
);
754 static void GLAPIENTRY
755 TAG(VertexAttribI4uiv
)(GLuint index
, const GLuint
*v
)
757 GET_CURRENT_CONTEXT(ctx
);
760 else if (index
< MAX_VERTEX_GENERIC_ATTRIBS
)
761 ATTR4UIV(VBO_ATTRIB_GENERIC0
+ index
, v
);
763 ERROR(GL_INVALID_VALUE
);
768 /* In addition to supporting NV_vertex_program, these entrypoints are
769 * used by the display list and other code specifically because of
770 * their property of aliasing with other attributes. (See
771 * vbo_save_loopback.c)
773 static void GLAPIENTRY
774 TAG(VertexAttrib1fNV
)(GLuint index
, GLfloat x
)
776 GET_CURRENT_CONTEXT(ctx
);
777 if (index
< VBO_ATTRIB_MAX
)
781 static void GLAPIENTRY
782 TAG(VertexAttrib1fvNV
)(GLuint index
, const GLfloat
* v
)
784 GET_CURRENT_CONTEXT(ctx
);
785 if (index
< VBO_ATTRIB_MAX
)
789 static void GLAPIENTRY
790 TAG(VertexAttrib2fNV
)(GLuint index
, GLfloat x
, GLfloat y
)
792 GET_CURRENT_CONTEXT(ctx
);
793 if (index
< VBO_ATTRIB_MAX
)
797 static void GLAPIENTRY
798 TAG(VertexAttrib2fvNV
)(GLuint index
, const GLfloat
* v
)
800 GET_CURRENT_CONTEXT(ctx
);
801 if (index
< VBO_ATTRIB_MAX
)
805 static void GLAPIENTRY
806 TAG(VertexAttrib3fNV
)(GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
808 GET_CURRENT_CONTEXT(ctx
);
809 if (index
< VBO_ATTRIB_MAX
)
810 ATTR3F(index
, x
, y
, z
);
813 static void GLAPIENTRY
814 TAG(VertexAttrib3fvNV
)(GLuint index
,
817 GET_CURRENT_CONTEXT(ctx
);
818 if (index
< VBO_ATTRIB_MAX
)
822 static void GLAPIENTRY
823 TAG(VertexAttrib4fNV
)(GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
825 GET_CURRENT_CONTEXT(ctx
);
826 if (index
< VBO_ATTRIB_MAX
)
827 ATTR4F(index
, x
, y
, z
, w
);
830 static void GLAPIENTRY
831 TAG(VertexAttrib4fvNV
)(GLuint index
, const GLfloat
* v
)
833 GET_CURRENT_CONTEXT(ctx
);
834 if (index
< VBO_ATTRIB_MAX
)
838 #define ERROR_IF_NOT_PACKED_TYPE(ctx, type, func) \
839 if (type != GL_INT_2_10_10_10_REV && type != GL_UNSIGNED_INT_2_10_10_10_REV) { \
840 _mesa_error(ctx, GL_INVALID_ENUM, "%s(type)", func); \
844 static void GLAPIENTRY
845 TAG(VertexP2ui
)(GLenum type
, GLuint value
)
847 GET_CURRENT_CONTEXT(ctx
);
848 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP2ui");
849 ATTR_UI(ctx
, 2, type
, 0, VBO_ATTRIB_POS
, value
);
852 static void GLAPIENTRY
853 TAG(VertexP2uiv
)(GLenum type
, const GLuint
*value
)
855 GET_CURRENT_CONTEXT(ctx
);
856 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP2uiv");
857 ATTR_UI(ctx
, 2, type
, 0, VBO_ATTRIB_POS
, value
[0]);
860 static void GLAPIENTRY
861 TAG(VertexP3ui
)(GLenum type
, GLuint value
)
863 GET_CURRENT_CONTEXT(ctx
);
864 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP3ui");
865 ATTR_UI(ctx
, 3, type
, 0, VBO_ATTRIB_POS
, value
);
868 static void GLAPIENTRY
869 TAG(VertexP3uiv
)(GLenum type
, const GLuint
*value
)
871 GET_CURRENT_CONTEXT(ctx
);
872 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP3uiv");
873 ATTR_UI(ctx
, 3, type
, 0, VBO_ATTRIB_POS
, value
[0]);
876 static void GLAPIENTRY
877 TAG(VertexP4ui
)(GLenum type
, GLuint value
)
879 GET_CURRENT_CONTEXT(ctx
);
880 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP4ui");
881 ATTR_UI(ctx
, 4, type
, 0, VBO_ATTRIB_POS
, value
);
884 static void GLAPIENTRY
885 TAG(VertexP4uiv
)(GLenum type
, const GLuint
*value
)
887 GET_CURRENT_CONTEXT(ctx
);
888 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexP4uiv");
889 ATTR_UI(ctx
, 4, type
, 0, VBO_ATTRIB_POS
, value
[0]);
892 static void GLAPIENTRY
893 TAG(TexCoordP1ui
)(GLenum type
, GLuint coords
)
895 GET_CURRENT_CONTEXT(ctx
);
896 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP1ui");
897 ATTR_UI(ctx
, 1, type
, 0, VBO_ATTRIB_TEX0
, coords
);
900 static void GLAPIENTRY
901 TAG(TexCoordP1uiv
)(GLenum type
, const GLuint
*coords
)
903 GET_CURRENT_CONTEXT(ctx
);
904 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP1uiv");
905 ATTR_UI(ctx
, 1, type
, 0, VBO_ATTRIB_TEX0
, coords
[0]);
908 static void GLAPIENTRY
909 TAG(TexCoordP2ui
)(GLenum type
, GLuint coords
)
911 GET_CURRENT_CONTEXT(ctx
);
912 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP2ui");
913 ATTR_UI(ctx
, 2, type
, 0, VBO_ATTRIB_TEX0
, coords
);
916 static void GLAPIENTRY
917 TAG(TexCoordP2uiv
)(GLenum type
, const GLuint
*coords
)
919 GET_CURRENT_CONTEXT(ctx
);
920 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP2uiv");
921 ATTR_UI(ctx
, 2, type
, 0, VBO_ATTRIB_TEX0
, coords
[0]);
924 static void GLAPIENTRY
925 TAG(TexCoordP3ui
)(GLenum type
, GLuint coords
)
927 GET_CURRENT_CONTEXT(ctx
);
928 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP3ui");
929 ATTR_UI(ctx
, 3, type
, 0, VBO_ATTRIB_TEX0
, coords
);
932 static void GLAPIENTRY
933 TAG(TexCoordP3uiv
)(GLenum type
, const GLuint
*coords
)
935 GET_CURRENT_CONTEXT(ctx
);
936 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP3uiv");
937 ATTR_UI(ctx
, 3, type
, 0, VBO_ATTRIB_TEX0
, coords
[0]);
940 static void GLAPIENTRY
941 TAG(TexCoordP4ui
)(GLenum type
, GLuint coords
)
943 GET_CURRENT_CONTEXT(ctx
);
944 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP4ui");
945 ATTR_UI(ctx
, 4, type
, 0, VBO_ATTRIB_TEX0
, coords
);
948 static void GLAPIENTRY
949 TAG(TexCoordP4uiv
)(GLenum type
, const GLuint
*coords
)
951 GET_CURRENT_CONTEXT(ctx
);
952 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glTexCoordP4uiv");
953 ATTR_UI(ctx
, 4, type
, 0, VBO_ATTRIB_TEX0
, coords
[0]);
956 static void GLAPIENTRY
957 TAG(MultiTexCoordP1ui
)(GLenum target
, GLenum type
, GLuint coords
)
959 GET_CURRENT_CONTEXT(ctx
);
960 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
961 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP1ui");
962 ATTR_UI(ctx
, 1, type
, 0, attr
, coords
);
965 static void GLAPIENTRY
966 TAG(MultiTexCoordP1uiv
)(GLenum target
, GLenum type
, const GLuint
*coords
)
968 GET_CURRENT_CONTEXT(ctx
);
969 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
970 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP1uiv");
971 ATTR_UI(ctx
, 1, type
, 0, attr
, coords
[0]);
974 static void GLAPIENTRY
975 TAG(MultiTexCoordP2ui
)(GLenum target
, GLenum type
, GLuint coords
)
977 GET_CURRENT_CONTEXT(ctx
);
978 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
979 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP2ui");
980 ATTR_UI(ctx
, 2, type
, 0, attr
, coords
);
983 static void GLAPIENTRY
984 TAG(MultiTexCoordP2uiv
)(GLenum target
, GLenum type
, const GLuint
*coords
)
986 GET_CURRENT_CONTEXT(ctx
);
987 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
988 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP2uiv");
989 ATTR_UI(ctx
, 2, type
, 0, attr
, coords
[0]);
992 static void GLAPIENTRY
993 TAG(MultiTexCoordP3ui
)(GLenum target
, GLenum type
, GLuint coords
)
995 GET_CURRENT_CONTEXT(ctx
);
996 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
997 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP3ui");
998 ATTR_UI(ctx
, 3, type
, 0, attr
, coords
);
1001 static void GLAPIENTRY
1002 TAG(MultiTexCoordP3uiv
)(GLenum target
, GLenum type
, const GLuint
*coords
)
1004 GET_CURRENT_CONTEXT(ctx
);
1005 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
1006 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP3uiv");
1007 ATTR_UI(ctx
, 3, type
, 0, attr
, coords
[0]);
1010 static void GLAPIENTRY
1011 TAG(MultiTexCoordP4ui
)(GLenum target
, GLenum type
, GLuint coords
)
1013 GET_CURRENT_CONTEXT(ctx
);
1014 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
1015 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP4ui");
1016 ATTR_UI(ctx
, 4, type
, 0, attr
, coords
);
1019 static void GLAPIENTRY
1020 TAG(MultiTexCoordP4uiv
)(GLenum target
, GLenum type
, const GLuint
*coords
)
1022 GET_CURRENT_CONTEXT(ctx
);
1023 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glMultiTexCoordP4uiv");
1024 GLuint attr
= (target
& 0x7) + VBO_ATTRIB_TEX0
;
1025 ATTR_UI(ctx
, 4, type
, 0, attr
, coords
[0]);
1028 static void GLAPIENTRY
1029 TAG(NormalP3ui
)(GLenum type
, GLuint coords
)
1031 GET_CURRENT_CONTEXT(ctx
);
1032 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glNormalP3ui");
1033 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_NORMAL
, coords
);
1036 static void GLAPIENTRY
1037 TAG(NormalP3uiv
)(GLenum type
, const GLuint
*coords
)
1039 GET_CURRENT_CONTEXT(ctx
);
1040 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glNormalP3uiv");
1041 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_NORMAL
, coords
[0]);
1044 static void GLAPIENTRY
1045 TAG(ColorP3ui
)(GLenum type
, GLuint color
)
1047 GET_CURRENT_CONTEXT(ctx
);
1048 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glColorP3ui");
1049 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_COLOR0
, color
);
1052 static void GLAPIENTRY
1053 TAG(ColorP3uiv
)(GLenum type
, const GLuint
*color
)
1055 GET_CURRENT_CONTEXT(ctx
);
1056 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glColorP3uiv");
1057 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_COLOR0
, color
[0]);
1060 static void GLAPIENTRY
1061 TAG(ColorP4ui
)(GLenum type
, GLuint color
)
1063 GET_CURRENT_CONTEXT(ctx
);
1064 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glColorP4ui");
1065 ATTR_UI(ctx
, 4, type
, 1, VBO_ATTRIB_COLOR0
, color
);
1068 static void GLAPIENTRY
1069 TAG(ColorP4uiv
)(GLenum type
, const GLuint
*color
)
1071 GET_CURRENT_CONTEXT(ctx
);
1072 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glColorP4uiv");
1073 ATTR_UI(ctx
, 4, type
, 1, VBO_ATTRIB_COLOR0
, color
[0]);
1076 static void GLAPIENTRY
1077 TAG(SecondaryColorP3ui
)(GLenum type
, GLuint color
)
1079 GET_CURRENT_CONTEXT(ctx
);
1080 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glSecondaryColorP3ui");
1081 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_COLOR1
, color
);
1084 static void GLAPIENTRY
1085 TAG(SecondaryColorP3uiv
)(GLenum type
, const GLuint
*color
)
1087 GET_CURRENT_CONTEXT(ctx
);
1088 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glSecondaryColorP3uiv");
1089 ATTR_UI(ctx
, 3, type
, 1, VBO_ATTRIB_COLOR1
, color
[0]);
1092 static void GLAPIENTRY
1093 TAG(VertexAttribP1ui
)(GLuint index
, GLenum type
, GLboolean normalized
,
1096 GET_CURRENT_CONTEXT(ctx
);
1097 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP1ui");
1098 ATTR_UI_INDEX(ctx
, 1, type
, normalized
, index
, value
);
1101 static void GLAPIENTRY
1102 TAG(VertexAttribP2ui
)(GLuint index
, GLenum type
, GLboolean normalized
,
1105 GET_CURRENT_CONTEXT(ctx
);
1106 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP2ui");
1107 ATTR_UI_INDEX(ctx
, 2, type
, normalized
, index
, value
);
1110 static void GLAPIENTRY
1111 TAG(VertexAttribP3ui
)(GLuint index
, GLenum type
, GLboolean normalized
,
1114 GET_CURRENT_CONTEXT(ctx
);
1115 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP3ui");
1116 ATTR_UI_INDEX(ctx
, 3, type
, normalized
, index
, value
);
1119 static void GLAPIENTRY
1120 TAG(VertexAttribP4ui
)(GLuint index
, GLenum type
, GLboolean normalized
,
1123 GET_CURRENT_CONTEXT(ctx
);
1124 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP4ui");
1125 ATTR_UI_INDEX(ctx
, 4, type
, normalized
, index
, value
);
1128 static void GLAPIENTRY
1129 TAG(VertexAttribP1uiv
)(GLuint index
, GLenum type
, GLboolean normalized
,
1130 const GLuint
*value
)
1132 GET_CURRENT_CONTEXT(ctx
);
1133 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP1uiv");
1134 ATTR_UI_INDEX(ctx
, 1, type
, normalized
, index
, *value
);
1137 static void GLAPIENTRY
1138 TAG(VertexAttribP2uiv
)(GLuint index
, GLenum type
, GLboolean normalized
,
1139 const GLuint
*value
)
1141 GET_CURRENT_CONTEXT(ctx
);
1142 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP2uiv");
1143 ATTR_UI_INDEX(ctx
, 2, type
, normalized
, index
, *value
);
1146 static void GLAPIENTRY
1147 TAG(VertexAttribP3uiv
)(GLuint index
, GLenum type
, GLboolean normalized
,
1148 const GLuint
*value
)
1150 GET_CURRENT_CONTEXT(ctx
);
1151 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP3uiv");
1152 ATTR_UI_INDEX(ctx
, 3, type
, normalized
, index
, *value
);
1155 static void GLAPIENTRY
1156 TAG(VertexAttribP4uiv
)(GLuint index
, GLenum type
, GLboolean normalized
,
1157 const GLuint
*value
)
1159 GET_CURRENT_CONTEXT(ctx
);
1160 ERROR_IF_NOT_PACKED_TYPE(ctx
, type
, "glVertexAttribP4uiv");
1161 ATTR_UI_INDEX(ctx
, 4, type
, normalized
, index
, *value
);