st/mesa: set MaxUniformComponents
authorMarek Olšák <maraeo@gmail.com>
Sun, 21 Nov 2010 21:02:02 +0000 (22:02 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 22 Nov 2010 20:44:35 +0000 (21:44 +0100)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_extensions.c

index 8c3fa0eef45fc18c4013f633f62a17c373768a8f..e72caa3842c078dc765044ae25266412f1dd7a2c 100644 (file)
@@ -164,6 +164,7 @@ void st_init_limits(struct st_context *st)
       pc->MaxNativeTemps           = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_TEMPS);
       pc->MaxNativeAddressRegs     = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_ADDRS);
       pc->MaxNativeParameters      = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONSTS);
+      pc->MaxUniformComponents     = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
 
       options->EmitNoNoise = TRUE;