summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-07-24 20:32:08 +0200
committerMarek Olšák <[email protected]>2014-07-28 23:57:08 +0200
commit04f2c88f45e26d7050cc88aaaac8e8154d6018d0 (patch)
treef2c3713a675d01a3a44f90c01b69d44aecfdb7b5 /src/mesa/state_tracker
parentd5bcb5e8dea3dc949ff6b093af7f46585b94b63e (diff)
gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZE
This new name isn't so confusing. I also changed the gallivm limit, because it looked wrong. Reviewed-by: Brian Paul <[email protected]> v2: use sizeof(float[4])
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index aa59fbfa986..7ac484056de 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -146,7 +146,7 @@ void st_init_limits(struct st_context *st)
c->MaxUniformBlockSize =
screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
- PIPE_SHADER_CAP_MAX_CONSTS) * 16;
+ PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE);
if (c->MaxUniformBlockSize < 16384) {
can_ubo = FALSE;
}
@@ -194,7 +194,8 @@ void st_init_limits(struct st_context *st)
_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);
+ screen->get_shader_param(screen, sh,
+ PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) / sizeof(float[4]);
pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);