summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add subroutine index qualifier supportTimothy Arceri2015-11-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | ARB_explicit_uniform_location allows the index for subroutine functions to be explicitly set in the shader. This patch reduces the restriction on the index qualifier in validate_layout_qualifiers() to allow it to be applied to subroutines and adds the new subroutine qualifier validation to ast_function::hir(). ast_fully_specified_type::has_qualifiers() is updated to allow the index qualifier on subroutine functions when explicit uniform locations is available. A new check is added to ast_type_qualifier::merge_qualifier() to stop multiple function qualifiers from being defied, before this patch this would cause a segfault. Finally a new variable is added to ir_function_signature to store the index. This value is validated and the non explicit values assigned in link_assign_subroutine_types(). Reviewed-by: Tapani Pälli <[email protected]>
* mesa: do runtime validation of precision varyings only on ESTapani Pälli2015-11-171-3/+13
| | | | | | | | | Precision qualifier should be ignored on desktop OpenGL. v2: include spec quote (Samuel) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: validate precision of varyings during ValidateProgramPipelineTapani Pälli2015-11-121-0/+62
| | | | | | | | | | | Fixes following failing ES3.1 CTS tests: ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingFloat ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingInt ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingUInt Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: rename UniformBlockStageIndex to InterfaceBlockStageIndexJordan Justen2015-11-031-1/+1
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]> Cc: Samuel Iglesias Gonsálvez <[email protected]> Cc: Iago Toral <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Juha-Pekka Heikkila <[email protected]>
* mesa: fix program resource queries for atomic counter buffersTapani Pälli2015-11-021-2/+26
| | | | | | | | | | | | | | gl_active_atomic_buffer contains index to UniformStorage, we need to calculate resource index for that gl_uniform_storage. Fixes following CTS tests: ES31-CTS.program_interface_query.atomic-counters ES31-CTS.program_interface_query.atomic-counters-one-buffer No Piglit regressions. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]>
* main: fix basename match's check if it's an array or structSamuel Iglesias Gonsalvez2015-10-301-1/+2
| | | | | | | | | | | | | | | | | | Commit 4565b6f did not update the basename match's check for the case that string would exactly match the name of the variable if the suffix "[0]" were appended to it. Fixes two dEQP-GLES31 tests: dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array_single_element v2: - Change the position of rname_has_array_index_zero to avoid an out-of-bounds read. Reported by Tapani Pälli. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* main: Remove interface block array index for doing the name comparisonSamuel Iglesias Gonsalvez2015-10-271-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From ARB_program_query_interface spec: "uint GetProgramResourceIndex(uint program, enum programInterface, const char *name); [...] If <name> exactly matches the name string of one of the active resources for <programInterface>, the index of the matched resource is returned. Additionally, if <name> would exactly match the name string of an active resource if "[0]" were appended to <name>, the index of the matched resource is returned. [...]" "A string provided to GetProgramResourceLocation or GetProgramResourceLocationIndex is considered to match an active variable if: [...] * if the string identifies the base name of an active array, where the string would exactly match the name of the variable if the suffix "[0]" were appended to the string; [...] " Fixes the following two dEQP-GLES31 tests: dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array_single_element v2: - Add AoA support (Timothy) - Apply it too for GetUniformLocation(), GetUniformName() and others because ARB_program_interface_query says that they are equivalent to GetProgramResourceLocation() and GetProgramResourceName() (Tapani) Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: add additional checks for uniform location queryTapani Pälli2015-10-261-0/+8
| | | | | | | | | | | | | | | | Patch adds additional check to make sure we don't return locations for structures or arrays of structures. From page 79 of the OpenGL 4.2 spec: "A valid name cannot be a structure, an array of structures, or any portion of a single vector or a matrix." v2: use without-array() to simplify code (Timothy) No Piglit or CTS regressions observed. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl: calculate TOP_LEVEL_ARRAY_SIZE and STRIDE when adding resourcesTapani Pälli2015-10-141-242/+2
| | | | | | | | | | Patch moves existing calculation code from shader_query.cpp to happen during program resource list creation. No Piglit or CTS regressions were observed during testing. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: Rename {Num}UniformBlocks to {Num}BufferInterfaceBlocksIago Toral Quiroga2015-10-141-2/+2
| | | | | | | | | | | | | | Currently, these arrays in gl_shader and gl_shader_program hold both UBOs and SSBOs, so this looks like a better name. We were already using NumBufferInterfaceBlocks in gl_shader_program, so this makes things more consistent as well. In a later patch we will add {Num}UniformBlocks and {Num}ShaderStorageBlocks which will contain only references to UBOs and SSBOs respectively that will provide backends with a separate index space for both types of objects. Reviewed-by: Kristian Høgsberg <[email protected]>
* main: fix length of values written to glGetProgramResourceiv() for ↵Samuel Iglesias Gonsalvez2015-10-091-4/+10
| | | | | | | | | | ACTIVE_VARIABLES Return the number of values written. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main: buffer array variables can have array size of 0 if they are unsizedSamuel Iglesias Gonsalvez2015-10-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | From ARB_program_query_interface: For the property ARRAY_SIZE, a single integer identifying the number of active array elements of an active variable is written to <params>. The array size returned is in units of the type associated with the property TYPE. For active variables not corresponding to an array of basic types, the value one is written to <params>. If the variable is a shader storage block member in an array with no declared size, the value zero is written to <params>. v2: - Unsized arrays of arrays have an array size different than zero v3: - Arrays and unsized arrays will have an array_stride > 0. Use it instead of is_unsized_array flag (Timothy). Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main: consider that unsized arrays have at least one active elementSamuel Iglesias Gonsalvez2015-10-091-1/+7
| | | | | | | | | | | | | | | | | | | | | From ARB_shader_storage_buffer_object: "When using the ARB_program_interface_query extension to enumerate the set of active buffer variables, only the first element of arrays (sized or unsized) will be enumerated" _mesa_program_resource_array_size() is used when getting the name (and name length) of the active variables. When it is an unsized array, we want to indicate it has one active element so the returned name would have "[0]" at the end. v2: - Use array_stride > 0 and array_elements == 0 to detect unsized arrays. Because of that, we don't need is_unsized_array flag (Timothy) Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main: fix TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDESamuel Iglesias Gonsalvez2015-10-091-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the active variable is an array which is already a top-level shader storage block member, don't return its array size and stride when querying TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE respectively. Fixes the following 12 dEQP-GLES31 tests: dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat3x4 dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat3x4 v2: - Fix check when the shader storage block is instanced - Write auxiliary function to do the check. v3: - Check if full_instanced_name is NULL just after allocation (Ilia) - Remove () from one strcmp() in the if statement (Ilia) Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* main: fix goto in program_resource_top_level_array_strideSamuel Iglesias Gonsalvez2015-10-091-2/+2
| | | | | | | | Use found_top_level_array_stride instead of found_top_level_array_size. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* main: array stride for unsized arrays of arrays are calculated like recordsSamuel Iglesias Gonsalvez2015-10-061-1/+1
| | | | | Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main: Fix block index when mixing UBO and SSBO blocksIago Toral Quiroga2015-10-011-3/+2
| | | | | | | | | | | Since we store both in UniformBlocks, we can't just compute the index by subtracting the array address start, we need to count the number of buffers of the approriate type. v2: - Just fall back to calc_resource_index (Tapani) Reviewed-by: Tapani Pälli <[email protected]>
* mesa: clean up the #includes in shader_query.cppBrian Paul2015-09-291-7/+7
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove an extern "C" wrapper in shader_query.cppBrian Paul2015-09-291-3/+1
| | | | | | The shaderapi.h header already has the extern "C" wrapper. Reviewed-by: Matt Turner <[email protected]>
* mesa: fix ARRAY_SIZE query for GetProgramResourceivTapani Pälli2015-09-291-38/+56
| | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* util: implement strndup for WIN32Samuel Iglesias Gonsalvez2015-09-291-0/+1
| | | | | | | | | | | v2: - Add strndup.h to Makefile.sources (Emil) - Use calloc instead of malloc (Emil). - Check if allocation fails (Emil, Jose) - Add '#pragma once' and include stdlib.h to strndup.h (Jose) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't leak interface_nameIlia Mirkin2015-09-281-0/+1
| | | | | | | Found by Coverity Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main: Add SHADER_STORAGE_BLOCK and BUFFER_VARIABLE support for ↵Samuel Iglesias Gonsalvez2015-09-251-7/+258
| | | | | | | | | | | | | ARB_program_interface_query Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries. v2: - Use std430_array_stride() to get top level array stride following std430's rules. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: fix name returned for XFB varyingsTapani Pälli2015-08-131-4/+16
| | | | | | | | | | | | | | | _mesa_get_program_resource_name has logic to append '[0]' in name if variable is an array, this should be skipped for XFB varyings that have array index already appended. v2: fix comment, change also GL_NAME_LENGTH query to match the behaviour Fixes: ES31-CTS.program_interface_query.transform-feedback-types Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: fix type for array indexing validationTimothy Arceri2015-08-031-1/+1
| | | | | | | | | | | | | parse_program_resource_name returns -1 when the index is invalid this needs to be tested before assigning the value to the unsigned array_index. In link_varyings.cpp (the other place parse_program_resource_name is used) after the -1 check is done the value is just assigned to an unsigned variable so it seems long is just used so we can return the -1 rather than actually expecting index values to be ridiculously large. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: remove now unused subscript validationsTimothy Arceri2015-07-301-57/+0
| | | | | Cc: Tapani Pälli <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: fix and simplify resource query for arraysTimothy Arceri2015-07-301-80/+94
| | | | | | | | | | | | | | | | | | | | | | This removes the need for multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once and the index is retrived at the same time, as a result the getUniformLocation code can be simplified saving an extra hash table lookup (and yet another validation call). This chage also fixes some tests in: ES31-CTS.program_interface_query.uniform V3: rebase on subroutines, and move the resource index array == 0 check into _mesa_GetProgramResourceIndex() to simplify things further V2: Fix bounds checks for program input/output, split unrelated comment fix and _mesa_get_uniform_location() removal into their own patch. Cc: Tapani Pälli <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* program_resource: add subroutine support (v3.1)Dave Airlie2015-07-231-0/+101
| | | | | | | | | | | | | | This fleshes out the ARB_program_query support for the APIs that ARB_shader_subroutine introduces, leaving some TODOs for later addition. v2: reworked for lots of the ARB_program_interface_query entry points and tests v3: use common function to test for subroutine support v3.1: add tess, fix missing breaks Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: implement GL_IS_PER_PATCHMarek Olšák2015-07-231-2/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add program interface queries for tessellation shadersMarek Olšák2015-07-231-2/+6
| | | | | | Based on a patch by Chris Forbes <[email protected]>. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix misleading commentTimothy Arceri2015-07-221-2/+0
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-7/+7
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix program resource queries for builtin variablesTapani2015-06-051-1/+24
| | | | | | | | | | | | | Patch fixes special cases with gl_VertexID and sets all builtin variables locations as '-1' as specified by the extension spec. Fixes ES 3.1 conformance test failure: ES31-CTS.program_interface_query.input-built-in v2: comments + use is_gl_identifier() (Martin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: use _mesa_has_compute_shaders instead of extension checkTapani Pälli2015-05-111-1/+3
| | | | | | | | | | | This was really the original purpose, for enabling the path for ES3.1 tests without the extension being set. Set also fallthrough comment for Coverity (caught by Matt). v2: .. and test the right way, not wrong one (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: support compute stage in _mesa_program_resource_propTapani Pälli2015-05-061-6/+16
| | | | | | | | | | Increases pass rate of ES31-CTS.*program_interface_query* tests when run with MESA_EXTENSION_OVERRIDE='GL_ARB_compute_shader'. Many of the negative tests that happen to use compute stage in queries start passing. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).Jose Fonseca2015-04-291-2/+4
| | | | | | | | | | | | It's returning random values, because RESOURCE_VAR() is casting different objects into ir_variable pointers. This updates _mesa_count_active_attribs to filter the resources with the same logic used in _mesa_longest_attribute_name_length. https://bugs.freedesktop.org/show_bug.cgi?id=90207 Reviewed-by: Tapani Pälli <[email protected]>
* mesa: refactor active attrib queries for glGetProgramivTapani Pälli2015-04-241-25/+14
| | | | | | | | | | | | | | | Main motivation here is to get rid of iterating IR and encapsulate queries within program resources. No functional changes. Piglit tests calling the modified functionality: - gl-get-active-attrib-returns-all-inputs - glsl-1.50-get-active-attrib-array - getactiveattrib Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* main: silence missing return value warning in array_index_of_resource()Brian Paul2015-04-221-0/+1
| | | | | | v2: return -1 instead of 0, per Emil Velikov. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add missing break in switch statementTapani Pälli2015-04-211-1/+1
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-By: Martin Peres <[email protected]>
* mesa: fix UBO queries for active uniformsTapani Pälli2015-04-211-1/+11
| | | | | | | | | | | | | | | Commit 34df5eb introduced regression to GetActiveUniformBlockiv when querying one of the following properties: GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES Implementation counted all uniforms in ubo directly while query should check first if the uniform in question is _active_. Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90109 Reviewed-By: Martin Peres <[email protected]>
* mesa,glsl: rename `interface` to `programInterface`.Jose Fonseca2015-04-161-15/+15
| | | | | | | | | | | | | | | | | `interface` is a define on Windows -- an alias for `struct` keyword, used when declaring COM interfaces in C or C++. So use instead `programInterface`, therefore matching the name used in GL_ARB_program_interface_query spec/headers, which was renamed exactly for the same reason: "Revision 10, May 10, 2012 (pbrown) - Rename the formal parameter <interface> used by the functions in this extension to <programInterface>. Certain versions of the Microsoft C/C++ compiler and/or its headers cause "interface" to be treated as a reserved keyword." Trivial.
* mesa: mesa_bufferiv utility function for buffer objectsTapani Pälli2015-04-161-5/+5
| | | | | | | | | | | | | | | Patch adds new function 'mesa_bufferiv' and refactors existing GetActiveUniformBlockiv and GetActiveAtomicCounterBufferiv to use it. corresponding Piglit tests: arb_uniform_buffer_object* arb_shader_atomic_counters* (Many tests hit the corresponding queries.) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: refactor GetFragDataIndexTapani Pälli2015-04-161-23/+2
| | | | | | | | Use _mesa_program_resource_location_index to fetch index. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: refactor GetFragDataLocationTapani Pälli2015-04-161-22/+16
| | | | | | | Use program_resource_location to fetch location. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: refactor GetAttribLocationTapani Pälli2015-04-161-22/+20
| | | | | | | Use program_resource_location to fetch location. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: refactor GetActiveAttribTapani Pälli2015-04-161-31/+27
| | | | | | | | Instead of iterating IR, retrieve required information through the new program resource functions. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: implementation of glGetProgramResourceivTapani Pälli2015-04-161-0/+266
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: glGetProgramResourceLocationIndexTapani Pälli2015-04-161-0/+18
| | | | | | | | | | | | | | | | Patch adds required helper functions to shaderapi.h and the actual implementation. The added functionality can be tested by tests for following functions that are refactored by later patches: GetFragDataIndex v2: return -1 if output not referenced by fragment stage (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: glGetProgramResourceLocationTapani Pälli2015-04-161-0/+67
| | | | | | | | | | | | | | | | | | | | | Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-resource-location The added functionality can be tested by tests for following functions that are refactored by later patches: GetAttribLocation GetUniformLocation GetFragDataLocation v2: code cleanup, changes to array element syntax checking (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: glGetProgramResourceNameTapani Pälli2015-04-161-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Martin Peres <[email protected]>