X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ftrace%2Ftr_dump.h;h=31ac70802f0bb8872511d8b1bef30445b0c1b795;hb=edfbf7dccb1d90ebedfa08fe06e1db7fff9f94d4;hp=00543ee3b31db64a765de12886299feee50aa0db;hpb=422512050312a880439ed4e8eb99b8e362d5071f;p=mesa.git diff --git a/src/gallium/drivers/trace/tr_dump.h b/src/gallium/drivers/trace/tr_dump.h index 00543ee3b31..31ac70802f0 100644 --- a/src/gallium/drivers/trace/tr_dump.h +++ b/src/gallium/drivers/trace/tr_dump.h @@ -37,11 +37,52 @@ #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.