static pipe_mutex call_mutex;
static long unsigned call_no = 0;
static boolean dumping = FALSE;
+static boolean initialized = FALSE;
static INLINE void
}
}
+void trace_dump_init()
+{
+ if (initialized)
+ return;
+
+ pipe_mutex_init(call_mutex);
+ dumping = FALSE;
+ initialized = TRUE;
+}
+
boolean trace_dump_trace_begin()
{
const char *filename;
+ assert(initialized);
+
filename = debug_get_option("GALLIUM_TRACE", NULL);
if(!filename)
return FALSE;
if(!stream)
return FALSE;
- pipe_mutex_init(call_mutex);
-
trace_dump_writes("<?xml version='1.0' encoding='UTF-8'?>\n");
trace_dump_writes("<?xml-stylesheet type='text/xsl' href='trace.xsl'?>\n");
trace_dump_writes("<trace version='0.1'>\n");