[Mesa-dev] [PATCH v2 19/24] mesa: refactor GetActiveUniformName

Martin Peres martin.peres at linux.intel.com
Mon Apr 13 07:26:21 PDT 2015


On 01/04/15 15:14, Tapani Pälli wrote:
> Use _mesa_get_program_resource_name to get name.
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>   src/mesa/main/uniforms.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
> index dc9b5a0..69f8a3f 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

Reviewed-by: Martin Peres <martin.peres at linux.intel.com>


More information about the mesa-dev mailing list