r300g: ugly fix of a hardlock in the cubestorm xscreensaver
authorMarek Olšák <maraeo@gmail.com>
Sun, 11 Jul 2010 21:56:22 +0000 (23:56 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 11 Jul 2010 22:04:52 +0000 (00:04 +0200)
FDO bug #28563.

src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_flush.c

index 2408a9535389165505c2150dfd64ff5e3d29f0c8..3cc054788bc3b0df42e06a4c4d5d374803d7b648 100644 (file)
@@ -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. */
index ba840bfff81b8b68da3f4aa3d22a7dfb9d70bb6e..2ebf1c814b4ec61872eb61831fd8944571bb7c8a 100644 (file)
@@ -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;