r300-gallium: Correctly flush Draw.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sun, 26 Apr 2009 17:06:02 +0000 (10:06 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sun, 26 Apr 2009 17:06:02 +0000 (10:06 -0700)
Should help with a few non-TCL bugs.

src/gallium/drivers/r300/r300_state.c

index c9507ae193703121e5404e504e57ad0f00b78a18..184a23c9e6878628e9a2efc0ab7cb35def037420 100644 (file)
@@ -421,6 +421,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
     struct r300_context* r300 = r300_context(pipe);
     struct r300_rs_state* rs = (struct r300_rs_state*)state;
 
+    draw_flush(r300->draw);
     draw_set_rasterizer_state(r300->draw, &rs->rs);
 
     r300->rs_state = rs;
@@ -528,7 +529,6 @@ static void r300_set_scissor_state(struct pipe_context* pipe,
                                    const struct pipe_scissor_state* state)
 {
     struct r300_context* r300 = r300_context(pipe);
-    draw_flush(r300->draw);
 
     if (r300_screen(r300->context.screen)->caps->is_r500) {
         r300->scissor_state->scissor_top_left =
@@ -555,6 +555,8 @@ static void r300_set_viewport_state(struct pipe_context* pipe,
 {
     struct r300_context* r300 = r300_context(pipe);
 
+    draw_flush(r300->draw);
+
     if (r300_screen(r300->context.screen)->caps->has_tcl) {
         /* Do the transform in HW. */
         r300->viewport_state->vte_control = R300_VTX_W0_FMT;
@@ -642,6 +644,8 @@ static void r300_bind_vs_state(struct pipe_context* pipe, void* shader)
 {
     struct r300_context* r300 = r300_context(pipe);
 
+    draw_flush(r300->draw);
+
     if (r300_screen(pipe->screen)->caps->has_tcl) {
         struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;