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>
/* 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;