From: Tapani Pälli Date: Thu, 12 Mar 2015 11:22:16 +0000 (+0200) Subject: mesa: refactor GetActiveUniformName X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d6fa52e33183942fe93e2fad27bf4881b0a1ce0;p=mesa.git mesa: refactor GetActiveUniformName Use _mesa_get_program_resource_name to get name. 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 dc9b5a02b5c..69f8a3fc0b6 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1226,15 +1226,8 @@ _mesa_GetActiveUniformName(GLuint program, GLuint uniformIndex, if (!shProg) return; - if (uniformIndex >= shProg->NumUserUniformStorage) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); - return; - } - - if (uniformName) { - _mesa_get_uniform_name(& shProg->UniformStorage[uniformIndex], - bufSize, length, uniformName); - } + _mesa_get_program_resource_name(shProg, GL_UNIFORM, uniformIndex, bufSize, + length, uniformName, "glGetActiveUniformName"); } void