aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-06-25 10:23:24 -0700
committerEric Anholt <[email protected]>2012-07-20 10:43:33 -0700
commitabcdbdf9cce3c7520ee999fac3099d609960847d (patch)
treefd3c3bb8d17baff017aeea9819d04fd695c31a6b /src/mesa/main/uniforms.c
parentf609cf782ab5e90ddf045dc4b0da8cebf99be0d1 (diff)
mesa: Move the _mesa_uniform_merge_location_offset to glGetUniformLocation().
With the upcoming GL_ARB_uniform_buffer_object changes, the only other caller that will want the cooked value is state_tracker. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index e6604b1a4c6..2a048a5553c 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -497,6 +497,7 @@ GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
{
struct gl_shader_program *shProg;
+ GLuint index, offset;
GET_CURRENT_CONTEXT(ctx);
@@ -516,7 +517,11 @@ _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
return -1;
}
- return _mesa_get_uniform_location(ctx, shProg, name);
+ index = _mesa_get_uniform_location(ctx, shProg, name, &offset);
+ if (index == GL_INVALID_INDEX)
+ return -1;
+
+ return _mesa_uniform_merge_location_offset(index, offset);
}