mesa: glGetProgramResourceName
authorTapani Pälli <tapani.palli@intel.com>
Tue, 10 Mar 2015 08:33:20 +0000 (10:33 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 16 Apr 2015 04:55:56 +0000 (07:55 +0300)
commit2a5a0d19d67b2ccd7eee33a6f3bead66cc2d78ff
treecb6e49fc1ab0eefa42dde2c8d4ad8286bb043110
parent161f57f6103802de55d792bcc6a4370afa5c5173
mesa: glGetProgramResourceName

Patch adds required helper functions to shaderapi.h and
the actual implementation.

Name generation copied from '_mesa_get_uniform_name' which can
be removed later by refactoring functions to use resource list.

The added functionality can be tested by tests for following
functions that are refactored by later patches:

   GetActiveUniformName
   GetActiveUniformBlockName

v2: no index for geometry shader inputs (Ilia Mirkin)
    add bufSize < 0 check and error out
    validate enum

corresponding Piglit test:
   arb_program_interface_query-getprogramresourcename

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.org>
src/mesa/main/program_resource.c
src/mesa/main/shader_query.cpp
src/mesa/main/shaderapi.h