diff options
author | Zack Rusin <[email protected]> | 2007-09-17 09:47:41 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-09-18 06:31:22 -0400 |
commit | f117327a3f246713abfd4dc4320d4a1a7f1b811a (patch) | |
tree | 81c5c58c0ae0685c917996ad04f10003aa95cfa3 /src/mesa/pipe/failover | |
parent | e16c045b83f5c5b4f4064df67623bb76b46b6619 (diff) |
Make sampler an immutable state object.
Switch the sample to be an immutable state object.
Diffstat (limited to 'src/mesa/pipe/failover')
-rw-r--r-- | src/mesa/pipe/failover/fo_context.h | 2 | ||||
-rw-r--r-- | src/mesa/pipe/failover/fo_state.c | 8 | ||||
-rw-r--r-- | src/mesa/pipe/failover/fo_state_emit.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/pipe/failover/fo_context.h b/src/mesa/pipe/failover/fo_context.h index b065aa832a4..fa336193a8d 100644 --- a/src/mesa/pipe/failover/fo_context.h +++ b/src/mesa/pipe/failover/fo_context.h @@ -68,6 +68,7 @@ struct failover_context { /* The most recent drawing state as set by the driver: */ const struct pipe_blend_state *blend; + const struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS]; struct pipe_alpha_test_state alpha_test; struct pipe_blend_color blend_color; @@ -79,7 +80,6 @@ struct failover_context { struct pipe_shader_state vertex_shader; struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissor; - struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS]; struct pipe_setup_state setup; struct pipe_stencil_state stencil; struct pipe_mipmap_tree *texture[PIPE_MAX_SAMPLERS]; diff --git a/src/mesa/pipe/failover/fo_state.c b/src/mesa/pipe/failover/fo_state.c index 2357d7ef5ce..f3a99e41989 100644 --- a/src/mesa/pipe/failover/fo_state.c +++ b/src/mesa/pipe/failover/fo_state.c @@ -196,16 +196,16 @@ failover_set_stencil_state(struct pipe_context *pipe, static void -failover_set_sampler_state(struct pipe_context *pipe, +failover_bind_sampler_state(struct pipe_context *pipe, unsigned unit, const struct pipe_sampler_state *sampler) { struct failover_context *failover = failover_context(pipe); - failover->sampler[unit] = *sampler; + failover->sampler[unit] = sampler; failover->dirty |= FO_NEW_SAMPLER; failover->dirty_sampler |= (1<<unit); - failover->hw->set_sampler_state( failover->hw, unit, sampler ); + failover->hw->bind_sampler_state( failover->hw, unit, sampler ); } @@ -267,6 +267,7 @@ void failover_init_state_functions( struct failover_context *failover ) { failover->pipe.bind_blend_state = failover_bind_blend_state; + failover->pipe.bind_sampler_state = failover_bind_sampler_state; failover->pipe.set_alpha_test_state = failover_set_alpha_test_state; failover->pipe.set_blend_color = failover_set_blend_color; @@ -277,7 +278,6 @@ failover_init_state_functions( struct failover_context *failover ) failover->pipe.set_fs_state = failover_set_fs_state; failover->pipe.set_vs_state = failover_set_vs_state; failover->pipe.set_polygon_stipple = failover_set_polygon_stipple; - failover->pipe.set_sampler_state = failover_set_sampler_state; failover->pipe.set_scissor_state = failover_set_scissor_state; failover->pipe.set_setup_state = failover_set_setup_state; failover->pipe.set_stencil_state = failover_set_stencil_state; diff --git a/src/mesa/pipe/failover/fo_state_emit.c b/src/mesa/pipe/failover/fo_state_emit.c index 77413d100b3..9d462678c5d 100644 --- a/src/mesa/pipe/failover/fo_state_emit.c +++ b/src/mesa/pipe/failover/fo_state_emit.c @@ -100,8 +100,8 @@ failover_state_emit( struct failover_context *failover ) if (failover->dirty & FO_NEW_SAMPLER) { for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { if (failover->dirty_sampler & (1<<i)) { - failover->sw->set_sampler_state( failover->sw, i, - &failover->sampler[i] ); + failover->sw->bind_sampler_state( failover->sw, i, + failover->sampler[i] ); } } } |