st/mesa: clamp Max program param limits

Setting just MAX_PROGRAM_ENV_PARAMS to 4096 breaks everything,
so let's do this instead.

This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=40767

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák 2011-09-12 12:46:45 +02:00
parent 4682e70601
commit f37a5081b2

View File

@ -176,8 +176,8 @@ void st_init_limits(struct st_context *st)
/* Gallium doesn't really care about local vs. env parameters so use the
* same limits.
*/
pc->MaxLocalParams = pc->MaxParameters;
pc->MaxEnvParams = pc->MaxParameters;
pc->MaxLocalParams = MIN2(pc->MaxParameters, MAX_PROGRAM_LOCAL_PARAMS);
pc->MaxEnvParams = MIN2(pc->MaxParameters, MAX_PROGRAM_ENV_PARAMS);
options->EmitNoNoise = TRUE;