r300-gallium: Don't emit UCP planes for SW TCL.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 9 Jun 2009 02:55:33 +0000 (19:55 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 9 Jun 2009 02:55:33 +0000 (19:55 -0700)
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r300/r300_state_invariant.c

index d81abe4d0b2964dbf9623f2d64403b63ad4e02ae..818880cd3879eae0ee30737261a46c730474b5bc 100644 (file)
@@ -63,6 +63,10 @@ void r300_emit_clip_state(struct r300_context* r300,
     struct r300_screen* r300screen = r300_screen(r300->context.screen);
     CS_LOCALS(r300);
 
+    if (!r300screen->caps->has_tcl) {
+        return;
+    }
+
     BEGIN_CS(5 + (6 * 4));
     OUT_CS_REG(R300_VAP_PVS_VECTOR_INDX_REG,
             (r300screen->caps->is_r500 ?
index 29e721984f81178ae468c3a837969c787889f21a..01e2b511534af1b20c2f10408afd22a4f55b0d1f 100644 (file)
@@ -120,9 +120,13 @@ static void r300_set_clip_state(struct pipe_context* pipe,
 {
     struct r300_context* r300 = r300_context(pipe);
 
-    r300->clip_state = *state;
-
-    r300->dirty_state |= R300_NEW_CLIP;
+    if (r300_screen(pipe->screen)->caps->has_tcl) {
+        r300->clip_state = *state;
+        r300->dirty_state |= R300_NEW_CLIP;
+    } else {
+        draw_flush(r300->draw);
+        draw_set_clip_state(r300->draw, state);
+    }
 }
 
 static void
index 60eff08f2e9542a1be19d8a673158f20d3c17795..e438114010c784f8dd02b3f2e2f28ead745294e0 100644 (file)
@@ -69,7 +69,7 @@ void r300_emit_invariant_state(struct r300_context* r300)
     END_CS;
 
     /* XXX unsorted stuff from surface_fill */
-    BEGIN_CS(75 + (caps->has_tcl ? 7 : 0));
+    BEGIN_CS(77 + (caps->has_tcl ? 5 : 0));
     /* Flush PVS. */
     OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);