From f5bfe54a34d9c8cd5de2b096d0e8486fe0d990a7 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 27 Sep 2011 22:22:06 +0200 Subject: gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_extensions.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 27fff39a8b6..2be191cc10e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -90,11 +90,13 @@ void st_init_limits(struct st_context *st) = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS); c->MaxTextureImageUnits - = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS), + = _min(screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, + PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS), MAX_TEXTURE_IMAGE_UNITS); c->MaxVertexTextureImageUnits - = _min(screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS), + = _min(screen->get_shader_param(screen, PIPE_SHADER_VERTEX, + PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS), MAX_VERTEX_TEXTURE_IMAGE_UNITS); c->MaxCombinedTextureImageUnits -- cgit v1.2.3