Mesa (master): r300g: ugly fix of a hardlock in the cubestorm xscreensaver

Marek Olšák mareko at kemper.freedesktop.org
Sun Jul 11 22:06:29 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul 11 23:56:22 2010 +0200

r300g: ugly fix of a hardlock in the cubestorm xscreensaver

FDO bug #28563.

---

 src/gallium/drivers/r300/r300_blit.c  |    4 ++++
 src/gallium/drivers/r300/r300_flush.c |    4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 2408a95..3cc0547 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -133,6 +133,10 @@ static void r300_clear(struct pipe_context* pipe,
                        fb->nr_cbufs,
                        buffers, rgba, depth, stencil);
     r300_blitter_end(r300);
+
+    /* XXX this flush "fixes" a hardlock in the cubestorm xscreensaver */
+    if (r300->flush_counter == 0)
+        pipe->flush(pipe, 0, NULL);
 }
 
 /* Clear a region of a color surface to a constant value. */
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index ba840bf..2ebf1c8 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -50,9 +50,7 @@ static void r300_flush(struct pipe_context* pipe,
     if (r300->dirty_hw) {
         r300_emit_query_end(r300);
 
-        if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
-            r300->flush_counter++;
-        }
+        r300->flush_counter++;
         r300->rws->flush_cs(r300->rws);
         r300->dirty_hw = 0;
 




More information about the mesa-commit mailing list