r300-gallium: Emit invariant state, no matter what.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 17 Mar 2009 20:10:41 +0000 (13:10 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 17 Mar 2009 20:14:03 +0000 (13:14 -0700)
It's called "invariant" for a reason. :3

src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_flush.c
src/gallium/drivers/r300/r300_surface.c

index df7f85b937133e102863b9c0564b7ad8800034c1..5797de7dde791d5d061624bbdea43554c782f32d 100644 (file)
@@ -138,6 +138,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
 
     r300_init_state_functions(r300);
 
+    r300_emit_invariant_state(r300);
     r300->dirty_state = R300_NEW_KITCHEN_SINK;
     r300->dirty_hw++;
 
index 3766f0a0a7b0bd07f192ce152ccaa87cbcc35576..20ca6905ad25d05c95be7204c153aba29f5dc4ff 100644 (file)
@@ -31,6 +31,7 @@ static void r300_flush(struct pipe_context* pipe,
 
     if (r300->dirty_hw) {
         FLUSH_CS;
+        r300_emit_invariant_state(r300);
         r300->dirty_state = R300_NEW_KITCHEN_SINK;
         r300->dirty_hw = 0;
     }
index db7cc02b18416048a1b35e5ce9ccb87d1b183ec4..f825fadfc2709c8741f3d1ec0fc672c5ff2e0cd0 100644 (file)
@@ -53,8 +53,6 @@ static void r300_surface_fill(struct pipe_context* pipe,
         return;
     }
 
-    r300_emit_invariant_state(r300);
-
     r300_emit_blend_state(r300, &blend_clear_state);
     r300_emit_blend_color_state(r300, &blend_color_clear_state);
     r300_emit_dsa_state(r300, &dsa_clear_state);