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/gallium/drivers/cell/ppu/cell_screen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/cell') diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c index a98529dc777..14a6173ff35 100644 --- a/src/gallium/drivers/cell/ppu/cell_screen.c +++ b/src/gallium/drivers/cell/ppu/cell_screen.c @@ -58,8 +58,6 @@ static int cell_get_param(struct pipe_screen *screen, enum pipe_cap param) { switch (param) { - case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS: - return CELL_MAX_SAMPLERS; case PIPE_CAP_MAX_COMBINED_SAMPLERS: return CELL_MAX_SAMPLERS; case PIPE_CAP_NPOT_TEXTURES: @@ -107,7 +105,12 @@ cell_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha switch(shader) { case PIPE_SHADER_FRAGMENT: - return tgsi_exec_get_shader_param(param); + switch (param) { + case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + return CELL_MAX_SAMPLERS; + default: + return tgsi_exec_get_shader_param(param); + } case PIPE_SHADER_VERTEX: case PIPE_SHADER_GEOMETRY: return draw_get_shader_param(shader, param); -- cgit v1.2.3