mesa: Allow setting GL_TEXTURE_MAX_LEVEL to 0 with GL_TEXTURE_RECTANGLE.
[mesa.git] / src / mesa / main / uniforms.c
index 4c123660f594ec8321226fa70f8294109ae850d4..1daade4283835f86142059ffb065d832c0839cc8 100644 (file)
@@ -137,7 +137,7 @@ void GLAPIENTRY
 _mesa_Uniform1f(GLint location, GLfloat v0)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_FLOAT);
 }
 
 void GLAPIENTRY
@@ -147,7 +147,7 @@ _mesa_Uniform2f(GLint location, GLfloat v0, GLfloat v1)
    GLfloat v[2];
    v[0] = v0;
    v[1] = v1;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
 }
 
 void GLAPIENTRY
@@ -158,7 +158,7 @@ _mesa_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
 }
 
 void GLAPIENTRY
@@ -171,14 +171,14 @@ _mesa_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
 }
 
 void GLAPIENTRY
 _mesa_Uniform1i(GLint location, GLint v0)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_INT);
 }
 
 void GLAPIENTRY
@@ -188,7 +188,7 @@ _mesa_Uniform2i(GLint location, GLint v0, GLint v1)
    GLint v[2];
    v[0] = v0;
    v[1] = v1;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC2);
 }
 
 void GLAPIENTRY
@@ -199,7 +199,7 @@ _mesa_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2)
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC3);
 }
 
 void GLAPIENTRY
@@ -211,63 +211,63 @@ _mesa_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC4);
 }
 
 void GLAPIENTRY
 _mesa_Uniform1fv(GLint location, GLsizei count, const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT);
 }
 
 void GLAPIENTRY
 _mesa_Uniform2fv(GLint location, GLsizei count, const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC2);
 }
 
 void GLAPIENTRY
 _mesa_Uniform3fv(GLint location, GLsizei count, const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC3);
 }
 
 void GLAPIENTRY
 _mesa_Uniform4fv(GLint location, GLsizei count, const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC4);
 }
 
 void GLAPIENTRY
 _mesa_Uniform1iv(GLint location, GLsizei count, const GLint * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT);
 }
 
 void GLAPIENTRY
 _mesa_Uniform2iv(GLint location, GLsizei count, const GLint * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC2);
 }
 
 void GLAPIENTRY
 _mesa_Uniform3iv(GLint location, GLsizei count, const GLint * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC3);
 }
 
 void GLAPIENTRY
 _mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC4);
 }
 
 /** Same as above with direct state access **/
@@ -286,11 +286,10 @@ _mesa_ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat v[2];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform2f");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform2f");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC2);
 }
 
@@ -300,12 +299,11 @@ _mesa_ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat v[3];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform3f");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform3f");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC3);
 }
 
@@ -315,13 +313,12 @@ _mesa_ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat v[4];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform4f");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4f");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC4);
 }
 
@@ -340,11 +337,10 @@ _mesa_ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint v[2];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform2i");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform2i");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC2);
 }
 
@@ -354,12 +350,11 @@ _mesa_ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint v[3];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform3i");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform3i");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC3);
 }
 
@@ -369,13 +364,12 @@ _mesa_ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint v[4];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform4i");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4i");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC4);
 }
 
@@ -473,7 +467,7 @@ void GLAPIENTRY
 _mesa_Uniform1ui(GLint location, GLuint v0)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
 }
 
 void GLAPIENTRY
@@ -483,7 +477,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
    GLuint v[2];
    v[0] = v0;
    v[1] = v1;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
 }
 
 void GLAPIENTRY
@@ -494,7 +488,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
 }
 
 void GLAPIENTRY
@@ -506,35 +500,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
 }
 
 void GLAPIENTRY
 _mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT);
 }
 
 void GLAPIENTRY
 _mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
 }
 
 void GLAPIENTRY
 _mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
 }
 
 void GLAPIENTRY
 _mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+   _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
 }
 
 
@@ -544,7 +538,7 @@ _mesa_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
                           const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        2, 2, location, count, transpose, value);
 }
 
@@ -553,7 +547,7 @@ _mesa_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose,
                           const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        3, 3, location, count, transpose, value);
 }
 
@@ -562,7 +556,7 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
                           const GLfloat * value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        4, 4, location, count, transpose, value);
 }
 
@@ -583,11 +577,11 @@ _mesa_ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint v[2];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform2ui");
+   shProg = _mesa_lookup_shader_program_err(ctx, program,
+                                            "glProgramUniform2ui");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC2);
 }
 
