diff options
author | Tapani Pälli <[email protected]> | 2015-03-10 13:11:14 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2015-04-16 07:55:57 +0300 |
commit | 2ab8de2181988870a95de23aeb906df5678e1e90 (patch) | |
tree | 277c48bd24233d7fc96123ded05d6d4b21b0a65a /src/mesa/main/shaderapi.h | |
parent | 9367ade331e5d0a7724c595e7afb0322caaaddf7 (diff) |
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 <[email protected]>
Reviewed-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.h')
-rw-r--r-- | src/mesa/main/shaderapi.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index 50460185c33..0cd2fad5d18 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -252,6 +252,18 @@ extern GLint _mesa_program_resource_location_index(struct gl_shader_program *shProg, GLenum interface, const char *name); +extern unsigned +_mesa_program_resource_prop(struct gl_shader_program *shProg, + struct gl_program_resource *res, GLuint index, + const GLenum prop, GLint *val, const char *caller); + +extern void +_mesa_get_program_resourceiv(struct gl_shader_program *shProg, + GLenum interface, GLuint index, + GLsizei propCount, const GLenum *props, + GLsizei bufSize, GLsizei *length, + GLint *params); + #ifdef __cplusplus } #endif |