summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.h
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-03-10 10:33:20 +0200
committerTapani Pälli <tapani.palli@intel.com>2015-04-16 07:55:56 +0300
commit2a5a0d19d67b2ccd7eee33a6f3bead66cc2d78ff (patch)
treecb6e49fc1ab0eefa42dde2c8d4ad8286bb043110 /src/mesa/main/shaderapi.h
parent161f57f6103802de55d792bcc6a4370afa5c5173 (diff)
downloadexternal_mesa3d-2a5a0d19d67b2ccd7eee33a6f3bead66cc2d78ff.zip
external_mesa3d-2a5a0d19d67b2ccd7eee33a6f3bead66cc2d78ff.tar.gz
external_mesa3d-2a5a0d19d67b2ccd7eee33a6f3bead66cc2d78ff.tar.bz2
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>
Diffstat (limited to 'src/mesa/main/shaderapi.h')
-rw-r--r--src/mesa/main/shaderapi.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index d80252b..7a7e3e9 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -234,6 +234,16 @@ extern struct gl_program_resource *
_mesa_program_resource_find_name(struct gl_shader_program *shProg,
GLenum interface, const char *name);
+extern struct gl_program_resource *
+_mesa_program_resource_find_index(struct gl_shader_program *shProg,
+ GLenum interface, GLuint index);
+
+extern bool
+_mesa_get_program_resource_name(struct gl_shader_program *shProg,
+ GLenum interface, GLuint index,
+ GLsizei bufSize, GLsizei *length,
+ GLchar *name, const char *caller);
+
#ifdef __cplusplus
}
#endif