From c3af68dc5022715cc8f126b7df12f3f5248aefe7 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 11 Dec 2007 14:39:37 +0000 Subject: gallium: remove set_sampler_units interface The effect of this mapping can be acheived by the state tracker and setting up the pipe texture state pointers to incorporate its affects. --- src/mesa/pipe/cell/ppu/cell_context.c | 1 - src/mesa/pipe/cell/ppu/cell_context.h | 1 - src/mesa/pipe/cell/ppu/cell_state.h | 3 --- src/mesa/pipe/cell/ppu/cell_state_sampler.c | 20 +++++--------------- 4 files changed, 5 insertions(+), 20 deletions(-) (limited to 'src/mesa/pipe/cell/ppu') diff --git a/src/mesa/pipe/cell/ppu/cell_context.c b/src/mesa/pipe/cell/ppu/cell_context.c index 68543ecf30..5534d82ccf 100644 --- a/src/mesa/pipe/cell/ppu/cell_context.c +++ b/src/mesa/pipe/cell/ppu/cell_context.c @@ -217,7 +217,6 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws) cell->pipe.set_framebuffer_state = cell_set_framebuffer_state; cell->pipe.set_polygon_stipple = cell_set_polygon_stipple; - cell->pipe.set_sampler_units = cell_set_sampler_units; cell->pipe.set_scissor_state = cell_set_scissor_state; cell->pipe.set_texture_state = cell_set_texture_state; cell->pipe.set_viewport_state = cell_set_viewport_state; diff --git a/src/mesa/pipe/cell/ppu/cell_context.h b/src/mesa/pipe/cell/ppu/cell_context.h index a64692081d..12073b93a0 100644 --- a/src/mesa/pipe/cell/ppu/cell_context.h +++ b/src/mesa/pipe/cell/ppu/cell_context.h @@ -58,7 +58,6 @@ struct cell_context struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX]; struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX]; - uint sampler_units[PIPE_MAX_SAMPLERS]; uint dirty; /** The primitive drawing context */ diff --git a/src/mesa/pipe/cell/ppu/cell_state.h b/src/mesa/pipe/cell/ppu/cell_state.h index 033767d29b..4bad45950b 100644 --- a/src/mesa/pipe/cell/ppu/cell_state.h +++ b/src/mesa/pipe/cell/ppu/cell_state.h @@ -93,9 +93,6 @@ void cell_set_constant_buffer(struct pipe_context *pipe, void cell_set_polygon_stipple( struct pipe_context *, const struct pipe_poly_stipple * ); -void cell_set_sampler_units( struct pipe_context *, - uint numSamplers, const uint *units ); - void cell_set_scissor_state( struct pipe_context *, const struct pipe_scissor_state * ); diff --git a/src/mesa/pipe/cell/ppu/cell_state_sampler.c b/src/mesa/pipe/cell/ppu/cell_state_sampler.c index c2a180ed30..495567b16c 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_sampler.c +++ b/src/mesa/pipe/cell/ppu/cell_state_sampler.c @@ -69,32 +69,22 @@ cell_delete_sampler_state(struct pipe_context *pipe, void -cell_set_texture_state(struct pipe_context *pipe, - unsigned unit, - struct pipe_texture *texture) +cell_set_sampler_texture(struct pipe_context *pipe, + unsigned sampler, + struct pipe_texture *texture) { struct cell_context *cell = cell_context(pipe); assert(unit < PIPE_MAX_SAMPLERS); #if 0 - cell->texture[unit] = cell_texture(texture); /* ptr, not struct */ - cell_tile_cache_set_texture(cell->tex_cache[unit], texture); + cell->texture[sampler] = cell_texture(texture); /* ptr, not struct */ + cell_tile_cache_set_texture(cell->tex_cache[sampler], texture); #endif cell->dirty |= CELL_NEW_TEXTURE; } -void -cell_set_sampler_units(struct pipe_context *pipe, - uint num_samplers, const uint *units ) -{ - struct cell_context *cell = cell_context(pipe); - uint i; - for (i = 0; i < num_samplers; i++) - cell->sampler_units[i] = units[i]; - cell->dirty |= CELL_NEW_SAMPLER; -} -- cgit v1.2.3