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/i915simple/i915_context.h | 1 - src/mesa/pipe/i915simple/i915_state.c | 19 +++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'src/mesa/pipe/i915simple') diff --git a/src/mesa/pipe/i915simple/i915_context.h b/src/mesa/pipe/i915simple/i915_context.h index a239c8f72e..80df7f0fba 100644 --- a/src/mesa/pipe/i915simple/i915_context.h +++ b/src/mesa/pipe/i915simple/i915_context.h @@ -199,7 +199,6 @@ struct i915_context struct pipe_framebuffer_state framebuffer; struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissor; - uint sampler_units[PIPE_MAX_SAMPLERS]; struct i915_texture *texture[PIPE_MAX_SAMPLERS]; struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX]; diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index a8c6565a54..2a9a587a37 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -431,14 +431,6 @@ static void i915_set_polygon_stipple( struct pipe_context *pipe, { } -static void i915_set_sampler_units(struct pipe_context *pipe, - uint numSamplers, const uint *units) -{ - struct i915_context *i915 = i915_context(pipe); - uint i; - for (i = 0; i < numSamplers; i++) - i915->sampler_units[i] = units[i]; -} static void * i915_create_fs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) @@ -523,13 +515,13 @@ static void i915_set_constant_buffer(struct pipe_context *pipe, } -static void i915_set_texture_state(struct pipe_context *pipe, - unsigned unit, - struct pipe_texture *texture) +static void i915_set_sampler_texture(struct pipe_context *pipe, + unsigned sampler, + struct pipe_texture *texture) { struct i915_context *i915 = i915_context(pipe); - i915->texture[unit] = (struct i915_texture*)texture; /* ptr, not struct */ + i915->texture[sampler] = (struct i915_texture*)texture; /* ptr, not struct */ i915->dirty |= I915_NEW_TEXTURE; } @@ -714,9 +706,8 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.set_framebuffer_state = i915_set_framebuffer_state; i915->pipe.set_polygon_stipple = i915_set_polygon_stipple; - i915->pipe.set_sampler_units = i915_set_sampler_units; i915->pipe.set_scissor_state = i915_set_scissor_state; - i915->pipe.set_texture_state = i915_set_texture_state; + i915->pipe.set_sampler_texture = i915_set_sampler_texture; i915->pipe.set_viewport_state = i915_set_viewport_state; i915->pipe.set_vertex_buffer = i915_set_vertex_buffer; i915->pipe.set_vertex_element = i915_set_vertex_element; -- cgit v1.2.3