summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2014-05-05 07:55:34 +0300
committerTapani Pälli <[email protected]>2014-06-16 06:49:59 +0300
commitbfe42ddd99e8702e2daf14238966069fd25b6d0e (patch)
treeb82d5529f1d94787bdbd0f584fabcc4ac35b8e7d /src/mesa/main/context.c
parentd1a64aad16c27ca40b3568b38156f6cced98f2fb (diff)
mesa: add new enum MAX_UNIFORM_LOCATIONS
Patch adds new implementation dependent value required by the GL_ARB_explicit_uniform_location extension. Default value for user assignable locations is calculated as sum of MaxUniformComponents for each stage. v2: fix descriptor in get_hash_params.py (Petri) v3: simpler formula for calculating initial value (Ian) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8eb426d5904..f350788500c 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -610,6 +610,10 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxUniformBlockSize = 16384;
ctx->Const.UniformBufferOffsetAlignment = 1;
+ /* GL_ARB_explicit_uniform_location, GL_MAX_UNIFORM_LOCATIONS */
+ ctx->Const.MaxUserAssignableUniformLocations =
+ 4 * MESA_SHADER_STAGES * MAX_UNIFORMS;
+
for (i = 0; i < MESA_SHADER_STAGES; i++)
init_program_limits(ctx, i, &ctx->Const.Program[i]);