diff options
author | Stéphane Marchesin <[email protected]> | 2012-10-04 17:37:37 -0700 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2012-10-05 12:45:01 -0700 |
commit | dca9e3c4779936970dac796872a2399cd0437f63 (patch) | |
tree | 300d52977a379f9320cf852268433e776ff396b3 /src/gallium/drivers/i915/i915_state.c | |
parent | 98600c5ff674431fd325acec30ec42909c3ad8ed (diff) |
i915g: Remove the i915_context->saved_* stuff.
When using u_blitter, the state was being saved from saved_*, but we
don't use that. So after u_blitter resumed we got some corrupted
state in.
So let's just remove the saved_* stuff. I thought it was weird but
harmless, it's actually broken.
Diffstat (limited to 'src/gallium/drivers/i915/i915_state.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 410615f212a..d3e62c941a5 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -296,9 +296,6 @@ static void i915_fixup_bind_sampler_states(struct pipe_context *pipe, { struct i915_context *i915 = i915_context(pipe); - i915->saved_nr_samplers = num; - memcpy(&i915->saved_samplers, sampler, sizeof(void *) * num); - i915->saved_bind_sampler_states(pipe, num, sampler); } @@ -586,11 +583,6 @@ i915_fixup_bind_fs_state(struct pipe_context *pipe, void *shader) { struct i915_context *i915 = i915_context(pipe); - if (i915->saved_fs == shader) - return; - - i915->saved_fs = shader; - i915->saved_bind_fs_state(pipe, shader); } @@ -645,10 +637,10 @@ static void i915_bind_vs_state(struct pipe_context *pipe, void *shader) { struct i915_context *i915 = i915_context(pipe); - if (i915->saved_vs == shader) + if (i915->vs == shader) return; - i915->saved_vs = shader; + i915->vs = shader; /* just pass-through to draw module */ draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader); @@ -726,17 +718,6 @@ i915_fixup_set_fragment_sampler_views(struct pipe_context *pipe, struct pipe_sampler_view **views) { struct i915_context *i915 = i915_context(pipe); - int i; - - for (i = 0; i < num; i++) - pipe_sampler_view_reference(&i915->saved_sampler_views[i], - views[i]); - - for (i = num; i < i915->saved_nr_sampler_views; i++) - pipe_sampler_view_reference(&i915->saved_sampler_views[i], - NULL); - - i915->saved_nr_sampler_views = num; i915->saved_set_sampler_views(pipe, num, views); } @@ -842,7 +823,7 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe, } pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf); - i915->dirty |= I915_NEW_FRAMEBUFFER; + i915->dirty |= I915_NEW_FRAMEBUFFER | I915_NEW_FS; } @@ -852,7 +833,7 @@ static void i915_set_clip_state( struct pipe_context *pipe, { struct i915_context *i915 = i915_context(pipe); - i915->saved_clip = *clip; + i915->clip = *clip; draw_set_clip_state(i915->draw, clip); @@ -978,8 +959,8 @@ static void i915_set_vertex_buffers(struct pipe_context *pipe, struct draw_context *draw = i915->draw; int i; - util_copy_vertex_buffers(i915->saved_vertex_buffers, - &i915->saved_nr_vertex_buffers, + util_copy_vertex_buffers(i915->vertex_buffers, + &i915->nr_vertex_buffers, buffers, count); #if 0 /* XXX doesn't look like this is needed */ @@ -1023,10 +1004,10 @@ i915_bind_vertex_elements_state(struct pipe_context *pipe, struct i915_context *i915 = i915_context(pipe); struct i915_velems_state *i915_velems = (struct i915_velems_state *) velems; - if (i915->saved_velems == velems) + if (i915->velems == velems) return; - i915->saved_velems = velems; + i915->velems = velems; /* pass-through to draw module */ if (i915_velems) { |