@@ -597,12 +591,12 @@ _mesa_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint v[3];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform3ui");
+   shProg = _mesa_lookup_shader_program_err(ctx, program,
+                                            "glProgramUniform3ui");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC3);
 }
 
@@ -612,13 +606,12 @@ _mesa_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1,
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint v[4];
+   struct gl_shader_program *shProg;
    v[0] = v0;
    v[1] = v1;
    v[2] = v2;
    v[3] = v3;
-   struct gl_shader_program *shProg =
-      _mesa_lookup_shader_program_err(ctx, program,
-            "glProgramUniform4ui");
+   shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4ui");
    _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC4);
 }
 
@@ -710,7 +703,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        2, 3, location, count, transpose, value);
 }
 
@@ -719,7 +712,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        3, 2, location, count, transpose, value);
 }
 
@@ -728,7 +721,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        2, 4, location, count, transpose, value);
 }
 
@@ -737,7 +730,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        4, 2, location, count, transpose, value);
 }
 
@@ -746,7 +739,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        3, 4, location, count, transpose, value);
 }
 
@@ -755,7 +748,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
                          const GLfloat *value)
 {
    GET_CURRENT_CONTEXT(ctx);
-   _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+   _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
                        4, 3, location, count, transpose, value);
 }
 
@@ -829,7 +822,7 @@ _mesa_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
 
 
 void GLAPIENTRY
-_mesa_GetnUniformfvARB(GLhandleARB program, GLint location,
+_mesa_GetnUniformfvARB(GLuint program, GLint location,
                        GLsizei bufSize, GLfloat *params)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -837,14 +830,14 @@ _mesa_GetnUniformfvARB(GLhandleARB program, GLint location,
 }
 
 void GLAPIENTRY
-_mesa_GetUniformfv(GLhandleARB program, GLint location, GLfloat *params)
+_mesa_GetUniformfv(GLuint program, GLint location, GLfloat *params)
 {
    _mesa_GetnUniformfvARB(program, location, INT_MAX, params);
 }
 
 
 void GLAPIENTRY
-_mesa_GetnUniformivARB(GLhandleARB program, GLint location,
+_mesa_GetnUniformivARB(GLuint program, GLint location,
                        GLsizei bufSize, GLint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -852,7 +845,7 @@ _mesa_GetnUniformivARB(GLhandleARB program, GLint location,
 }
 
 void GLAPIENTRY
-_mesa_GetUniformiv(GLhandleARB program, GLint location, GLint *params)
+_mesa_GetUniformiv(GLuint program, GLint location, GLint *params)
 {
    _mesa_GetnUniformivARB(program, location, INT_MAX, params);
 }
@@ -860,7 +853,7 @@ _mesa_GetUniformiv(GLhandleARB program, GLint location, GLint *params)
 
 /* GL3 */
 void GLAPIENTRY
-_mesa_GetnUniformuivARB(GLhandleARB program, GLint location,
+_mesa_GetnUniformuivARB(GLuint program, GLint location,
                         GLsizei bufSize, GLuint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -868,7 +861,7 @@ _mesa_GetnUniformuivARB(GLhandleARB program, GLint location,
 }
 
 void GLAPIENTRY
-_mesa_GetUniformuiv(GLhandleARB program, GLint location, GLuint *params)
+_mesa_GetUniformuiv(GLuint program, GLint location, GLuint *params)
 {
    _mesa_GetnUniformuivARB(program, location, INT_MAX, params);
 }
@@ -876,8 +869,8 @@ _mesa_GetUniformuiv(GLhandleARB program, GLint location, GLuint *params)
 
 /* GL4 */
 void GLAPIENTRY
-_mesa_GetnUniformdvARB(GLhandleARB program, GLint location,
-                        GLsizei bufSize, GLdouble *params)
+_mesa_GetnUniformdvARB(GLuint program, GLint location,
+                       GLsizei bufSize, GLdouble *params)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -894,14 +887,14 @@ _mesa_GetnUniformdvARB(GLhandleARB program, GLint location,
 }
 
 void GLAPIENTRY
-_mesa_GetUniformdv(GLhandleARB program, GLint location, GLdouble *params)
+_mesa_GetUniformdv(GLuint program, GLint location, GLdouble *params)
 {
    _mesa_GetnUniformdvARB(program, location, INT_MAX, params);
 }
 
 
 GLint GLAPIENTRY
-_mesa_GetUniformLocation(GLhandleARB programObj, const GLcharARB *name)
+_mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name)
 {
    struct gl_shader_program *shProg;
    GLuint index, offset;