mesa/src/gallium/auxiliary/driver_trace
Eric Anholt 882ca6dfb0 util: Move gallium's PIPE_FORMAT utils to /util/format/
To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to
move their helpers out of gallium.  Since u_format used
util_copy_rect(), I moved that in there, too.

I've put it in a separate directory in util/ because it's a big chunk
of related code, and it's not clear to me whether we might want it as
a separate library from libmesa_util at some point.

Closes: #1905
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-11-14 10:47:20 -08:00
..
README
tr_context.c tree-wide: replace MAYBE_UNUSED with ASSERTED 2019-07-31 09:41:05 +01:00
tr_context.h
tr_dump.c util: Move gallium's PIPE_FORMAT utils to /util/format/ 2019-11-14 10:47:20 -08:00
tr_dump.h gallium: switch boolean -> bool at the interface definitions 2019-07-22 22:13:51 -04:00
tr_dump_defines.h util: Move gallium's PIPE_FORMAT utils to /util/format/ 2019-11-14 10:47:20 -08:00
tr_dump_state.c util: Move gallium's PIPE_FORMAT utils to /util/format/ 2019-11-14 10:47:20 -08:00
tr_dump_state.h
tr_public.h gallium: switch boolean -> bool at the interface definitions 2019-07-22 22:13:51 -04:00
tr_screen.c util: Move gallium's PIPE_FORMAT utils to /util/format/ 2019-11-14 10:47:20 -08:00
tr_screen.h
tr_texture.c
tr_texture.h
trace.xsl

                             TRACE PIPE DRIVER


= About =

This directory contains a Gallium3D trace debugger pipe driver.
It can traces all incoming calls.


= Usage =

== Tracing ==

For tracing then do

 GALLIUM_TRACE=tri.trace trivial/tri

which should create a tri.trace file, which is an XML file. You can view copying 
trace.xsl to the same directory, and opening with a XSLT capable browser such as 
Firefox or Internet Explorer.

For long traces you can use the

  src/gallium/tools/trace/dump.py tri.trace | less -R


== Remote debugging ==

For remote debugging see:

  src/gallium/auxiliary/driver_rbug/README


= Integrating =

You can integrate the trace pipe driver either inside the state tracker or the 
target. The procedure on both cases is the same. Let's assume you have a 
pipe_screen obtained by the usual means (variable and function names are just
for illustration purposes):

  real_screen = real_screen_create(...);
  
The trace screen is then created by doing

  trace_screen = trace_screen_create(real_screen);

You can then simply use trace_screen instead of real_screen.

You can create as many contexts you wish from trace_screen::context_create they
are automatically wrapped by trace_screen.


--
Jose Fonseca <jfonseca@vmware.com>
Jakob Bornecrantz <jakob@vmware.com>