diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/config.h | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 4a4fdc98c1d..4855cc0dde6 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -187,7 +187,7 @@ #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 #define MAX_PROGRAM_TEMPS 256 -#define MAX_PROGRAM_ADDRESS_REGS 2 +#define MAX_PROGRAM_ADDRESS_REGS 1 #define MAX_VARYING 32 /**< number of float[4] vectors */ #define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS #define MAX_PROGRAM_INPUTS 32 diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 46acc876378..ddae9563955 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -187,7 +187,8 @@ void st_init_limits(struct st_context *st) pc->MaxTemps = pc->MaxNativeTemps = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS); pc->MaxAddressRegs = pc->MaxNativeAddressRegs = - screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS); + _min(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS), + MAX_PROGRAM_ADDRESS_REGS); pc->MaxParameters = pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS); |