Hello; Here's the implementation of ARB_program_interface_query extension. Patches add a resource list as part of gl_shader_program which contains all different resources. List is then used to implement extension functions as well as following existing queries:
GetActiveAttrib GetAttribLocation GetUniformLocation GetActiveUniformName GetUniformIndices GetActiveUniform GetActiveUniformsiv GetUniformBlockIndex GetActiveUniformBlockName GetActiveUniformBlockiv GetActiveAtomicCounterBufferiv GetTransformFeedbackVarying GetFragDataLocation GetFragDataIndex No Piglit regressions with these changes. There are only 2 new tests ATM for the extension but most (if not all) functionality is tested by tests for the functions above. Martin Peres and I will also implement further tests for the actual extension functions. Extension specification: https://www.opengl.org/registry/specs/ARB/program_interface_query.txt Git branch with all the patches: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=piq Tapani Pälli (23): glapi: add GL_ARB_program_interface_query skeleton mesa/glsl: build list of program resources during linking mesa: glGetProgramInterfaceiv mesa: glGetProgramResourceIndex mesa: glGetProgramResourceName mesa: glGetProgramResourceLocation mesa: glGetProgramResourceLocationIndex mesa: implementation of glGetProgramResourceiv mesa: enable GL_ARB_program_interface_query extension mesa: refactor GetActiveAttrib mesa: refactor GetAttribLocation mesa: refactor GetFragDataLocation mesa: refactor GetFragDataIndex mesa: mesa_bufferiv utility function for buffer objects mesa: refactor GetActiveUniformsiv, use _mesa_program_resource_prop mesa: refactor GetTransformFeedbackVarying mesa: refactor GetActiveUniform mesa: refactor GetActiveUniformName mesa: remove unused _mesa_get_uniform_name mesa: refactor GetActiveUniformBlockName mesa: refactor GetUniformLocation mesa: refactor GetUniformIndices mesa: refactor GetUniformBlockIndex docs/GL3.txt | 4 +- src/glsl/linker.cpp | 175 +++++ src/mapi/glapi/gen/ARB_program_interface_query.xml | 109 ++++ src/mapi/glapi/gen/gl_API.xml | 2 + src/mapi/glapi/gen/gl_genexec.py | 1 + src/mesa/Makefile.sources | 2 + src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 15 + src/mesa/main/program_resource.c | 383 +++++++++++ src/mesa/main/program_resource.h | 58 ++ src/mesa/main/shader_query.cpp | 721 ++++++++++++++++++--- src/mesa/main/shaderapi.h | 45 ++ src/mesa/main/shaderobj.c | 6 + src/mesa/main/tests/dispatch_sanity.cpp | 12 +- src/mesa/main/transformfeedback.c | 19 +- src/mesa/main/uniform_query.cpp | 136 ++-- src/mesa/main/uniforms.c | 294 +++------ src/mesa/main/uniforms.h | 5 - 18 files changed, 1585 insertions(+), 403 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_program_interface_query.xml create mode 100644 src/mesa/main/program_resource.c create mode 100644 src/mesa/main/program_resource.h -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev