From 883c7ba716439ec71f515b2b8424059b0fdb6beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 12 Sep 2011 12:46:45 +0200 Subject: [PATCH] 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 --- src/mesa/state_tracker/st_extensions.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 0ad9e12..722db8d 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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; -- 1.7.4.1