mesa: implementation of glGetProgramResourceiv
authorTapani Pälli <tapani.palli@intel.com>
Tue, 10 Mar 2015 11:11:14 +0000 (13:11 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 16 Apr 2015 04:55:57 +0000 (07:55 +0300)
commit2ab8de2181988870a95de23aeb906df5678e1e90
tree277c48bd24233d7fc96123ded05d6d4b21b0a65a
parent9367ade331e5d0a7724c595e7afb0322caaaddf7
mesa: implementation of glGetProgramResourceiv

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

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

   GetActiveAtomicCounterBufferiv
   GetActiveUniformBlockiv
   GetActiveUniformsiv

v2: code cleanup (Ilia Mirkin)
    add bufSize < 0 check and error out
    fix is_resource_referenced to return bool
    check for propCount and bufSize, fixes in buffer_prop

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