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/nvfx/nvfx_screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/nvfx') diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index 49bd9323137..50f346700d8 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -27,8 +27,6 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) struct nvfx_screen *screen = nvfx_screen(pscreen); switch (param) { - case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS: - return 16; case PIPE_CAP_NPOT_TEXTURES: return screen->advertise_npot; case PIPE_CAP_TWO_SIDED_STENCIL: @@ -60,8 +58,6 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 13; case PIPE_CAP_TEXTURE_MIRROR_CLAMP: return !!screen->use_nv4x; - case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS: - return 0; /* We have 4 on nv40 - but unsupported currently */ case PIPE_CAP_BLEND_EQUATION_SEPARATE: return screen->advertise_blend_equation_separate; case PIPE_CAP_MAX_COMBINED_SAMPLERS: @@ -137,6 +133,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum return 0; case PIPE_SHADER_CAP_SUBROUTINES: return screen->use_nv4x ? 1 : 0; + case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + return 16; default: break; } @@ -179,6 +177,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum return 1; case PIPE_SHADER_CAP_INTEGERS: return 0; + case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + return 0; /* We have 4 on nv40 - but unsupported currently */ default: break; } -- cgit v1.2.3