summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-06-18 15:59:13 -0700
committerEric Anholt <[email protected]>2012-06-21 10:58:10 -0700
commitd103fead197c684c8396183d81bb846213afe81a (patch)
tree6ec43545f7c7e6b0fa106ad143f377ab3342be02 /src/mesa/main/get.c
parentfb76ddc13384bc04ee093c8fc20eab5705067359 (diff)
mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.
Fixes piglit ARB_uniform_buffer_object/getintegeri_v. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c24
1 files changed, 24 insertions, 0 deletions
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: