summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-06-14 09:55:26 -0700
committerEric Anholt <[email protected]>2012-06-21 10:57:51 -0700
commit5426b1ade9c97497bdf5ecd7c44701a6d5ef04dc (patch)
tree23b7bbc964914cdaaa988a7615841a238b32e19e /src/mesa/main/context.c
parent3e17d38457005dde81af78159bb1d543f3231d78 (diff)
mesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.
Fixes piglit GL_ARB_uniform_buffer_object/minmax. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3bcedecd9ba..643476b941d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -542,6 +542,9 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MediumInt.RangeMax = 24;
prog->MediumInt.Precision = 0;
prog->LowInt = prog->HighInt = prog->MediumInt;
+
+ prog->MaxUniformBlocks = 12;
+ prog->MaxCombinedUniformComponents = prog->MaxUniformComponents;
}
@@ -653,6 +656,12 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
+ /** GL_ARB_uniform_buffer_object */
+ ctx->Const.MaxCombinedUniformBlocks = 36;
+ ctx->Const.MaxUniformBufferBindings = 36;
+ ctx->Const.MaxUniformBlockSize = 16384;
+ ctx->Const.UniformBufferOffsetAlignment = 1;
+
/* GL 3.2: hard-coded for now: */
ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;