Mesa (master): r300g: mark all states as dirty after flush

Corbin Simpson csimpson at kemper.freedesktop.org
Wed Jan 13 02:09:25 UTC 2010


Module: Mesa
Branch: master
Commit: 66334847744f2547a6891cbcf2191306a72f04ab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66334847744f2547a6891cbcf2191306a72f04ab

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Jan 12 21:50:10 2010 +0100

r300g: mark all states as dirty after flush

It fixes almost all regressions introduced lately.

---

 src/gallium/drivers/r300/r300_flush.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index 14a0824..c78a767 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -37,6 +37,7 @@ static void r300_flush(struct pipe_context* pipe,
 {
     struct r300_context *r300 = r300_context(pipe);
     struct r300_query *query;
+    struct r300_atom *atom;
 
     CS_LOCALS(r300);
     /* We probably need to flush Draw, but we may have been called from
@@ -54,7 +55,15 @@ static void r300_flush(struct pipe_context* pipe,
         r300_emit_invariant_state(r300);
         r300->dirty_state = R300_NEW_KITCHEN_SINK;
         r300->dirty_hw = 0;
+
+        /* New kitchen sink, baby. */
+        foreach(atom, &r300->atom_list) {
+            if (atom->state) {
+                atom->dirty = TRUE;
+            }
+        }
     }
+
     /* reset flushed query */
     foreach(query, &r300->query_list) {
         query->flushed = TRUE;




More information about the mesa-commit mailing list