1bf215546Sopenharmony_ci                             TRACE PIPE DRIVER
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ci
4bf215546Sopenharmony_ci= About =
5bf215546Sopenharmony_ci
6bf215546Sopenharmony_ciThis directory contains a Gallium3D trace debugger pipe driver.
7bf215546Sopenharmony_ciIt can traces all incoming calls.
8bf215546Sopenharmony_ci
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_ci= Usage =
11bf215546Sopenharmony_ci
12bf215546Sopenharmony_ci== Tracing ==
13bf215546Sopenharmony_ci
14bf215546Sopenharmony_ciFor tracing then do
15bf215546Sopenharmony_ci
16bf215546Sopenharmony_ci GALLIUM_TRACE=tri.trace trivial/tri
17bf215546Sopenharmony_ci
18bf215546Sopenharmony_ciwhich should create a tri.trace file, which is an XML file. You can view copying 
19bf215546Sopenharmony_citrace.xsl to the same directory, and opening with a XSLT capable browser such as 
20bf215546Sopenharmony_ciFirefox or Internet Explorer.
21bf215546Sopenharmony_ci
22bf215546Sopenharmony_ciFor long traces you can use the
23bf215546Sopenharmony_ci
24bf215546Sopenharmony_ci  src/gallium/tools/trace/dump.py tri.trace | less -R
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ci
27bf215546Sopenharmony_ci== Remote debugging ==
28bf215546Sopenharmony_ci
29bf215546Sopenharmony_ciFor remote debugging see:
30bf215546Sopenharmony_ci
31bf215546Sopenharmony_ci  src/gallium/auxiliary/driver_rbug/README
32bf215546Sopenharmony_ci
33bf215546Sopenharmony_ci
34bf215546Sopenharmony_ci= Integrating =
35bf215546Sopenharmony_ci
36bf215546Sopenharmony_ciYou can integrate the trace pipe driver either inside the gallium frontend or the 
37bf215546Sopenharmony_citarget. The procedure on both cases is the same. Let's assume you have a 
38bf215546Sopenharmony_cipipe_screen obtained by the usual means (variable and function names are just
39bf215546Sopenharmony_cifor illustration purposes):
40bf215546Sopenharmony_ci
41bf215546Sopenharmony_ci  real_screen = real_screen_create(...);
42bf215546Sopenharmony_ci  
43bf215546Sopenharmony_ciThe trace screen is then created by doing
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_ci  trace_screen = trace_screen_create(real_screen);
46bf215546Sopenharmony_ci
47bf215546Sopenharmony_ciYou can then simply use trace_screen instead of real_screen.
48bf215546Sopenharmony_ci
49bf215546Sopenharmony_ciYou can create as many contexts you wish from trace_screen::context_create they
50bf215546Sopenharmony_ciare automatically wrapped by trace_screen.
51bf215546Sopenharmony_ci
52bf215546Sopenharmony_ci
53bf215546Sopenharmony_ci--
54bf215546Sopenharmony_ciJose Fonseca <jfonseca@vmware.com>
55bf215546Sopenharmony_ciJakob Bornecrantz <jakob@vmware.com>
56