[DMUSIC]
[reactos.git] / reactos / dll / opengl / mesa / src / mesa / main / uniforms.c
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
5 * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
6 * Copyright © 2010 Intel Corporation
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26 /**
27 * \file uniforms.c
28 * Functions related to GLSL uniform variables.
29 * \author Brian Paul
30 */
31
32 /**
33 * XXX things to do:
34 * 1. Check that the right error code is generated for all _mesa_error() calls.
35 * 2. Insert FLUSH_VERTICES calls in various places
36 */
37
38 #include "main/glheader.h"
39 #include "main/context.h"
40 #include "main/dispatch.h"
41 #include "main/shaderapi.h"
42 #include "main/shaderobj.h"
43 #include "main/uniforms.h"
44 #include "ir_uniform.h"
45 #include "glsl_types.h"
46
47 /**
48 * Update the vertex/fragment program's TexturesUsed array.
49 *
50 * This needs to be called after glUniform(set sampler var) is called.
51 * A call to glUniform(samplerVar, value) causes a sampler to point to a
52 * particular texture unit. We know the sampler's texture target
53 * (1D/2D/3D/etc) from compile time but the sampler's texture unit is
54 * set by glUniform() calls.
55 *
56 * So, scan the program->SamplerUnits[] and program->SamplerTargets[]
57 * information to update the prog->TexturesUsed[] values.
58 * Each value of TexturesUsed[unit] is one of zero, TEXTURE_1D_INDEX,
59 * TEXTURE_2D_INDEX, TEXTURE_3D_INDEX, etc.
60 * We'll use that info for state validation before rendering.
61 */
62 void
63 _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
64 struct gl_program *prog)
65 {
66 GLuint s;
67
68 memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
69
70 for (s = 0; s < MAX_SAMPLERS; s++) {
71 if (prog->SamplersUsed & (1 << s)) {
72 GLuint unit = shProg->SamplerUnits[s];
73 GLuint tgt = shProg->SamplerTargets[s];
74 assert(unit < Elements(prog->TexturesUsed));
75 assert(tgt < NUM_TEXTURE_TARGETS);
76 prog->TexturesUsed[unit] |= (1 << tgt);
77 }
78 }
79 }
80
81 /**
82 * Connect a piece of driver storage with a part of a uniform
83 *
84 * \param uni The uniform with which the storage will be associated
85 * \param element_stride Byte-stride between array elements.
86 * \sa gl_uniform_driver_storage::element_stride.
87 * \param vector_stride Byte-stride between vectors (in a matrix).
88 * \sa gl_uniform_driver_storage::vector_stride.
89 * \param format Conversion from native format to driver format
90 * required by the driver.
91 * \param data Location to dump the data.
92 */
93 void
94 _mesa_uniform_attach_driver_storage(struct gl_uniform_storage *uni,
95 unsigned element_stride,
96 unsigned vector_stride,
97 enum gl_uniform_driver_format format,
98 void *data)
99 {
100 uni->driver_storage = (struct gl_uniform_driver_storage*)
101 realloc(uni->driver_storage,
102 sizeof(struct gl_uniform_driver_storage)
103 * (uni->num_driver_storage + 1));
104
105 uni->driver_storage[uni->num_driver_storage].element_stride = element_stride;
106 uni->driver_storage[uni->num_driver_storage].vector_stride = vector_stride;
107 uni->driver_storage[uni->num_driver_storage].format = (uint8_t) format;
108 uni->driver_storage[uni->num_driver_storage].data = data;
109
110 uni->num_driver_storage++;
111 }
112
113 /**
114 * Sever all connections with all pieces of driver storage for all uniforms
115 *
116 * \warning
117 * This function does \b not release any of the \c data pointers
118 * previously passed in to \c _mesa_uniform_attach_driver_stoarge.
119 */
120 void
121 _mesa_uniform_detach_all_driver_storage(struct gl_uniform_storage *uni)
122 {
123 free(uni->driver_storage);
124 uni->driver_storage = NULL;
125 uni->num_driver_storage = 0;
126 }
127
128 void GLAPIENTRY
129 _mesa_Uniform1fARB(GLint location, GLfloat v0)
130 {
131 GET_CURRENT_CONTEXT(ctx);
132 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
133 }
134
135 void GLAPIENTRY
136 _mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
137 {
138 GET_CURRENT_CONTEXT(ctx);
139 GLfloat v[2];
140 v[0] = v0;
141 v[1] = v1;
142 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
143 }
144
145 void GLAPIENTRY
146 _mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
147 {
148 GET_CURRENT_CONTEXT(ctx);
149 GLfloat v[3];
150 v[0] = v0;
151 v[1] = v1;
152 v[2] = v2;
153 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
154 }
155
156 void GLAPIENTRY
157 _mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
158 GLfloat v3)
159 {
160 GET_CURRENT_CONTEXT(ctx);
161 GLfloat v[4];
162 v[0] = v0;
163 v[1] = v1;
164 v[2] = v2;
165 v[3] = v3;
166 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
167 }
168
169 void GLAPIENTRY
170 _mesa_Uniform1iARB(GLint location, GLint v0)
171 {
172 GET_CURRENT_CONTEXT(ctx);
173 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
174 }
175
176 void GLAPIENTRY
177 _mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
178 {
179 GET_CURRENT_CONTEXT(ctx);
180 GLint v[2];
181 v[0] = v0;
182 v[1] = v1;
183 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
184 }
185
186 void GLAPIENTRY
187 _mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
188 {
189 GET_CURRENT_CONTEXT(ctx);
190 GLint v[3];
191 v[0] = v0;
192 v[1] = v1;
193 v[2] = v2;
194 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
195 }
196
197 void GLAPIENTRY
198 _mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
199 {
200 GET_CURRENT_CONTEXT(ctx);
201 GLint v[4];
202 v[0] = v0;
203 v[1] = v1;
204 v[2] = v2;
205 v[3] = v3;
206 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
207 }
208
209 void GLAPIENTRY
210 _mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
211 {
212 GET_CURRENT_CONTEXT(ctx);
213 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
214 }
215
216 void GLAPIENTRY
217 _mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
218 {
219 GET_CURRENT_CONTEXT(ctx);
220 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
221 }
222
223 void GLAPIENTRY
224 _mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
225 {
226 GET_CURRENT_CONTEXT(ctx);
227 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
228 }
229
230 void GLAPIENTRY
231 _mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
232 {
233 GET_CURRENT_CONTEXT(ctx);
234 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
235 }
236
237 void GLAPIENTRY
238 _mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
239 {
240 GET_CURRENT_CONTEXT(ctx);
241 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
242 }
243
244 void GLAPIENTRY
245 _mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
246 {
247 GET_CURRENT_CONTEXT(ctx);
248 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
249 }
250
251 void GLAPIENTRY
252 _mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
253 {
254 GET_CURRENT_CONTEXT(ctx);
255 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
256 }
257
258 void GLAPIENTRY
259 _mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
260 {
261 GET_CURRENT_CONTEXT(ctx);
262 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
263 }
264
265
266 /** OpenGL 3.0 GLuint-valued functions **/
267 void GLAPIENTRY
268 _mesa_Uniform1ui(GLint location, GLuint v0)
269 {
270 GET_CURRENT_CONTEXT(ctx);
271 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
272 }
273
274 void GLAPIENTRY
275 _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
276 {
277 GET_CURRENT_CONTEXT(ctx);
278 GLuint v[2];
279 v[0] = v0;
280 v[1] = v1;
281 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
282 }
283
284 void GLAPIENTRY
285 _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
286 {
287 GET_CURRENT_CONTEXT(ctx);
288 GLuint v[3];
289 v[0] = v0;
290 v[1] = v1;
291 v[2] = v2;
292 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
293 }
294
295 void GLAPIENTRY
296 _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
297 {
298 GET_CURRENT_CONTEXT(ctx);
299 GLuint v[4];
300 v[0] = v0;
301 v[1] = v1;
302 v[2] = v2;
303 v[3] = v3;
304 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
305 }
306
307 void GLAPIENTRY
308 _mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
309 {
310 GET_CURRENT_CONTEXT(ctx);
311 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
312 }
313
314 void GLAPIENTRY
315 _mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
316 {
317 GET_CURRENT_CONTEXT(ctx);
318 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
319 }
320
321 void GLAPIENTRY
322 _mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
323 {
324 GET_CURRENT_CONTEXT(ctx);
325 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
326 }
327
328 void GLAPIENTRY
329 _mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
330 {
331 GET_CURRENT_CONTEXT(ctx);
332 _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
333 }
334
335
336
337 void GLAPIENTRY
338 _mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
339 const GLfloat * value)
340 {
341 GET_CURRENT_CONTEXT(ctx);
342 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
343 2, 2, location, count, transpose, value);
344 }
345
346 void GLAPIENTRY
347 _mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
348 const GLfloat * value)
349 {
350 GET_CURRENT_CONTEXT(ctx);
351 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
352 3, 3, location, count, transpose, value);
353 }
354
355 void GLAPIENTRY
356 _mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
357 const GLfloat * value)
358 {
359 GET_CURRENT_CONTEXT(ctx);
360 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
361 4, 4, location, count, transpose, value);
362 }
363
364
365 /**
366 * Non-square UniformMatrix are OpenGL 2.1
367 */
368 void GLAPIENTRY
369 _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
370 const GLfloat *value)
371 {
372 GET_CURRENT_CONTEXT(ctx);
373 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
374 2, 3, location, count, transpose, value);
375 }
376
377 void GLAPIENTRY
378 _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
379 const GLfloat *value)
380 {
381 GET_CURRENT_CONTEXT(ctx);
382 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
383 3, 2, location, count, transpose, value);
384 }
385
386 void GLAPIENTRY
387 _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
388 const GLfloat *value)
389 {
390 GET_CURRENT_CONTEXT(ctx);
391 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
392 2, 4, location, count, transpose, value);
393 }
394
395 void GLAPIENTRY
396 _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
397 const GLfloat *value)
398 {
399 GET_CURRENT_CONTEXT(ctx);
400 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
401 4, 2, location, count, transpose, value);
402 }
403
404 void GLAPIENTRY
405 _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
406 const GLfloat *value)
407 {
408 GET_CURRENT_CONTEXT(ctx);
409 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
410 3, 4, location, count, transpose, value);
411 }
412
413 void GLAPIENTRY
414 _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
415 const GLfloat *value)
416 {
417 GET_CURRENT_CONTEXT(ctx);
418 _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
419 4, 3, location, count, transpose, value);
420 }
421
422
423 void GLAPIENTRY
424 _mesa_GetnUniformfvARB(GLhandleARB program, GLint location,
425 GLsizei bufSize, GLfloat *params)
426 {
427 GET_CURRENT_CONTEXT(ctx);
428 _mesa_get_uniform(ctx, program, location, bufSize, GLSL_TYPE_FLOAT, params);
429 }
430
431 void GLAPIENTRY
432 _mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat *params)
433 {
434 _mesa_GetnUniformfvARB(program, location, INT_MAX, params);
435 }
436
437
438 void GLAPIENTRY
439 _mesa_GetnUniformivARB(GLhandleARB program, GLint location,
440 GLsizei bufSize, GLint *params)
441 {
442 GET_CURRENT_CONTEXT(ctx);
443 _mesa_get_uniform(ctx, program, location, bufSize, GLSL_TYPE_INT, params);
444 }
445
446 void GLAPIENTRY
447 _mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint *params)
448 {
449 _mesa_GetnUniformivARB(program, location, INT_MAX, params);
450 }
451
452
453 /* GL3 */
454 void GLAPIENTRY
455 _mesa_GetnUniformuivARB(GLhandleARB program, GLint location,
456 GLsizei bufSize, GLuint *params)
457 {
458 GET_CURRENT_CONTEXT(ctx);
459 _mesa_get_uniform(ctx, program, location, bufSize, GLSL_TYPE_UINT, params);
460 }
461
462 void GLAPIENTRY
463 _mesa_GetUniformuiv(GLhandleARB program, GLint location, GLuint *params)
464 {
465 _mesa_GetnUniformuivARB(program, location, INT_MAX, params);
466 }
467
468
469 /* GL4 */
470 void GLAPIENTRY
471 _mesa_GetnUniformdvARB(GLhandleARB program, GLint location,
472 GLsizei bufSize, GLdouble *params)
473 {
474 GET_CURRENT_CONTEXT(ctx);
475
476 (void) program;
477 (void) location;
478 (void) bufSize;
479 (void) params;
480
481 /*
482 _mesa_get_uniform(ctx, program, location, bufSize, GLSL_TYPE_DOUBLE, params);
483 */
484 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformdvARB"
485 "(GL_ARB_gpu_shader_fp64 not implemented)");
486 }
487
488 void GLAPIENTRY
489 _mesa_GetUniformdv(GLhandleARB program, GLint location, GLdouble *params)
490 {
491 _mesa_GetnUniformdvARB(program, location, INT_MAX, params);
492 }
493
494
495 GLint GLAPIENTRY
496 _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
497 {
498 struct gl_shader_program *shProg;
499
500 GET_CURRENT_CONTEXT(ctx);
501
502 shProg = _mesa_lookup_shader_program_err(ctx, programObj,
503 "glGetUniformLocation");
504 if (!shProg)
505 return -1;
506
507 /* Page 80 (page 94 of the PDF) of the OpenGL 2.1 spec says:
508 *
509 * "If program has not been successfully linked, the error
510 * INVALID_OPERATION is generated."
511 */
512 if (shProg->LinkStatus == GL_FALSE) {
513 _mesa_error(ctx, GL_INVALID_OPERATION,
514 "glGetUniformLocation(program not linked)");
515 return -1;
516 }
517
518 return _mesa_get_uniform_location(ctx, shProg, name);
519 }
520
521
522 /**
523 * Plug in shader uniform-related functions into API dispatch table.
524 */
525 void
526 _mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
527 {
528 #if FEATURE_GL
529 SET_Uniform1fARB(exec, _mesa_Uniform1fARB);
530 SET_Uniform2fARB(exec, _mesa_Uniform2fARB);
531 SET_Uniform3fARB(exec, _mesa_Uniform3fARB);
532 SET_Uniform4fARB(exec, _mesa_Uniform4fARB);
533 SET_Uniform1iARB(exec, _mesa_Uniform1iARB);
534 SET_Uniform2iARB(exec, _mesa_Uniform2iARB);
535 SET_Uniform3iARB(exec, _mesa_Uniform3iARB);
536 SET_Uniform4iARB(exec, _mesa_Uniform4iARB);
537 SET_Uniform1fvARB(exec, _mesa_Uniform1fvARB);
538 SET_Uniform2fvARB(exec, _mesa_Uniform2fvARB);
539 SET_Uniform3fvARB(exec, _mesa_Uniform3fvARB);
540 SET_Uniform4fvARB(exec, _mesa_Uniform4fvARB);
541 SET_Uniform1ivARB(exec, _mesa_Uniform1ivARB);
542 SET_Uniform2ivARB(exec, _mesa_Uniform2ivARB);
543 SET_Uniform3ivARB(exec, _mesa_Uniform3ivARB);
544 SET_Uniform4ivARB(exec, _mesa_Uniform4ivARB);
545 SET_UniformMatrix2fvARB(exec, _mesa_UniformMatrix2fvARB);
546 SET_UniformMatrix3fvARB(exec, _mesa_UniformMatrix3fvARB);
547 SET_UniformMatrix4fvARB(exec, _mesa_UniformMatrix4fvARB);
548
549 SET_GetActiveUniformARB(exec, _mesa_GetActiveUniformARB);
550 SET_GetUniformLocationARB(exec, _mesa_GetUniformLocationARB);
551 SET_GetUniformfvARB(exec, _mesa_GetUniformfvARB);
552 SET_GetUniformivARB(exec, _mesa_GetUniformivARB);
553
554 /* OpenGL 2.1 */
555 SET_UniformMatrix2x3fv(exec, _mesa_UniformMatrix2x3fv);
556 SET_UniformMatrix3x2fv(exec, _mesa_UniformMatrix3x2fv);
557 SET_UniformMatrix2x4fv(exec, _mesa_UniformMatrix2x4fv);
558 SET_UniformMatrix4x2fv(exec, _mesa_UniformMatrix4x2fv);
559 SET_UniformMatrix3x4fv(exec, _mesa_UniformMatrix3x4fv);
560 SET_UniformMatrix4x3fv(exec, _mesa_UniformMatrix4x3fv);
561
562 /* OpenGL 3.0 */
563 SET_Uniform1uiEXT(exec, _mesa_Uniform1ui);
564 SET_Uniform2uiEXT(exec, _mesa_Uniform2ui);
565 SET_Uniform3uiEXT(exec, _mesa_Uniform3ui);
566 SET_Uniform4uiEXT(exec, _mesa_Uniform4ui);
567 SET_Uniform1uivEXT(exec, _mesa_Uniform1uiv);
568 SET_Uniform2uivEXT(exec, _mesa_Uniform2uiv);
569 SET_Uniform3uivEXT(exec, _mesa_Uniform3uiv);
570 SET_Uniform4uivEXT(exec, _mesa_Uniform4uiv);
571 SET_GetUniformuivEXT(exec, _mesa_GetUniformuiv);
572
573 /* GL_ARB_robustness */
574 SET_GetnUniformfvARB(exec, _mesa_GetnUniformfvARB);
575 SET_GetnUniformivARB(exec, _mesa_GetnUniformivARB);
576 SET_GetnUniformuivARB(exec, _mesa_GetnUniformuivARB);
577 SET_GetnUniformdvARB(exec, _mesa_GetnUniformdvARB); /* GL 4.0 */
578
579 #endif /* FEATURE_GL */
580 }