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