summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-06-04 09:51:15 -0700
committerBrian Paul <[email protected]>2013-06-04 13:29:38 -0600
commitf270baf074d1526beb49d0fbc2175cf02344a5b9 (patch)
treecdf5415550cfb8f98af30b88100c349e854a54dc /src/mesa/state_tracker/st_extensions.c
parent2fd785d12602103a1c05fd52903bdb4ffefadaad (diff)
mesa: change MAX_PROGRAM_ADDRESS_REGS to 1, clamp to it in state tracker
We've never properly supported more than one address register. There isn't even a field in prog_src_register or prog_dst_register to indicate which address register to use if RelAddr!=0. In the state tracker, clamp MaxAddressRegs against MAX_PROGRAM_ADDRESS_REGS since many gallium drivers do support more. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65226 Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c3
1 files changed, 2 insertions, 1 deletions
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);