From: Tapani Pälli Date: Thu, 12 Mar 2015 12:37:20 +0000 (+0200) Subject: mesa: refactor GetUniformIndices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b256eb0ec1f919f23641f8d47d4b2ce126dd1a4;p=mesa.git mesa: refactor GetUniformIndices Use _mesa_program_resource_index to get indices. Signed-off-by: Tapani Pälli Reviewed-by: Martin Peres --- diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 0c16641533c..f4de1df4426 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -986,9 +986,9 @@ _mesa_GetUniformIndices(GLuint program, } for (i = 0; i < uniformCount; i++) { - unsigned offset; - uniformIndices[i] = _mesa_get_uniform_location(shProg, - uniformNames[i], &offset); + struct gl_program_resource *res = + _mesa_program_resource_find_name(shProg, GL_UNIFORM, uniformNames[i]); + uniformIndices[i] = _mesa_program_resource_index(shProg, res); } }