mesa/src/gallium/tools/trace
Zack Rusin dfa25ea5cd gallium: allow setting of the internal stream output offset
D3D10 allows setting of the internal offset of a buffer, which is
in general only incremented via actual stream output writes. By
allowing setting of the internal offset draw_auto is capable
of rendering from buffers which have not been actually streamed
out to. Our interface didn't allow. This change functionally
shouldn't make any difference to OpenGL where instead of an
append_bitmask you just get a real array where -1 means append
(like in D3D) and 0 means do not append.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-07 12:49:33 -05:00
..
diff_state.py tools/trace: Do a better job at comparing multi line strings. 2013-06-21 14:30:20 +01:00
dump.py s/Tungsten Graphics/VMware/ 2014-01-17 20:00:32 +00:00
dump_state.py gallium: allow setting of the internal stream output offset 2014-03-07 12:49:33 -05:00
format.py s/Tungsten Graphics/VMware/ 2014-01-17 20:00:32 +00:00
model.py s/Tungsten Graphics/VMware/ 2014-01-17 20:00:32 +00:00
parse.py s/Tungsten Graphics/VMware/ 2014-01-17 20:00:32 +00:00
README.txt tools/trace: Quick instructions/notes. 2013-06-21 14:30:20 +01:00
TODO.txt tools/trace: Quick instructions/notes. 2013-06-21 14:30:20 +01:00
tracediff.sh tools/trace: Simple script to compare two traces. 2013-09-20 17:34:57 +01:00

These directory contains tools for manipulating traces produced by the trace
pipe driver.


Most debug builds of state trackers already load the trace driver by default.
To produce a trace do

  export GALLIUM_TRACE=foo.gtrace

and run the application.  You can choose any name, but the .gtrace is
recommended to avoid confusion with the .trace produced by apitrace.


You can dump a trace by doing

  ./dump.py foo.gtrace | less


You can dump a JSON file describing the static state at any given draw call
(e.g., 12345) by
doing

  ./dump_state.py -v -c 12345 foo.gtrace > foo.json

or by specifying the n-th (e.g, 1st) draw call by doing

  ./dump_state.py -v -d 1 foo.gtrace > foo.json

The state is derived from the call sequence in the trace file, so no dynamic
(eg. rendered textures) is included.


You can compare two JSON files by doing

  ./diff_state.py foo.json boo.json | less

If you're investigating a regression in a state tracker, you can obtain a good
and bad trace, dump respective state in JSON, and then compare the states to
identify the problem.