Squashed commit of the following:
[mesa.git] / src / gallium / drivers / i965 / brw_pipe_flush.c
index 9b52b56eae7de9d425a529c3b42c1b61581e1460..fa2b64fd261b5360cbc50eb3fe1eb95940457b4a 100644 (file)
@@ -1,9 +1,11 @@
 
-#include "util/u_upload_mgr.h"
-
 #include "brw_context.h"
+#include "brw_screen.h"
 #include "brw_batchbuffer.h"
 
+#include "util/u_upload_mgr.h"
+
+
 
 
 /* All batchbuffer flushes must go through this function.
@@ -41,10 +43,10 @@ brw_flush( struct pipe_context *pipe,
            struct pipe_fence_handle **fence )
 {
    brw_context_flush( brw_context( pipe ) );
-   *fence = NULL;
+   if (fence)
+      *fence = NULL;
 }
 
-
 void brw_pipe_flush_init( struct brw_context *brw )
 {
    brw->base.flush = brw_flush;