mesa: refactor GetActiveUniformName

Use _mesa_get_program_resource_name to get name.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
This commit is contained in:
Tapani Pälli 2015-03-12 13:22:16 +02:00
parent 17dc939f75
commit 8d6fa52e33
1 changed files with 2 additions and 9 deletions

View File

@ -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