summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-28 07:45:56 +0100
committerMarek Olšák <[email protected]>2010-02-28 19:30:39 +0100
commit942762cd973af0df75040de21d3321cd19829e70 (patch)
treeb7700f3c2cf71e52fa671cc8b102c29825baf2bf /src/gallium/drivers/r300/r300_state.c
parent79a86d312d8b3bc2e4fa28734467400e0b050301 (diff)
r300g: decouple vertex stream setup (PSC) and VS output mapping (VAP_OUT)
Formerly known as vertex_format_state. These two are completely unrelated when using HWTCL and decoupling them makes the design less SWTCL-centric. When bypass_vs_clip_and_viewport gets removed, the PSC setup will no longer be a derived state. This change shouldn't make unbreaking SWTCL harder.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 97a0897a5e2..5a471584005 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -659,7 +659,11 @@ static void r300_bind_fs_state(struct pipe_context* pipe, void* shader)
r300->fs = fs;
r300_pick_fragment_shader(r300);
- r300->vertex_format_state.dirty = TRUE;
+ r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */
+
+ if (r300->vs_state.state && r300_vertex_shader_setup_wpos(r300)) {
+ r300->vap_output_state.dirty = TRUE;
+ }
r300->dirty_state |= R300_NEW_FRAGMENT_SHADER | R300_NEW_FRAGMENT_SHADER_CONSTANTS;
}
@@ -1033,9 +1037,9 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
if (r300->draw) {
draw_flush(r300->draw);
draw_set_vertex_buffers(r300->draw, count, buffers);
+ } else {
+ r300->vertex_stream_state.dirty = TRUE;
}
-
- r300->vertex_format_state.dirty = TRUE;
}
static boolean r300_validate_aos(struct r300_context *r300)
@@ -1114,7 +1118,9 @@ static void r300_bind_vs_state(struct pipe_context* pipe, void* shader)
r300->vs_state.size = vs->code.length + 9;
r300->vs_state.dirty = TRUE;
- r300->vertex_format_state.dirty = TRUE;
+ r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */
+ r300->vap_output_state.dirty = TRUE;
+ r300->vertex_stream_state.dirty = TRUE; /* XXX needed for TCL bypass */
r300->pvs_flush.dirty = TRUE;
if (r300->fs) {