Call softpipe_unmap_surfaces() in softpipe_flush().
authorBrian <brian.paul@tungstengraphics.com>
Sat, 20 Oct 2007 21:52:36 +0000 (15:52 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Sat, 20 Oct 2007 21:52:36 +0000 (15:52 -0600)
This fixes a DRM BO failure upon swapbuffers caused by the color buffer
still being mapped.
This is a bit heavy handed since we don't always need to unmap buffers
when flushing.  Need to pass a flag to flush() or design a new function.

src/mesa/pipe/softpipe/sp_flush.c

index f2186dbb65304c67c66a09dfedb5d3403c59523f..5eb4d3367d10333e35ba79b569dc0ee81f924c93 100644 (file)
@@ -63,5 +63,13 @@ softpipe_flush( struct pipe_context *pipe,
 
    if (softpipe->sbuf_cache)
       sp_flush_tile_cache(softpipe->sbuf_cache);
+
+   /* Need this call for hardware buffers before swapbuffers.
+    *
+    * there should probably be another/different flush-type function
+    * that's called before swapbuffers because we don't always want
+    * to unmap surfaces when flushing.
+    */
+   softpipe_unmap_surfaces(softpipe);
 }