summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 890e3961b18..61d6751e5d3 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -969,24 +969,14 @@ static void r300_bind_fs_state(struct pipe_context* pipe, void* shader)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_fragment_shader* fs = (struct r300_fragment_shader*)shader;
- struct pipe_framebuffer_state *fb = r300->fb_state.state;
- boolean last_multi_write;
if (fs == NULL) {
r300->fs.state = NULL;
return;
}
- last_multi_write = r300_fragment_shader_writes_all(r300_fs(r300));
-
r300->fs.state = fs;
- r300_pick_fragment_shader(r300);
- r300_mark_fs_code_dirty(r300);
-
- if (fb->nr_cbufs > 1 &&
- last_multi_write != r300_fragment_shader_writes_all(fs)) {
- r300_mark_fb_state_dirty(r300, R300_CHANGED_MULTIWRITE);
- }
+ r300->fs_status = FRAGMENT_SHADER_DIRTY;
r300_mark_atom_dirty(r300, &r300->rs_block_state); /* Will be updated before the emission. */
}
@@ -1256,8 +1246,8 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
}
if (last_frag_clamp != r300->frag_clamp &&
- r300->fs.state && r300_pick_fragment_shader(r300)) {
- r300_mark_fs_code_dirty(r300);
+ r300->fs_status == FRAGMENT_SHADER_VALID) {
+ r300->fs_status = FRAGMENT_SHADER_MAYBE_DIRTY;
}
}
@@ -1555,7 +1545,8 @@ static void r300_set_viewport_state(struct pipe_context* pipe,
}
r300_mark_atom_dirty(r300, &r300->viewport_state);
- if (r300->fs.state && r300_fs(r300)->shader->inputs.wpos != ATTR_UNUSED) {
+ if (r300->fs.state && r300_fs(r300)->shader &&
+ r300_fs(r300)->shader->inputs.wpos != ATTR_UNUSED) {
r300_mark_atom_dirty(r300, &r300->fs_rc_constant_state);
}
}