From 8d6fa52e33183942fe93e2fad27bf4881b0a1ce0 Mon Sep 17 00:00:00 2001 From: Tapani Pälli Date: Thu, 12 Mar 2015 13:22:16 +0200 Subject: mesa: refactor GetActiveUniformName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use _mesa_get_program_resource_name to get name. Signed-off-by: Tapani Pälli Reviewed-by: Martin Peres --- src/mesa/main/uniforms.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/mesa/main/uniforms.c') 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 -- cgit v1.2.3