diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 34bf81c1930..0f14ccc53e5 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -658,9 +658,7 @@ static void r300_bind_fs_state(struct pipe_context* pipe, void* shader) r300->fs = fs; r300_pick_fragment_shader(r300); - if (r300->vs && r300_vertex_shader_setup_wpos(r300)) { - r300->vertex_format_state.dirty = TRUE; - } + r300->vertex_format_state.dirty = TRUE; r300->dirty_state |= R300_NEW_FRAGMENT_SHADER | R300_NEW_FRAGMENT_SHADER_CONSTANTS; } @@ -1107,21 +1105,23 @@ static void r300_bind_vs_state(struct pipe_context* pipe, void* shader) struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader; if (vs == NULL) { - r300->vs = NULL; + r300->vs_state.state = NULL; return; } else if (!vs->translated) { r300_translate_vertex_shader(r300, vs); } - r300->vs = vs; + r300->vs_state.state = vs; + r300->vs_state.size = vs->code.length + 11; + r300->vs_state.dirty = TRUE; + + r300->vertex_format_state.dirty = TRUE; + if (r300->fs) { r300_vertex_shader_setup_wpos(r300); } - r300->vertex_format_state.dirty = TRUE; - - r300->dirty_state |= - R300_NEW_VERTEX_SHADER | R300_NEW_VERTEX_SHADER_CONSTANTS; + r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS; } else { draw_flush(r300->draw); draw_bind_vertex_shader(r300->draw, |