]> git.cworth.org Git - apitrace/blobdiff - retrace/retrace_main.cpp
Fix current context tracking.
[apitrace] / retrace / retrace_main.cpp
index df69d4add281233ce0ba817fdef25c576c1601d8..9b029c8b5a10e4c0d6c5c9794257b1f74d6b281a 100644 (file)
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <iostream>
 
-#include "glws.hpp"
 #include "os_binary.hpp"
 #include "os_time.hpp"
 #include "os_workqueue.hpp"
@@ -223,6 +222,10 @@ static void do_all_calls(void)
             }
 
             thread_wq->queue_work(render_work);
+
+            // XXX: Flush immediately to avoid race conditions on unprotected
+            // static/global variables.
+            thread_wq->flush();
         } else {
             render_work->run();
             delete render_work;