From 7a06c026ad24b74048f6d125383faf25deb1dfbb Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Thu, 20 Sep 2007 10:07:10 -0400 Subject: Fix failover state binding and convert the sampler to use the new state constant state object semantics. --- src/mesa/pipe/i915simple/i915_state.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/mesa/pipe/i915simple/i915_state.c') diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index be549ed6fd..0fb41e17ab 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -142,32 +142,27 @@ static void i915_set_blend_color( struct pipe_context *pipe, i915->dirty |= I915_NEW_BLEND; } -static const struct pipe_sampler_state * +static void * i915_create_sampler_state(struct pipe_context *pipe, const struct pipe_sampler_state *sampler) { - struct pipe_sampler_state *new_sampler = malloc(sizeof(struct pipe_sampler_state)); - memcpy(new_sampler, sampler, sizeof(struct pipe_sampler_state)); - - return new_sampler; + return 0; } static void i915_bind_sampler_state(struct pipe_context *pipe, - unsigned unit, - const struct pipe_sampler_state *sampler) + unsigned unit, void *sampler) { struct i915_context *i915 = i915_context(pipe); assert(unit < PIPE_MAX_SAMPLERS); - i915->sampler[unit] = sampler; + i915->sampler[unit] = (const struct pipe_sampler_state *)sampler; i915->dirty |= I915_NEW_SAMPLER; } static void i915_delete_sampler_state(struct pipe_context *pipe, - const struct pipe_sampler_state *sampler) + void *sampler) { - free((struct pipe_sampler_state*)sampler); } -- cgit v1.2.3