mesa: fix ARRAY_SIZE query for GetProgramResourceiv
authorTapani Pälli <tapani.palli@intel.com>
Mon, 3 Aug 2015 05:58:20 +0000 (08:58 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 29 Sep 2015 09:46:28 +0000 (12:46 +0300)
commitc0722be9f58ef89dae98d8c459ec4f9589f97748
treedcd6b8108ac7d3da8dea06210ae1dc1d1bcf2234
parent12d510ab742baad88d624585938c723ffedbcae7
mesa: fix ARRAY_SIZE query for GetProgramResourceiv

Patch also refactors name length queries which were using array size
in computation, this has to be done in same time to avoid regression in
arb_program_interface_query-resource-query Piglit test.

Fixes rest of the failures with
   ES31-CTS.program_interface_query.no-locations

v2: make additional check only for GS inputs
v3: create helper function for resource name length
    so that it gets calculated only in one place

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