summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
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);
}