summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-02-24 20:02:59 -0800
committerCorbin Simpson <[email protected]>2010-02-24 20:02:59 -0800
commit686f69bd13fd2aebaa40edeb7e25e4a49b12a2bd (patch)
treebfa17a4d5eb183d4f488a1223ba04067422713d0 /src/gallium/drivers/r300/r300_state.c
parentf05d4526e31bfcf238d826582317312bf0d8572d (diff)
r300g: Atomize vertex shader.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c18
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,