From: Eric Anholt Date: Mon, 18 Jun 2012 22:59:13 +0000 (-0700) Subject: mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d103fead197c684c8396183d81bb846213afe81a;p=mesa.git mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object. Fixes piglit ARB_uniform_buffer_object/getintegeri_v. Reviewed-by: Brian Paul Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 9e9ddcbcc43..67732521c53 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -2566,6 +2566,30 @@ find_value_indexed(const char *func, GLenum pname, int index, union value *v) goto invalid_enum; v->value_int = ctx->TransformFeedback.CurrentObject->BufferNames[index]; return TYPE_INT; + + case GL_UNIFORM_BUFFER_BINDING: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].BufferObject->Name; + return TYPE_INT; + + case GL_UNIFORM_BUFFER_START: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].Offset; + return TYPE_INT; + + case GL_UNIFORM_BUFFER_SIZE: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].Size; + return TYPE_INT; } invalid_enum: