glsl/standalone: initialize MaxUserAssignableUniformLocations
authorRob Clark <robclark@freedesktop.org>
Fri, 24 Jun 2016 19:11:02 +0000 (15:11 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 2 Jul 2016 13:00:19 +0000 (09:00 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/compiler/glsl/standalone.cpp

index 760fe8f01b53bb51f3f3d4859c6bbfedb78cbcd2..88fe5fde09611a6c8ee0d694522be198ce50c225 100644 (file)
@@ -222,6 +222,10 @@ initialize_context(struct gl_context *ctx, gl_api api)
    ctx->Const.GenerateTemporaryNames = true;
    ctx->Const.MaxPatchVertices = 32;
 
+   /* GL_ARB_explicit_uniform_location, GL_MAX_UNIFORM_LOCATIONS */
+   ctx->Const.MaxUserAssignableUniformLocations =
+      4 * MESA_SHADER_STAGES * MAX_UNIFORMS;
+
    ctx->Driver.NewShader = _mesa_new_linked_shader;
 }