From 506130fff5685742d280bde8800be036c8e8ebfa Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 15 Mar 2010 10:24:55 +0000 Subject: r300g: fix up after merge --- src/gallium/drivers/r300/r300_state.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/gallium/drivers/r300/r300_state.c') diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 71ac89715cc..d7d654dc315 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -938,6 +938,8 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe, struct pipe_sampler_view** views) { struct r300_context* r300 = r300_context(pipe); + struct r300_textures_state* state = + (struct r300_textures_state*)r300->textures_state.state; unsigned i; boolean is_r500 = r300_screen(r300->context.screen)->caps->is_r500; boolean dirty_tex = FALSE; @@ -948,16 +950,16 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe, } for (i = 0; i < count; i++) { - if (r300->fragment_sampler_views[i] != views[i]) { + if (state->fragment_sampler_views[i] != views[i]) { struct r300_texture *texture; - - pipe_sampler_view_reference(&r300->fragment_sampler_views[i], - views[i]); + + pipe_sampler_view_reference(&state->fragment_sampler_views[i], + views[i]); dirty_tex = TRUE; texture = (struct r300_texture *)views[i]->texture; - /* R300-specific - set the texrect factor in a fragment shader */ + /* R300-specific - set the texrect factor in the fragment shader */ if (!is_r500 && texture->is_npot) { /* XXX It would be nice to re-emit just 1 constant, * XXX not all of them */ @@ -967,13 +969,13 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe, } for (i = count; i < 8; i++) { - if (r300->fragment_sampler_views[i]) { - pipe_sampler_view_reference(&r300->fragment_sampler_views[i], - NULL); + if (state->fragment_sampler_views[i]) { + pipe_sampler_view_reference(&state->fragment_sampler_views[i], + NULL); } } - r300->fragment_sampler_view_count = count; + state->texture_count = count; r300->textures_state.dirty = TRUE; @@ -987,7 +989,6 @@ r300_create_sampler_view(struct pipe_context *pipe, struct pipe_texture *texture, const struct pipe_sampler_view *templ) { - struct r300_context *r300 = r300_context(pipe); struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view); if (view) { -- cgit v1.2.3