101e04c3fSmrg                             TRACE PIPE DRIVER
201e04c3fSmrg
301e04c3fSmrg
401e04c3fSmrg= About =
501e04c3fSmrg
601e04c3fSmrgThis directory contains a Gallium3D trace debugger pipe driver.
701e04c3fSmrgIt can traces all incoming calls.
801e04c3fSmrg
901e04c3fSmrg
1001e04c3fSmrg= Usage =
1101e04c3fSmrg
1201e04c3fSmrg== Tracing ==
1301e04c3fSmrg
1401e04c3fSmrgFor tracing then do
1501e04c3fSmrg
1601e04c3fSmrg GALLIUM_TRACE=tri.trace trivial/tri
1701e04c3fSmrg
1801e04c3fSmrgwhich should create a tri.trace file, which is an XML file. You can view copying 
1901e04c3fSmrgtrace.xsl to the same directory, and opening with a XSLT capable browser such as 
2001e04c3fSmrgFirefox or Internet Explorer.
2101e04c3fSmrg
2201e04c3fSmrgFor long traces you can use the
2301e04c3fSmrg
2401e04c3fSmrg  src/gallium/tools/trace/dump.py tri.trace | less -R
2501e04c3fSmrg
2601e04c3fSmrg
2701e04c3fSmrg== Remote debugging ==
2801e04c3fSmrg
2901e04c3fSmrgFor remote debugging see:
3001e04c3fSmrg
3101e04c3fSmrg  src/gallium/auxiliary/driver_rbug/README
3201e04c3fSmrg
3301e04c3fSmrg
3401e04c3fSmrg= Integrating =
3501e04c3fSmrg
367ec681f3SmrgYou can integrate the trace pipe driver either inside the gallium frontend or the 
3701e04c3fSmrgtarget. The procedure on both cases is the same. Let's assume you have a 
3801e04c3fSmrgpipe_screen obtained by the usual means (variable and function names are just
3901e04c3fSmrgfor illustration purposes):
4001e04c3fSmrg
4101e04c3fSmrg  real_screen = real_screen_create(...);
4201e04c3fSmrg  
4301e04c3fSmrgThe trace screen is then created by doing
4401e04c3fSmrg
4501e04c3fSmrg  trace_screen = trace_screen_create(real_screen);
4601e04c3fSmrg
4701e04c3fSmrgYou can then simply use trace_screen instead of real_screen.
4801e04c3fSmrg
4901e04c3fSmrgYou can create as many contexts you wish from trace_screen::context_create they
5001e04c3fSmrgare automatically wrapped by trace_screen.
5101e04c3fSmrg
5201e04c3fSmrg
5301e04c3fSmrg--
5401e04c3fSmrgJose Fonseca <jfonseca@vmware.com>
5501e04c3fSmrgJakob Bornecrantz <jakob@vmware.com>
56