diff options
author | marha <marha@users.sourceforge.net> | 2012-08-01 08:04:11 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-01 08:04:11 +0200 |
commit | 949282a6e80256ab56a1e95e484886873c7c0e4a (patch) | |
tree | d1102c4b3abd9dc93a2bf8808e498d10ba095390 /mesalib/src/mesa/main/shaderapi.c | |
parent | 83da3ad0287bc51cd16ee6911fe73dc98ebe000b (diff) | |
parent | 49838240b7d4cff1ffed1bd91e495f6919061f90 (diff) | |
download | vcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.tar.gz vcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.tar.bz2 vcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r-- | mesalib/src/mesa/main/shaderapi.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 7c97a6359..caeb9657e 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -544,6 +544,35 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param *params = shProg->Geom.OutputType; break; #endif + case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: { + unsigned i; + GLint max_len = 0; + + if (!ctx->Extensions.ARB_uniform_buffer_object) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); + return; + } + + for (i = 0; i < shProg->NumUniformBlocks; i++) { + /* Add one for the terminating NUL character. + */ + const GLint len = strlen(shProg->UniformBlocks[i].Name) + 1; + + if (len > max_len) + max_len = len; + } + + *params = max_len; + break; + } + case GL_ACTIVE_UNIFORM_BLOCKS: + if (!ctx->Extensions.ARB_uniform_buffer_object) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); + return; + } + + *params = shProg->NumUniformBlocks; + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); return; |