[Mesa-dev] [PATCH] mesa: Add support for glGetProgramiv pnames for UBOs.
Eric Anholt
eric at anholt.net
Thu Jul 26 10:02:32 PDT 2012
Brian Paul <brianp at vmware.com> writes:
> On 07/26/2012 10:24 AM, Eric Anholt wrote:
>> Fixes piglit ARB_uniform_buffer_object/getprogramiv.
>>
>> v2: Add extension checks.
>> ---
>>
>> Since there were only two cases, I didn't use goto on this patch.
>>
>> src/mesa/main/shaderapi.c | 29 +++++++++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
>> index 7c97a63..9926c08 100644
>> --- a/src/mesa/main/shaderapi.c
>> +++ b/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: {
>> + if (!ctx->Extensions.ARB_uniform_buffer_object) {
>> + _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)");
>> + return;
>> + }
>> +
>> + unsigned i;
>> + GLint max_len = 0;
>
> Declarations after code will blow up with MSVC.
Sigh. I've reordered them now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120726/8dfc7e17/attachment.pgp>
More information about the mesa-dev
mailing list