Merge branch 'mesa_7_5_branch'
[mesa.git] / src / gallium / drivers / trace / tr_dump.h
index 00543ee3b31db64a765de12886299feee50aa0db..31ac70802f0bb8872511d8b1bef30445b0c1b795 100644 (file)
 #include "pipe/p_compiler.h"
 
 
+struct pipe_buffer;
+struct pipe_texture;
+struct pipe_surface;
+struct pipe_transfer;
+
+/*
+ * Call before use.
+ */
+void trace_dump_init(void);
+
+/*
+ * Low level dumping controls.
+ *
+ * Opening the trace file and checking if that is opened.
+ */
 boolean trace_dump_trace_begin(void);
-boolean trace_dump_enabled(void);
+boolean trace_dump_trace_enabled(void);
 void trace_dump_trace_end(void);
+
+/*
+ * Lock and unlock the call mutex.
+ *
+ * It used by the none locked version of dumping control
+ * and begin/end call dump functions.
+ *
+ * Begin takes the lock while end unlocks it. Use the _locked
+ * version to avoid locking/unlocking it.
+ */
+void trace_dump_call_lock(void);
+void trace_dump_call_unlock(void);
+
+/*
+ * High level dumping control.
+ */
+void trace_dumping_start_locked(void);
+void trace_dumping_stop_locked(void);
+boolean trace_dumping_enabled_locked(void);
+void trace_dumping_start(void);
+void trace_dumping_stop(void);
+boolean trace_dumping_enabled(void);
+
+void trace_dump_call_begin_locked(const char *klass, const char *method);
+void trace_dump_call_end_locked(void);
 void trace_dump_call_begin(const char *klass, const char *method);
 void trace_dump_call_end(void);
+
 void trace_dump_arg_begin(const char *name);
 void trace_dump_arg_end(void);
 void trace_dump_ret_begin(void);
@@ -63,7 +104,11 @@ void trace_dump_member_begin(const char *name);
 void trace_dump_member_end(void);
 void trace_dump_null(void);
 void trace_dump_ptr(const void *value);
-
+/* will turn a wrapped object into the real one and dump ptr */
+void trace_dump_buffer_ptr(struct pipe_buffer *_buffer);
+void trace_dump_texture_ptr(struct pipe_texture *_texture);
+void trace_dump_surface_ptr(struct pipe_surface *_surface);
+void trace_dump_transfer_ptr(struct pipe_transfer *_transfer);
 
 /*
  * Code saving macros.